Example #1
0
 public function __construct()
 {
     $this->name = __("WPML - Conditional", 'Pixelentity Theme/Plugin');
     $this->description = __("Show/Hide widgets according to language", 'Pixelentity Theme/Plugin');
     $this->fields = array("lang" => array("label" => __("Language", 'Pixelentity Theme/Plugin'), "description" => __("Only show subsequent widgets when language match the above selection.", 'Pixelentity Theme/Plugin'), "type" => "RadioUI", "options" => peTheme()->wpml->options(), "default" => ""));
     parent::__construct();
 }
 protected function addTemplateValues(&$data)
 {
     $thumbs = $this->data["thumbs"];
     $orig = $this->data["orig"];
     $data["[ORIG]"] = $orig;
     $buffer =& $data["[THUMBNAILS]"];
     $buffer = "";
     $image =& peTheme()->image;
     $pw = 400;
     list($img, $w, $h) = $image->aq_resize($orig, $pw, null, null, false);
     $pw = $w;
     $ph = $h;
     $w = 304;
     $h = 228;
     $buffer .= sprintf('<div class="pe-theme-editor" data-nonce="%s" data-id="%s" data-scale="%s" data-w="%s" data-h="%s" data-pw="%s" data-ph="%s"><img src="%s"/><div class="pe-controls"><input type="button" id="pe-theme-done" class="ob_button" value="%s"/><input type="button" id="pe-theme-cancel" class="ob_button" value="%s"/></div></div>', $this->data["nonce"], $this->data["id"], $this->data["width"] / $pw, $w, $h, $pw, $ph, $img, __("save", 'Pixelentity Theme/Plugin'), __("cancel", 'Pixelentity Theme/Plugin'));
     foreach ($thumbs as $t => $size) {
         list($tw, $th, $mtime) = $size;
         $key = sprintf("%sx%s", $tw, $th);
         $buffer .= sprintf('<div class="pe-theme-thumbnail">');
         $buffer .= sprintf('<h5>%sx%s</h5>', $tw, $th);
         $buffer .= sprintf('<div class="pe-theme-preview" data-size="%sx%s" style="width:%spx;height:%spx"><div style="width:%spx;height:%spx"><img src="%s?t=%s"/></div></div>', $tw, $th, $w, $h, $tw, $th, $t, $mtime);
         $value = empty($this->data["value"][$key]) ? "" : $this->data["value"][$key];
         $buffer .= sprintf('<input type="hidden" name="%s[%s]" value="%s" data-orig="%s" />', $data['[NAME]'], $key, $value, $value);
         $buffer .= sprintf('</div>');
     }
     if (!isset($this->data["noscript"])) {
         $data['[SCRIPT]'] = sprintf('<script type="text/javascript">%s</script>', str_replace("[ID]", $data['[ID]'], $this->jsInit()));
     } else {
         $data['[SCRIPT]'] = "";
     }
 }
Example #3
0
 public function widget($args, $instance)
 {
     $instance = $this->clean($instance);
     extract($instance);
     if (!@$id) {
         return;
     }
     $post = get_post($id);
     if (!$post) {
         return;
     }
     echo $args["before_widget"];
     if (isset($title)) {
         echo "<h3>{$title}</h3>";
     }
     list($w, $h) = explode("x", $size);
     echo "<div>";
     $t =& peTheme();
     $t->data->postSetup($post);
     $t->template->gallery_cover($w, $h);
     $t->data->postReset();
     $t->template->intro_gallery($id, 90, 74, "fullscreen");
     echo "</div>";
     echo $args["after_widget"];
 }
 protected function addTemplateValues(&$data)
 {
     parent::addTemplateValues($data);
     if (!isset($this->data["noscript"])) {
         $data['[SCRIPT]'] = sprintf('<script type="text/javascript">%s</script>', str_replace("[ID]", $data['[ID]'], $this->jsInit()));
     } else {
         $data['[SCRIPT]'] = "";
     }
     $data["[VALUE]"] = empty($this->data["value"]) ? $this->data["default"] : $this->data["value"];
     $palette = empty($this->data["palette"]) ? array() : array_flip($this->data["palette"]);
     $t =& peTheme();
     $colors = $t->color->options();
     if (!empty($colors)) {
         $options = $t->options->all();
         $colors = array_keys($colors);
         foreach ($colors as $key) {
             if ($color = empty($options->{$key}) ? false : $options->{$key}) {
                 $palette[$color] = $color;
             }
         }
     }
     $palette["#000000"] = true;
     $palette["#ffffff"] = true;
     $palette["#dd3333"] = true;
     $palette["#eeee22"] = true;
     $palette["#81d742"] = true;
     $palette["#1e73be"] = true;
     if (!empty($palette)) {
         $data["[PALETTE]"] = sprintf('data-palette="%s"', esc_attr(json_encode(array_keys($palette))));
     }
 }
 public function container($atts, $content = null, $code = "")
 {
     $this->instances++;
     $content = $this->parseContent($content);
     if (!is_array($this->items) || count($this->items) == 0) {
         return "";
     }
     $count = 1;
     $commonID = "accordion" . $this->instances;
     $html = "";
     if (peTheme()->template->exists("shortcode", "accordion")) {
         $items = $this->items;
         $conf = (object) compact("atts", "content", "items");
         ob_start();
         peTheme()->template->get_part($conf, "shortcode", "accordion");
         $html = ob_get_clean();
     } else {
         while ($item = array_shift($this->items)) {
             $html .= '<div class="accordion-title"><h5><span></span><a href="#">' . $item->title . '</a></h5></div>
             <div class="accordion-inner">
                 ' . $item->body . '
             </div>';
         }
     }
     $html = sprintf('<div id="%s" class="accordion" rel="1">%s</div>', $commonID, $html);
     return apply_filters("pe_theme_shortcode_accordion", $html, $atts, $content, $commonID);
 }
Example #6
0
 public function __construct()
 {
     $this->metabox = array("title" => __("Blog", 'Pixelentity Theme/Plugin'), "priority" => "core", "where" => array("page" => "page-blog"), "content" => array("layout" => array("label" => __("Layout", 'Pixelentity Theme/Plugin'), "type" => "RadioUI", "description" => __("Select the required post layout. 'Full' - denotes a full width normal blog layout. 'Compact' - denotes a full width list style layout. 'Mini' - denotes a compressed layout with small post thumbnails.", 'Pixelentity Theme/Plugin'), "options" => PeGlobal::$config["blog"], "default" => ""), "count" => array("label" => __("Max Posts", 'Pixelentity Theme/Plugin'), "type" => "Text", "description" => __("Maximum number of posts to show.", 'Pixelentity Theme/Plugin'), "default" => get_option("posts_per_page")), "media" => array("label" => __("Show Media", 'Pixelentity Theme/Plugin'), "type" => "RadioUI", "description" => __("Specify if the post's image/video/gallery media is displayed.", 'Pixelentity Theme/Plugin'), "options" => PeGlobal::$const->data->yesno, "default" => "yes"), "pager" => array("label" => __("Paged Result", 'Pixelentity Theme/Plugin'), "type" => "RadioUI", "description" => __("Display a pager when more posts are found than specified in the 'Maximum' field. ", 'Pixelentity Theme/Plugin'), "options" => PeGlobal::$const->data->yesno, "default" => "yes"), "sticky" => array("label" => __("Include Sticky Posts", 'Pixelentity Theme/Plugin'), "type" => "RadioUI", "description" => __("Include sticky posts in the displayed list.", 'Pixelentity Theme/Plugin'), "options" => PeGlobal::$const->data->yesno, "default" => "yes"), "category" => array("label" => __("Category", 'Pixelentity Theme/Plugin'), "type" => "Select", "description" => __("Only show posts from a specific category.", 'Pixelentity Theme/Plugin'), "options" => array_merge(array(__("All", 'Pixelentity Theme/Plugin') => ""), peTheme()->data->getTaxOptions("category")), "default" => ""), "tag" => array("label" => __("Tag", 'Pixelentity Theme/Plugin'), "type" => "Select", "description" => __("Only show posts with a specific tag.", 'Pixelentity Theme/Plugin'), "options" => array_merge(array(__("All", 'Pixelentity Theme/Plugin') => ""), peTheme()->data->getTaxOptions("post_tag")), "default" => ""), "format" => array("label" => __("Post Format", 'Pixelentity Theme/Plugin'), "type" => "Select", "description" => __("Only show posts of a specific format.", 'Pixelentity Theme/Plugin'), "options" => array_merge(array(__("All", 'Pixelentity Theme/Plugin') => ""), array_combine(PeGlobal::$config["post-formats"], PeGlobal::$config["post-formats"])), "default" => "")));
     if (count(PeGlobal::$config["blog"]) < 2) {
         unset($this->metabox["content"]["layout"]);
     }
 }
 public function container($atts, $content = null, $code = "")
 {
     $this->instances++;
     $content = $this->parseContent($content);
     if (!is_array($this->items) || count($this->items) == 0) {
         return "";
     }
     $count = 1;
     $commonID = "accordion" . $this->instances;
     $html = "";
     if (peTheme()->template->exists("shortcode", "accordion")) {
         $items = $this->items;
         $conf = (object) compact("atts", "content", "items");
         ob_start();
         peTheme()->template->get_part($conf, "shortcode", "accordion");
         $html = ob_get_clean();
     } else {
         while ($item = array_shift($this->items)) {
             $id = "{$commonID}_{$count}";
             $html .= '<div class="accordion-group">';
             $html .= sprintf('<div class="accordion-heading"><a class="accordion-toggle" href="#%s" data-parent="#%s" data-toggle="collapse">%s</a></div>', $id, $commonID, $item->title);
             $html .= sprintf('<div id="%s" class="accordion-body%s"><div class="accordion-inner">%s</div></div>', $id, $count > 1 ? " collapse" : " in", $item->body);
             $html .= '</div>';
             $count++;
         }
     }
     $html = sprintf('<div id="%s" class="accordion">%s</div>', $commonID, $html);
     return apply_filters("pe_theme_shortcode_accordion", $html, $atts, $content, $commonID);
 }
 public function output($conf)
 {
     $settings = (object) $conf["data"];
     printf('<div class="pe-block%s">', $settings->margin === "no" ? " nomargin" : "");
     peTheme()->view->resize($settings);
     print "</div>";
 }
 public function registerAssets()
 {
     parent::registerAssets();
     // prototype.js alters JSON2 behaviour, it shouldn't be loaded in our admin page anyway but
     // if other plugins are forcing it in all wordpress admin pages, we get rid of it here.
     wp_deregister_script("prototype");
     if (version_compare($GLOBALS["wp_version"], '3.5-RC1', '<')) {
         // for wordpress < 3.5, the bundled jquery ui is not able to handle correctly the nested sortables
         // so we load a newer version in noconflict mode and only use for our layout builder
         PeThemeAsset::addScript("framework/js/admin/3.5/jquery.js", array(), "pe_theme_35_jquery");
         PeThemeAsset::addScript("framework/js/admin/3.5/jquery-ui-1.9.2.custom.min.js", array("pe_theme_35_jquery"), "pe_theme_35_ui");
         PeThemeAsset::addScript("framework/js/admin/3.5/noconflict.js", array("pe_theme_35_ui"), "pe_theme_35");
         wp_enqueue_script("pe_theme_35");
     }
     PeThemeAsset::addStyle("framework/css/jquery.theme.field.layout.css", array("pe_theme_admin"), "pe_theme_field_layout");
     PeThemeAsset::addScript("framework/js/admin/jquery.theme.field.layout.js", array("pe_theme_utils", "jquery-ui-sortable", "pe_theme_tooltip", "json2"), "pe_theme_field_layout");
     wp_enqueue_style("pe_theme_field_layout");
     wp_enqueue_script("pe_theme_field_layout");
     $views = array();
     // modules
     foreach (peTheme()->view->views() as $view) {
         if ($view->capability("layout")) {
             $view->registerAssets();
             $views[] = $view;
         }
     }
     foreach ($views as $view) {
         $view->requireAssets();
     }
 }
Example #10
0
    public function container($atts, $content = null, $code = "")
    {
        $this->instances++;
        $content = $this->parseContent($content);
        $head = $body = "";
        if (!is_array($this->items) || count($this->items) == 0) {
            return "";
        }
        $count = 1;
        $commonID = "tab" . $this->instances . "_";
        if (peTheme()->template->exists("shortcode", "tab")) {
            $items = $this->items;
            $conf = (object) compact("atts", "content", "items");
            ob_start();
            peTheme()->template->get_part($conf, "shortcode", "tab");
            $html = ob_get_clean();
            $this->items = array();
        } else {
            while ($tab = array_shift($this->items)) {
                $id = "{$commonID}_{$count}";
                $head .= sprintf('<li%s><a href="#%s" data-toggle="tab">%s</a></li>', $count == 1 ? ' class="active"' : '', $id, $tab->title);
                $body .= sprintf('<div class="tab-pane%s" id="%s">%s</div>', $count == 1 ? ' active' : '', $id, $tab->body);
                $count++;
            }
            $html = <<<EOL
\t<ul class="nav nav-tabs">
\t\t{$head}
\t</ul>  
\t<div class="tab-content">
\t\t{$body}
\t</div>
EOL;
        }
        return $html;
    }
Example #11
0
 public function template($type = "")
 {
     if ($type != "empty") {
         peTheme()->get_template_part("view", "portfolio");
         //peTheme()->get_template_part("view","portfolio-masonary");
     }
 }
Example #12
0
 public function __construct()
 {
     $this->all = peTheme()->video->option();
     $this->fields = new StdClass();
     $description = current($this->all) < 0 ? sprintf(__('<a href="%s">Create a new Video</a>', 'Pixelentity Theme/Plugin'), admin_url('post-new.php?post_type=video')) : __("Select which video to use", 'Pixelentity Theme/Plugin');
     $this->fields->id = array("label" => __("Use video", 'Pixelentity Theme/Plugin'), "type" => "Select", "description" => $description, "options" => $this->all, "default" => "");
     $this->metaboxPost = array("title" => __("Video Options", 'Pixelentity Theme/Plugin'), "where" => array("post" => "video"), "content" => array("id" => $this->fields->id));
 }
 public function template()
 {
     if ($this->loop) {
         $t =& peTheme();
         $t->get_template_part("viewmodule", $this->templateName());
         $t->content->resetLoop();
     }
 }
 public function template()
 {
     $t =& peTheme();
     if ($loop = $t->data->customLoop($this->data)) {
         $t->template->data($this->data, $this->conf->bid);
         $t->get_template_part("viewmodule", $this->templateName());
         $t->content->resetLoop();
     }
 }
 public function output($atts, $content = null, $code = "")
 {
     extract(shortcode_atts(array('id' => ''), $atts));
     $t =& peTheme();
     ob_start();
     $t->project->portfolio($id);
     $content =& ob_get_clean();
     return $content;
 }
 public function template($type = '')
 {
     if ('empty' == $type) {
         return;
     }
     print '<div class="pe-container pe-block">';
     peTheme()->get_template_part("view", "carousel");
     print '</div>';
 }
Example #17
0
 public function __construct($master)
 {
     parent::__construct($master);
     $this->trigger = "hero";
     $this->group = __("LAYOUT", 'Pixelentity Theme/Plugin');
     $this->name = __("Hero Unit", 'Pixelentity Theme/Plugin');
     $this->description = __("Add an Hero Unit", 'Pixelentity Theme/Plugin');
     $this->fields = array("type" => array("label" => __("Hero Unit Type", 'Pixelentity Theme/Plugin'), "type" => "Select", "description" => __("Select the type of hero unit required. the type determines the color", 'Pixelentity Theme/Plugin'), "options" => array(__("Default", 'Pixelentity Theme/Plugin') => "default", __("Primary", 'Pixelentity Theme/Plugin') => "primary", __("Info", 'Pixelentity Theme/Plugin') => "info", __("Success", 'Pixelentity Theme/Plugin') => "success", __("Warning", 'Pixelentity Theme/Plugin') => "warning", __("Danger", 'Pixelentity Theme/Plugin') => "danger", __("Inverse", 'Pixelentity Theme/Plugin') => "inverse"), "default" => "default"), "title" => array("label" => __("Title", 'Pixelentity Theme/Plugin'), "type" => "Text", "description" => __("Enter the title of the Hero Unit.", 'Pixelentity Theme/Plugin')), "content" => array("label" => __("Content", 'Pixelentity Theme/Plugin'), "type" => "Editor", "description" => __("Enter the Hero Unit content here.", 'Pixelentity Theme/Plugin')));
     peTheme()->shortcode->blockLevel[] = $this->trigger;
 }
Example #18
0
 public function __construct()
 {
     $this->all = $this->all =& peTheme()->project->option();
     $this->metabox = array("title" => __("Project", 'Pixelentity Theme/Plugin'), "priority" => "core", "type" => "Project", "where" => array("project" => "all"), "content" => array("subtitle" => array("label" => __("Subtitle", 'Pixelentity Theme/Plugin'), "type" => "Text", "description" => __("Specify a project subtitle. This will be shown on the portfolio single column page as well as the single project pages. ", 'Pixelentity Theme/Plugin'), "default" => 'Subtitle here'), "icon" => array("label" => __("Icon", 'Pixelentity Theme/Plugin'), "type" => "Select", "description" => __("Select an icon which represents the contents or theme of this project. This icon will be shown on all portfolio and project pages. ", 'Pixelentity Theme/Plugin'), "options" => apply_filters("pe_theme_project_icons", array(__("Image", 'Pixelentity Theme/Plugin') => "icon-picture", __("Film", 'Pixelentity Theme/Plugin') => "icon-film", __("Video", 'Pixelentity Theme/Plugin') => "icon-facetime-video", __("Music", 'Pixelentity Theme/Plugin') => "icon-music", __("File", 'Pixelentity Theme/Plugin') => "icon-file", __("Review", 'Pixelentity Theme/Plugin') => "icon-search", __("List", 'Pixelentity Theme/Plugin') => "icon-list", __("Thumbnails", 'Pixelentity Theme/Plugin') => "icon-th", __("Book", 'Pixelentity Theme/Plugin') => "icon-book", __("Photography", 'Pixelentity Theme/Plugin') => "icon-camera", __("Typography", 'Pixelentity Theme/Plugin') => "icon-font", __("Private", 'Pixelentity Theme/Plugin') => "icon-lock", __("Info", 'Pixelentity Theme/Plugin') => "icon-info-sign", __("Event", 'Pixelentity Theme/Plugin') => "icon-calendar", __("Commentary", 'Pixelentity Theme/Plugin') => "icon-comment", __("Announcement", 'Pixelentity Theme/Plugin') => "icon-bullhorn", __("Business", 'Pixelentity Theme/Plugin') => "icon-briefcase", __("World", 'Pixelentity Theme/Plugin') => "icon-globe", __("Location", 'Pixelentity Theme/Plugin') => "icon-map-marker", __("Illustration", 'Pixelentity Theme/Plugin') => "icon-pencil", __("Person", 'Pixelentity Theme/Plugin') => "icon-user")), "default" => apply_filters("pe_theme_project_default_icon", 'icon-picture'))));
     $layouts = apply_filters("pe_theme_project_layouts", array());
     if (count($layouts) > 0) {
         $this->metabox["content"]["layout"] = array("label" => __("Layout", 'Pixelentity Theme/Plugin'), "type" => "Select", "description" => __("Select project layout.", 'Pixelentity Theme/Plugin'), "options" => $layouts, "default" => "right");
     }
     $this->metaboxFeatured = array("title" => __("Featured Project", 'Pixelentity Theme/Plugin'), "priority" => "core", "where" => array("page" => "page-portfolio"), "content" => array("featured" => array("label" => __("Project", 'Pixelentity Theme/Plugin'), "type" => "Select", "description" => __("Select the project you wish to be featured. (Shown full width at top of page)", 'Pixelentity Theme/Plugin'), "options" => array_merge(array(__("None", 'Pixelentity Theme/Plugin') => ""), $this->all), "default" => "")));
 }
 public function getContent(&$instance)
 {
     $t =& peTheme();
     $t->template->data((object) $instance);
     $loop = $t->content->customLoop("post", empty($instance["count"]) ? 1 : intval($instance["count"]));
     $t->get_template_part("widget", "recentposts");
     if ($loop) {
         $t->content->resetLoop();
     }
 }
Example #20
0
 public function output($conf)
 {
     parent::output($conf);
     $t =& peTheme();
     $loop = $t->view->getViewLoop($conf);
     if ($loop) {
         $t->template->data($conf, $loop);
         $this->template();
     }
 }
Example #21
0
 public function __construct()
 {
     $this->all = array_merge(peTheme()->sidebar->option());
     $this->fields = new stdClass();
     $this->fields->sidebar = array("label" => __("Sidebar", 'Pixelentity Theme/Plugin'), "type" => "SelectPlain", "section" => __("General", 'Pixelentity Theme/Plugin'), "description" => __("Select which sidebar to use", 'Pixelentity Theme/Plugin'), "options" => $this->all, "default" => "default");
     $this->metabox = array("type" => "Plain", "title" => __("Sidebar", 'Pixelentity Theme/Plugin'), "context" => "side", "priority" => "core", "where" => array("post" => "all"), "content" => array("value" => $this->fields->sidebar));
     $this->metaboxFooter = array("title" => __("Footer", 'Pixelentity Theme/Plugin'));
     $this->metaboxFooter = array_merge($this->metabox, $this->metaboxFooter);
     $this->metaboxFooter["content"]["value"]["options"] = peTheme()->sidebar->option();
     $this->metaboxFooter["content"]["value"]["default"] = "footer";
 }
 public function __construct($master)
 {
     parent::__construct($master);
     $this->trigger = "contentbox";
     $this->group = __("LAYOUT", 'Pixelentity Theme/Plugin');
     $this->name = __("Content Box", 'Pixelentity Theme/Plugin');
     $this->description = __("Add Content Box", 'Pixelentity Theme/Plugin');
     $this->fields = array("background" => array("label" => __("Background Color", 'Pixelentity Theme/Plugin'), "type" => "Color", "description" => __("Select background color for the content box.", 'Pixelentity Theme/Plugin'), "default" => ""), "padding" => array("label" => __("Content Padding", 'Pixelentity Theme/Plugin'), "type" => "Text", "description" => __("Content padding: Top, Right, Bottom, Left.", 'Pixelentity Theme/Plugin'), "default" => "10px 10px 10px 10px"), "content" => array("label" => __("Box Content", 'Pixelentity Theme/Plugin'), "type" => "TextArea", "description" => __("Enter the box content here. Basic HTML tags are supported.", 'Pixelentity Theme/Plugin'), "default" => " content "));
     // add block level cleaning
     peTheme()->shortcode->blockLevel[] = $this->trigger;
 }
 public function __construct($master)
 {
     parent::__construct($master);
     $this->trigger = "heading";
     $this->group = __("CONTENT", 'Pixelentity Theme/Plugin');
     $this->name = __("Heading", 'Pixelentity Theme/Plugin');
     $this->description = __("Add an Alert Box", 'Pixelentity Theme/Plugin');
     $this->fields = array("text" => array("label" => __("Text", 'Pixelentity Theme/Plugin'), "type" => "Text", "description" => __("Heading text", 'Pixelentity Theme/Plugin')));
     // add block level cleaning
     peTheme()->shortcode->blockLevel[] = $this->trigger;
 }
 public function __construct($master)
 {
     parent::__construct($master);
     $this->trigger = "alert";
     $this->group = __("LAYOUT", 'Pixelentity Theme/Plugin');
     $this->name = __("Alert Box", 'Pixelentity Theme/Plugin');
     $this->description = __("Add an Alert Box", 'Pixelentity Theme/Plugin');
     $this->fields = array("type" => array("label" => __("Alert Box Type", 'Pixelentity Theme/Plugin'), "type" => "Select", "description" => __("Select the type of Alert Box required. The alert type determines the color of the box and text", 'Pixelentity Theme/Plugin'), "options" => array(__("Default", 'Pixelentity Theme/Plugin') => "default", __("Primary", 'Pixelentity Theme/Plugin') => "primary", __("Info", 'Pixelentity Theme/Plugin') => "info", __("Success", 'Pixelentity Theme/Plugin') => "success", __("Warning", 'Pixelentity Theme/Plugin') => "warning", __("Danger", 'Pixelentity Theme/Plugin') => "danger", __("Inverse", 'Pixelentity Theme/Plugin') => "inverse"), "default" => "default"), "display" => array("label" => __("Alert Box Layout", 'Pixelentity Theme/Plugin'), "type" => "Select", "description" => __("Select the layout based on what type of content the box will hold, inline content or block content", 'Pixelentity Theme/Plugin'), "options" => array(__("Block", 'Pixelentity Theme/Plugin') => "block", __("Inline", 'Pixelentity Theme/Plugin') => "inline"), "default" => "block"), "content" => array("label" => __("Content", 'Pixelentity Theme/Plugin'), "type" => "TextArea", "description" => __("Enter the Alert Box content here ( Basic HTML supported ).", 'Pixelentity Theme/Plugin')));
     // add block level cleaning
     peTheme()->shortcode->blockLevel[] = $this->trigger;
 }
 public function __construct($master)
 {
     parent::__construct($master);
     $this->trigger = "alert";
     $this->group = __("LAYOUT", 'Pixelentity Theme/Plugin');
     $this->name = __("Alert Box", 'Pixelentity Theme/Plugin');
     $this->description = __("Add an Alert Box", 'Pixelentity Theme/Plugin');
     $this->fields = array("type" => array("label" => __("Alert Box Type", 'Pixelentity Theme/Plugin'), "type" => "Select", "description" => __("Select the type of Alert Box required. The alert type determines the color of the box and text", 'Pixelentity Theme/Plugin'), "options" => array(__("Info", 'Pixelentity Theme/Plugin') => "info", __("Success", 'Pixelentity Theme/Plugin') => "success", __("Error", 'Pixelentity Theme/Plugin') => "error", __("Notice", 'Pixelentity Theme/Plugin') => "notice"), "default" => "default"), "content" => array("label" => __("Content", 'Pixelentity Theme/Plugin'), "type" => "TextArea", "description" => __("Enter the Alert Box content here ( Basic HTML supported ).", 'Pixelentity Theme/Plugin')));
     // add block level cleaning
     peTheme()->shortcode->blockLevel[] = $this->trigger;
 }
 public function output($atts, $content = null, $code = "")
 {
     extract(shortcode_atts(array('id' => ''), $atts));
     if (!$id) {
         return "";
     }
     $t =& peTheme();
     ob_start();
     $t->video->output($id);
     $content = ob_get_clean();
     return $content;
 }
 public function output($conf)
 {
     $v =& peTheme()->view;
     if (empty($conf->settings->builder["items"])) {
         return;
     }
     echo apply_filters("pe_theme_view_layout_open", sprintf('<div class="pe-block pe-view-layout pe-view-%s">', $conf->id), $conf->id);
     foreach ($conf->settings->builder["items"] as $item) {
         $v->outputModule($item);
     }
     echo apply_filters("pe_theme_view_layout_close", '</div>', $conf->id);
 }
Example #28
0
 public function __construct()
 {
     $this->all = peTheme()->gallery->option();
     $this->id = array("label" => __("Use Gallery", 'Pixelentity Theme/Plugin'), "type" => "Select", "description" => __("Select which gallery to use as content. For a gallery to appear in this list it must first be created. See the help documentation section on 'Creating a Gallery Custom Post Type'", 'Pixelentity Theme/Plugin'), "options" => $this->all, "default" => "");
     $this->metaboxSlider = array("title" => __("Slider Options", 'Pixelentity Theme/Plugin'), "priority" => "core", "where" => array("page" => "page-home"), "content" => array("id" => $this->id));
     $mbc =& $this->metaboxSlider["content"];
     if (isset($sliderOptions)) {
         $this->metaboxSlider["content"] =& array_merge($mbc, $sliderOptions);
         $mbc =& $this->metaboxSlider["content"];
     }
     $mbc["delay"] = array("label" => __("Delay", 'Pixelentity Theme/Plugin'), "type" => "Select", "description" => __("Time in seconds before the slider rotates to next slide", 'Pixelentity Theme/Plugin'), "options" => PeGlobal::$const->data->delay, "default" => 0);
 }
Example #29
0
 public function output($conf)
 {
     $v =& peTheme()->view;
     if (empty($conf->settings->builder["items"])) {
         return;
     }
     printf('<div class="pe-block pe-view-layout pe-view-%s">', $conf->id);
     foreach ($conf->settings->builder["items"] as $item) {
         $v->outputModule($item);
     }
     echo "</div>";
 }
 public function output($conf)
 {
     $settings = (object) $conf["data"];
     printf('<div class="pe-block pe-container%s">', $settings->margin === "no" ? " nomargin" : "");
     peTheme()->video->output($settings->id);
     /*
     $settings->view = "Video";
     $settings->data = (object) array("id" => $settings->id);
     peTheme()->view->resize($settings);
     */
     print "</div>";
 }