示例#1
0
 public function pe_theme_metabox_config_page()
 {
     parent::pe_theme_metabox_config_page();
     $mbox = array("title" => __("Home Page Settings", 'Pixelentity Theme/Plugin'), "type" => "Conditional", "priority" => "core", "options" => array("splash" => array("yes" => array("show" => "slider,header,logo,label,link,taglines,minh,maxh,offset"), "no" => array("hide" => "slider,header,logo,label,link,taglines,minh,maxh,offset"))), "where" => array("post" => "page_builder"), "content" => array("splash" => array("label" => __("Splash Section", 'Pixelentity Theme/Plugin'), "description" => __("Whether to show the home splash section or not.", 'Pixelentity Theme/Plugin'), "type" => "RadioUI", "options" => array(__("Yes", 'Pixelentity Theme/Plugin') => "yes", __("No", 'Pixelentity Theme/Plugin') => "no"), "default" => "no"), "minh" => array("label" => __("Min Height", 'Pixelentity Theme/Plugin'), "description" => __("Minimum height (in pixel) of the splash section. Values lesser than 300 could be ignored to make sure the splash section is visible on mobile.", 'Pixelentity Theme/Plugin'), "type" => "Number", "default" => 300), "maxh" => array("label" => __("Max Height", 'Pixelentity Theme/Plugin'), "description" => __("Maximum height (in pixel) of the splash section, when 0 is used, the section will extend to fill the whole page.", 'Pixelentity Theme/Plugin'), "type" => "Number", "default" => 0), "header" => array("label" => __("Menu", 'Pixelentity Theme/Plugin'), "description" => __("Select the menu bar type.", 'Pixelentity Theme/Plugin'), "type" => "RadioUI", "options" => array(__("Normal", 'Pixelentity Theme/Plugin') => "", __("Transparent", 'Pixelentity Theme/Plugin') => "transparent")), "slider" => array("label" => __("Slider", 'Pixelentity Theme/Plugin'), "description" => __("Select a slider view to be used in home splash section.", 'Pixelentity Theme/Plugin'), "type" => "Select", "options" => $this->view->option(false, array(__("Slider", 'Pixelentity Theme/Plugin')), false), "editable" => admin_url('post.php?post=%0&action=edit')), "logo" => array("label" => __("Logo", 'Pixelentity Theme/Plugin'), "type" => "Upload", "description" => __("Logo.", 'Pixelentity Theme/Plugin'), "default" => PE_THEME_URL . '/img/skin/splash_logo.png'), "offset" => array("label" => __("Logo Offset", 'Pixelentity Theme/Plugin'), "description" => __("Logo distance (in pixel) from the splash section center. 0 means centered, a negative value will move logo up (towards the header) while a positive value will do the opposite.", 'Pixelentity Theme/Plugin'), "type" => "Number", "default" => -100), "label" => array("label" => __("Label", 'Pixelentity Theme/Plugin'), "type" => "Text", "description" => __("Label text to show when overing the logo.", 'Pixelentity Theme/Plugin'), "default" => __('START HERE', 'Pixelentity Theme/Plugin')), "link" => array("label" => __("Link", 'Pixelentity Theme/Plugin'), "type" => "Text", "description" => __("Logo link.", 'Pixelentity Theme/Plugin'), "default" => '#portfolio'), "taglines" => array("label" => __("Taglines", 'Pixelentity Theme/Plugin'), "description" => __("Add one or more taglines.", 'Pixelentity Theme/Plugin'), "type" => "Items", "button_label" => __("Add New", 'Pixelentity Theme/Plugin'), "sortable" => true, "auto" => __("Tagline %", 'Pixelentity Theme/Plugin'), "unique" => false, "editable" => false, "legend" => false, "fields" => array(array("type" => "empty", "width" => "186"), array("name" => "content", "type" => "text", "width" => "500", "default" => "")))));
     $mboxes =& PeGlobal::$config["metaboxes-page"];
     $mboxes["home"] = $mbox;
     $mboxes["bg"] = $this->mboxBG;
     if (PE_THEME_MODE && isset($mboxes["builder"]["content"]["builder"])) {
         $mboxes["builder"]["content"]["builder"]["allowed"] = "section";
     }
     if (isset($mboxes["gmap"])) {
         unset($mboxes["gmap"]);
     }
     if (isset(PeGlobal::$config["metaboxes-page"]["layout"])) {
         $fields =& PeGlobal::$config["metaboxes-page"]["layout"]["content"];
         unset($fields["fullscreen"]);
         unset($fields["headerMargin"]);
         unset($fields["footerMargin"]);
         unset($fields["footerStyle"]);
         //unset($fields["content"]);
     }
 }
 public function pe_theme_metabox_config_page()
 {
     parent::pe_theme_metabox_config_page();
     $builder = isset(PeGlobal::$config["metaboxes-page"]["builder"]) ? PeGlobal::$config["metaboxes-page"]["builder"] : false;
     $builder = $builder ? array("builder" => $builder) : array();
     if (PE_THEME_MODE && $builder) {
         // top level builder element can only member of the "section" group
         $builder["builder"]["content"]["builder"]["allowed"] = "section";
     }
     $defaultInfo = '<h2>Contact us.</h2><p>Want to make your website awesome? Just get in touch we don\'t bite.</p>';
     PeGlobal::$config["metaboxes-page"] = array_merge($builder, array('splash' => $this->splash()));
 }