当前位置: 首页>>代码示例>>PHP>>正文


PHP ReduxFramework类代码示例

本文整理汇总了PHP中ReduxFramework的典型用法代码示例。如果您正苦于以下问题:PHP ReduxFramework类的具体用法?PHP ReduxFramework怎么用?PHP ReduxFramework使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了ReduxFramework类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: load

 public function load()
 {
     $redux = new ReduxFramework();
     $redux->init();
     //if ( ! empty( $redux ) ) {
     $dir = ReduxFramework::$_dir . '../';
     if (!ReduxFramework::$_is_plugin) {
         $errors = array();
         if (file_exists($dir . '.tx')) {
             $errors[] = ".tx/";
         }
         if (file_exists($dir . 'bin')) {
             $errors[] = "bin/";
         }
         if (file_exists($dir . 'tests')) {
             $errors[] = "tests/";
         }
         if (file_exists($dir . '.gitignore')) {
             $errors[] = ".gitignore";
         }
         if (file_exists($dir . '.git')) {
             $errors[] = ".git/";
         }
         if (file_exists($dir . 'node_modules')) {
             $errors[] = "node_modules/";
         }
         if (file_exists($dir . '.travis.yml')) {
             $errors[] = ".travis.yml";
         }
         if (file_exists($dir . 'bootstrap_tests.php')) {
             $errors[] = "bootstrap_tests.php";
         }
         if (file_exists($dir . 'phpunit.xml')) {
             $errors[] = "phpunit.xml";
         }
         if (file_exists($dir . '.ds_store')) {
             $errors[] = ".ds_store";
         }
         if (file_exists($dir . 'codestyles')) {
             $errors[] = "codestyles/";
         }
         if (!empty($errors)) {
             ?>
                     <div class="error">
                     <p><?php 
             echo 'The following directories & files are still located in your <strong>Redux</strong>  directory. They may cause errors in Theme-Check.';
             echo '<br /><ul style="margin-left:15px;">';
             foreach ($errors as $error) {
                 echo '<li><strong>~/' . $error . '</strong></li>';
             }
             ?>
                         </ul></p></div><?php 
         }
     }
 }
开发者ID:rinodung,项目名称:live-theme,代码行数:55,代码来源:class.redux_themecheck.php

示例2: array

 /**
  * Field Constructor.
  *
  * Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
  *
  * @since ReduxFramework 3.0.0
  */
 function __construct($field = array(), $value = '', $parent)
 {
     parent::__construct($parent->sections, $parent->args);
     $this->field = $field;
     $this->value = $value;
     //$this->render();
 }
开发者ID:Bitcoinsulting,项目名称:website-ads,代码行数:14,代码来源:field_spinner.php

示例3:

 /**
  * Field Constructor.
  *
  * Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
  *
  * @since ReduxFramework 1.0.0
  */
 function __construct($field, $value, $current)
 {
     parent::__construct();
     $this->field = $field;
     $this->value = $value;
     $this->current = $current;
     $this->validate();
 }
开发者ID:neocreo,项目名称:brew,代码行数:15,代码来源:validation_html.php

示例4: array

 /**
  * Field Constructor.
  *
  * Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
  *
  * @since ReduxFramework 1.0.0
  */
 function __construct($field = array(), $value = '', $parent)
 {
     parent::__construct($parent->sections, $parent->args, $parent->extra_tabs);
     $this->field = $field;
     $this->value = $value;
     $this->googleAPIKey = $parent->args['google_api_key'];
     //$this->render();
 }
开发者ID:87surendra,项目名称:mbr,代码行数:15,代码来源:field_typography.php

示例5: isset

 /**
  * Field Constructor.
  *
  * Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
  *
  * @since ReduxFramework 1.0.0
  */
 function __construct($field, $value, $current)
 {
     parent::__construct();
     $this->field = $field;
     $this->field['msg'] = isset($this->field['msg']) ? $this->field['msg'] : __('You must not enter any special characters in this field, all special characters have been removed.', 'redux-framework');
     $this->value = $value;
     $this->current = $current;
     $this->validate();
 }
开发者ID:dreadfra,项目名称:superba,代码行数:16,代码来源:validation_no_special_chars.php

示例6: isset

 /**
  * Field Constructor.
  *
  * Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
  *
  * @since ReduxFramework 3.0.4
  */
 function __construct($field, $value, $current)
 {
     parent::__construct();
     $this->field = $field;
     $this->field['msg'] = isset($this->field['msg']) ? $this->field['msg'] : __('This field must be a valid color value.', 'redux-framework');
     $this->value = $value;
     $this->current = $current;
     $this->validate();
 }
开发者ID:neocreo,项目名称:brew,代码行数:16,代码来源:validation_color_rgba.php

示例7: __construct

 /**
  * Field Constructor.
  *
  * Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
  *
  * @since ReduxFramework 1.0.0
  */
 function __construct($field = array(), $value = '', $parent)
 {
     parent::__construct($parent->sections, $parent->args, $parent->extra_tabs);
     $this->field = $field;
     $this->value = $value;
     //$this->render();
     if (!empty($this->field['data']) && empty($this->field['options'])) {
         if (empty($this->field['args'])) {
             $this->field['args'] = array();
         }
         if ($this->field['data'] == "elusive-icons" || $this->field['data'] == "elusive-icon" || $this->field['data'] == "elusive") {
             $icons_file = ReduxFramework::$_dir . 'inc/fields/select/fontawesome-icons.php';
             $icons_file = apply_filters('redux-font-icons-file', $icons_file);
             if (file_exists($icons_file)) {
                 require_once $icons_file;
             }
         }
         $this->field['options'] = $parent->get_wordpress_data($this->field['data'], $this->field['args']);
     }
 }
开发者ID:sissisnothere,项目名称:testWeb,代码行数:27,代码来源:field_select.php

示例8: init

 public static function init()
 {
     global $wp_filesystem;
     // Windows-proof constants: replace backward by forward slashes. Thanks to: @peterbouwmeester
     self::$_dir = trailingslashit(Redux_Helpers::cleanFilePath(dirname(__FILE__)));
     $wp_content_dir = trailingslashit(Redux_Helpers::cleanFilePath(WP_CONTENT_DIR));
     $wp_content_dir = trailingslashit(str_replace('//', '/', $wp_content_dir));
     $relative_url = str_replace($wp_content_dir, '', self::$_dir);
     self::$wp_content_url = trailingslashit(Redux_Helpers::cleanFilePath(is_ssl() ? str_replace('http://', 'https://', WP_CONTENT_URL) : WP_CONTENT_URL));
     self::$_url = self::$wp_content_url . $relative_url;
     // See if Redux is a plugin or not
     if (strpos(Redux_Helpers::cleanFilePath(__FILE__), Redux_Helpers::cleanFilePath(get_stylesheet_directory())) !== false) {
         self::$_is_plugin = false;
     }
     // Create our private upload directory
     Redux_Functions::initWpFilesystem();
     self::$_upload_dir = trailingslashit($wp_filesystem->wp_content_dir()) . '/redux/';
     self::$_upload_url = trailingslashit(content_url()) . '/redux/';
     if (function_exists('sys_get_temp_dir')) {
         $tmp = sys_get_temp_dir();
         if (empty($tmp)) {
             $tmpDir = self::$_upload_url . 'tmp';
             if (file_exists($tmpDir)) {
                 Redux_Helpers::rmdir($tmpDir);
             }
             putenv('TMPDIR=' . self::$_upload_dir . 'tmp');
         }
     }
     // Ensure it exists
     if (!is_dir(self::$_upload_dir)) {
         // Create the directory
         $wp_filesystem->mkdir(self::$_upload_dir);
     }
 }
开发者ID:Ahmed-dawoud,项目名称:care4u,代码行数:34,代码来源:framework.php

示例9: init

 static function init()
 {
     // Windows-proof constants: replace backward by forward slashes. Thanks to: @peterbouwmeester
     self::$_dir = trailingslashit(Redux_Helpers::cleanFilePath(dirname(__FILE__)));
     $wp_content_dir = trailingslashit(Redux_Helpers::cleanFilePath(WP_CONTENT_DIR));
     $wp_content_dir = trailingslashit(str_replace('//', '/', $wp_content_dir));
     $relative_url = str_replace($wp_content_dir, '', self::$_dir);
     self::$wp_content_url = trailingslashit(Redux_Helpers::cleanFilePath(is_ssl() ? str_replace('http://', 'https://', WP_CONTENT_URL) : WP_CONTENT_URL));
     self::$_url = self::$wp_content_url . $relative_url;
     // See if Redux is a plugin or not
     if (strpos(Redux_Helpers::cleanFilePath(__FILE__), Redux_Helpers::cleanFilePath(get_stylesheet_directory())) !== false) {
         self::$_is_plugin = false;
     }
     // Create our private upload directory
     $upload = wp_upload_dir();
     self::$_upload_dir = Redux_Helpers::cleanFilePath($upload['basedir']) . '/redux/';
     self::$_upload_url = Redux_Helpers::cleanFilePath($upload['baseurl']) . '/redux/';
     // Ensure it exists
     if (!is_dir(self::$_upload_dir)) {
         global $wp_filesystem;
         // Init wp_filesystem
         Redux_Functions::initWpFilesystem();
         // Create the directory
         $wp_filesystem->mkdir(self::$_upload_dir);
     }
 }
开发者ID:6226,项目名称:wp,代码行数:26,代码来源:framework.php

示例10: __construct

 /**
  * Field Constructor.
  *
  * Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
  *
  * @since       1.0.0
  * @access      public
  * @return      void
  */
 public function __construct($field = array(), $value = '', $parent)
 {
     parent::__construct($parent->sections, $parent->args);
     $this->field = $field;
     $this->value = $value;
     $this->parent = $parent;
 }
开发者ID:nhatnam1102,项目名称:wp-content,代码行数:16,代码来源:field_group.php

示例11: init

 static function init()
 {
     // Windows-proof constants: replace backward by forward slashes. Thanks to: @peterbouwmeester
     self::$_dir = trailingslashit(Redux_Helpers::cleanFilePath(dirname(__FILE__)));
     $wp_content_dir = trailingslashit(Redux_Helpers::cleanFilePath(WP_CONTENT_DIR));
     $wp_content_dir = trailingslashit(str_replace('//', '/', $wp_content_dir));
     $relative_url = str_replace($wp_content_dir, '', self::$_dir);
     $wp_content_url = Redux_Helpers::cleanFilePath(is_ssl() ? str_replace('http://', 'https://', WP_CONTENT_URL) : WP_CONTENT_URL);
     self::$_url = trailingslashit($wp_content_url) . $relative_url;
     // See if Redux is a plugin or not
     if (strpos(Redux_Helpers::cleanFilePath(__FILE__), Redux_Helpers::cleanFilePath(get_stylesheet_directory())) !== false) {
         self::$_is_plugin = false;
     }
     /**
             Still need to port these.
     
                 $defaults['footer_credit']      = '<span id="footer-thankyou">' . __( 'Options panel created using', 'redux-framework') . ' <a href="' . $this->framework_url . '" target="_blank">' . __('Redux Framework', 'redux-framework') . '</a> v' . self::$_version . '</span>';
                 $defaults['help_tabs']          = array();
                 $defaults['help_sidebar']       = ''; // __( '', 'redux-framework' );
                 $defaults['database']           = ''; // possible: options, theme_mods, theme_mods_expanded, transient
                 $defaults['customizer']         = false; // setting to true forces get_theme_mod_expanded
                 $defaults['global_variable']    = '';
                 $defaults['output']             = true; // Dynamically generate CSS
                 $defaults['transient_time']     = 60 * MINUTE_IN_SECONDS;
     
                 // The defaults are set so it will preserve the old behavior.
                 $defaults['default_show']       = false; // If true, it shows the default value
                 $defaults['default_mark']       = ''; // What to print by the field's title if the value shown is default
     **/
     self::$_properties = array('args' => array('opt_name' => array('required', 'data_type' => 'string', 'label' => 'Option Name', 'desc' => 'Must be defined by theme/plugin. Is the unique key allowing multiple instance of Redux within a single Wordpress instance.', 'default' => ''), 'google_api_key' => array('data_type' => 'string', 'label' => 'Google Web Fonts API Key', 'desc' => 'Key used to request Google Webfonts. Google fonts are omitted without this.', 'default' => ''), 'last_tab' => array('data_type' => 'string', 'label' => 'Last Tab', 'desc' => 'Last tab used.', 'default' => '0'), 'menu_icon' => array('data_type' => 'string', 'label' => 'Default Menu Icon', 'desc' => 'Default menu icon used by sections when one is not specified.', 'default' => self::$_url . 'assets/img/menu_icon.png'), 'menu_title' => array('data_type' => 'string', 'label' => 'Menu Title', 'desc' => 'Label displayed when the admin menu is available.', 'default' => __('Options', 'redux-framework')), 'page_title' => array('data_type' => 'string', 'label' => 'Page Title', 'desc' => 'Title used on the panel page.', 'default' => __('Options', 'redux-framework')), 'page_icon' => array('data_type' => 'string', 'label' => 'Page Title', 'desc' => 'Icon class to be used on the options page.', 'default' => 'icon-themes'), 'page_slug' => array('required', 'data_type' => 'string', 'label' => 'Page Slug', 'desc' => 'Slug used to access options panel.', 'default' => '_options'), 'page_permissions' => array('required', 'data_type' => 'string', 'label' => 'Page Capabilities', 'desc' => 'Permissions needed to access the options panel.', 'default' => 'manage_options'), 'menu_type' => array('required', 'data_type' => 'varchar', 'label' => 'Page Type', 'desc' => 'Specify if the admin menu should appear or not.', 'default' => 'menu', 'form' => array('type' => 'select', 'options' => array('menu' => 'Admin Menu', 'submenu' => 'Submenu Only')), 'validation' => array('required')), 'page_parent' => array('required', 'data_type' => 'varchar', 'label' => 'Page Parent', 'desc' => 'Specify if the admin menu should appear or not.', 'default' => 'themes.php', 'form' => array('type' => 'select', 'options' => array('index.php' => 'Dashboard', 'edit.php' => 'Posts', 'upload.php' => 'Media', 'link-manager.php' => 'Links', 'edit.php?post_type=page' => 'pages', 'edit-comments.php' => 'Comments', 'themes.php' => 'Appearance', 'plugins.php' => 'Plugins', 'users.php' => 'Users', 'tools.php' => 'Tools', 'options-general.php' => 'Settings')), 'validation' => array('required')), 'page_priority' => array('type' => 'int', 'label' => 'Page Position', 'desc' => 'Location where this menu item will appear in the admin menu. Warning, beware of overrides.', 'default' => null), 'output' => array('required', 'data_type' => 'bool', 'form' => array('type' => 'radio', 'options' => array(true => 'Enabled', false => 'Disabled')), 'label' => 'Output/Generate CSS', 'desc' => 'Global shut-off for dynamic CSS output by the framework', 'default' => true), 'allow_sub_menu' => array('data_type' => 'bool', 'form' => array('type' => 'radio', 'options' => array(true => 'Enabled', false => 'Disabled')), 'label' => 'Allow Submenu', 'desc' => 'Turn on or off the submenu that will typically be shown under Appearance.', 'default' => true), 'show_import_export' => array('data_type' => 'bool', 'form' => array('type' => 'radio', 'options' => array(true => 'Show', false => 'Hide')), 'label' => 'Show Import/Export', 'desc' => 'Show/Hide the import/export tab.', 'default' => true), 'dev_mode' => array('data_type' => 'bool', 'form' => array('type' => 'radio', 'options' => array(true => 'Enabled', false => 'Disabled')), 'label' => 'Developer Mode', 'desc' => 'Turn on or off the dev mode tab.', 'default' => false), 'system_info' => array('data_type' => 'bool', 'form' => array('type' => 'radio', 'options' => array(true => 'Enabled', false => 'Disabled')), 'label' => 'System Info', 'desc' => 'Turn on or off the system info tab.', 'default' => false)));
 }
开发者ID:patlegris,项目名称:angularpresstheme,代码行数:31,代码来源:framework.php

示例12: __construct

 /**
  * Field Constructor.
  *
  * Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
  *
  * @since       1.0.0
  * @access      public
  * @return      void
  */
 public function __construct($field = array(), $value = '', $parent)
 {
     parent::__construct($parent->sections, $parent->args);
     $this->field = $field;
     $this->value = $value;
     $this->add_text = isset($this->field['add_text']) ? $this->field['add_text'] : __('Add More', 'redux-framework');
     $this->show_empty = isset($this->field['show_empty']) ? $this->field['show_empty'] : true;
 }
开发者ID:mdb-webdev,项目名称:ReduxCore,代码行数:17,代码来源:field_multi_text.php

示例13: array

 /**
  * Field Constructor.
  * Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
  * @since Redux_Options 1.0.0
  */
 function __construct($field = array(), $value = '', $parent)
 {
     parent::__construct($parent->sections, $parent->args);
     $this->field = $field;
     $this->value = $value;
     if (!is_array($this->value) && isset($this->field['options'])) {
         $this->value = $this->field['options'];
     }
 }
开发者ID:Bitcoinsulting,项目名称:website-ads,代码行数:14,代码来源:field_sorter.php

示例14: init

 static function init()
 {
     // Windows-proof constants: replace backward by forward slashes. Thanks to: @peterbouwmeester
     self::$_dir = trailingslashit(Redux_Helpers::cleanFilePath(dirname(__FILE__)));
     $wp_content_dir = trailingslashit(Redux_Helpers::cleanFilePath(WP_CONTENT_DIR));
     $wp_content_dir = trailingslashit(str_replace('//', '/', $wp_content_dir));
     $relative_url = '/themeoptions/';
     self::$wp_content_url = trailingslashit(Redux_Helpers::cleanFilePath(is_ssl() ? str_replace('http://', 'https://', WP_CONTENT_URL) : WP_CONTENT_URL));
     self::$_url = get_template_directory_uri() . $relative_url;
 }
开发者ID:pradeep-web,项目名称:brandt,代码行数:10,代码来源:framework.php

示例15: __construct

 /**
  * Field Constructor.
  *
  * Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
  *
  * @since       1.0.0
  * @access      public
  * @return      void
  */
 public function __construct($field = array(), $value = '', $parent)
 {
     parent::__construct($parent->sections, $parent->args, $parent->extra_tabs);
     $this->field = $field;
     $this->value = $value;
     if (!empty($this->field['data']) && empty($this->field['options'])) {
         if (empty($this->field['args'])) {
             $this->field['args'] = array();
         }
         $this->field['options'] = $parent->get_wordpress_data($this->field['data'], $this->field['args']);
     }
 }
开发者ID:87surendra,项目名称:mbr,代码行数:21,代码来源:field_checkbox.php


注:本文中的ReduxFramework类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。