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


PHP Redux_Functions::initWpFilesystem方法代码示例

本文整理汇总了PHP中Redux_Functions::initWpFilesystem方法的典型用法代码示例。如果您正苦于以下问题:PHP Redux_Functions::initWpFilesystem方法的具体用法?PHP Redux_Functions::initWpFilesystem怎么用?PHP Redux_Functions::initWpFilesystem使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Redux_Functions的用法示例。


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

示例1: __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)
 {
     global $wp_filesystem;
     $this->parent = $parent;
     $this->field = $field;
     $this->value = $value;
     // Init wp_filesystem
     Redux_Functions::initWpFilesystem();
     // Set upload dir path for google fonts
     $this->font_dir = ReduxFramework::$_upload_dir . 'google-fonts/';
     // Check for redux_google_font dir
     if (!is_dir($this->font_dir)) {
         // Create it, if not found
         $wp_filesystem->mkdir($this->font_dir, FS_CHMOD_DIR);
     }
     // Set google font file variables
     $this->google_html = $this->font_dir . 'googlefonts.html';
     $this->google_json = $this->font_dir . 'googlefonts.json';
     // Move installed googlefonts.html to upload location, if not exists
     if (!file_exists($this->google_html)) {
         $wp_filesystem->copy(ReduxFramework::$_dir . 'inc/fields/typography/googlefonts.html', $this->font_dir . 'googlefonts.html', false);
     }
     // Move installed googlefonts.json to upload location, if not exists
     if (!file_exists($this->google_json)) {
         $wp_filesystem->copy(ReduxFramework::$_dir . 'inc/fields/typography/googlefonts.json', $this->font_dir . 'googlefonts.json', false);
     }
     // Get the google array
     $this->getGoogleArray();
 }
开发者ID:EmreKarahan,项目名称:wordpress,代码行数:36,代码来源:field_typography.php

示例2: compile_sass

 public static function compile_sass($parent)
 {
     if (!empty(self::$path)) {
         require "scssphp/scss.inc.php";
         $scss = new scssc();
         $scss->setImportPaths(self::$path);
         if (!$parent->args['dev_mode']) {
             $scss->setFormatter("scss_formatter_compressed");
         }
         $new_css = '';
         foreach (self::$import as $import) {
             $new_css .= $scss->compile($import);
         }
         if ($new_css != '') {
             if ($parent->args['sass']['page_output']) {
                 echo '<style type="text/css" id="redux-' . $parent->args['opt_name'] . '">' . $new_css . '</style>';
             } else {
                 Redux_Functions::initWpFilesystem();
                 global $wp_filesystem;
                 $css_file = Redux_Helpers::cleanFilePath($parent->args['sass']['output_url'] . $parent->args['opt_name'] . '-redux.css');
                 $ret_val = $wp_filesystem->put_contents($css_file, $new_css, FS_CHMOD_FILE);
             }
         }
     }
 }
开发者ID:masterdoed,项目名称:wpmovielibrary,代码行数:25,代码来源:class.redux_sass.php

示例3: 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

示例4: setSections


//.........这里部分代码省略.........
                    <?php 
            if ($screenshot) {
                ?>
                        <?php 
                if (current_user_can('edit_theme_options')) {
                    ?>
                            <a href="<?php 
                    echo wp_customize_url();
                    ?>
"
		class="load-customize hide-if-no-customize"
		title="<?php 
                    echo esc_attr($customize_title);
                    ?>
"> <img
		src="<?php 
                    echo esc_url($screenshot);
                    ?>
"
		alt="<?php 
                    esc_attr_e('Current theme preview', 'redux-framework-demo');
                    ?>
" />
	</a>
                        <?php 
                }
                ?>
                        <img class="hide-if-customize"
		src="<?php 
                echo esc_url($screenshot);
                ?>
"
		alt="<?php 
                esc_attr_e('Current theme preview', 'redux-framework-demo');
                ?>
" />
                    <?php 
            }
            ?>

                    <h4><?php 
            echo $this->theme->display('Name');
            ?>
</h4>

	<div>
		<ul class="theme-info">
			<li><?php 
            printf(__('By %s', 'redux-framework-demo'), $this->theme->display('Author'));
            ?>
</li>
			<li><?php 
            printf(__('Version %s', 'redux-framework-demo'), $this->theme->display('Version'));
            ?>
</li>
			<li><?php 
            echo '<strong>' . __('Tags', 'redux-framework-demo') . ':</strong> ';
            printf($this->theme->display('Tags'));
            ?>
</li>
		</ul>
		<p class="theme-description"><?php 
            echo $this->theme->display('Description');
            ?>
</p>
                        <?php 
            if ($this->theme->parent()) {
                printf(' <p class="howto">' . __('This <a href="%1$s">child theme</a> requires its parent theme, %2$s.', 'redux-framework-demo') . '</p>', __('http://codex.wordpress.org/Child_Themes', 'redux-framework-demo'), $this->theme->parent()->display('Name'));
            }
            ?>

                    </div>
</div>

<?php 
            $item_info = ob_get_contents();
            ob_end_clean();
            $sampleHTML = '';
            if (file_exists(dirname(__FILE__) . '/info-html.html')) {
                Redux_Functions::initWpFilesystem();
                global $wp_filesystem;
                $sampleHTML = $wp_filesystem->get_contents(dirname(__FILE__) . '/info-html.html');
            }
            // ACTUAL DECLARATION OF SECTIONS
            $this->sections[] = array('title' => __('Settings', 'redux-framework-demo'), 'desc' => __('Redux Framework was created with the developer in mind. It allows for any theme developer to have an advanced theme panel with most of the features a developer would need. For more information check out the Github repo at: <a href="https://github.com/ReduxFramework/Redux-Framework">https://github.com/ReduxFramework/Redux-Framework</a>', 'redux-framework-demo'), 'icon' => 'el-icon-home', 'fields' => array(array('id' => 'logo', 'type' => 'media', 'title' => __('Logo', 'redux-framework-demo'), 'compiler' => 'true', 'mode' => false, 'desc' => __('Upload Logo.', 'redux-framework-demo'), 'subtitle' => __('Upload any media using the WordPress native uploader', 'redux-framework-demo'), 'hint' => array('content' => 'This is for<b>logo</b> Dark for highlighting in white background.')), array('id' => 'favicon', 'type' => 'media', 'title' => __('Favicon', 'redux-framework-demo'), 'compiler' => 'true', 'mode' => false, 'desc' => __('Upload Favicon Image.', 'redux-framework-demo'), 'subtitle' => __('Upload any media using the WordPress native uploader', 'redux-framework-demo'), 'hint' => array('content' => 'This is a <b>hint</b> tool-tip for the favicon upload field.')), array('id' => 'loader', 'type' => 'switch', 'title' => __('Loader Hide', 'redux-framework-demo'), 'subtitle' => __('Loader Hide Enable', 'redux-framework-demo'), 'desc' => __('Enable to hide loader', 'redux-framework-demo'), 'default' => 0, 'off' => 'Disabled', 'on' => 'Enabled'), array('id' => 'copyright', 'type' => 'editor', 'wpautop' => true, 'compiler' => 'true', 'title' => __('Copyright text of the WebSite', 'bautySpa'), 'subtitle' => __('Write a Copyright text of your WebSite', 'bautySpa'), 'default' => 'Powered by bautySpa.', 'args' => array('teeny' => true, 'textarea_rows' => 10)), array('id' => 'style_switcher', 'type' => 'select', 'title' => __('Select Css File', 'bautySpa'), 'subtitle' => __('Select Your Website Css File.', 'bautySpa'), 'options' => array('style1' => __('Light 1', 'bautySpa'), 'style2' => __('Light 2', 'bautySpa'), 'style3' => __('Light 3', 'bautySpa'), 'style4' => __('Light 4', 'bautySpa'), 'style5' => __('Light 5', 'bautySpa'), 'style1D' => __('Dark 1', 'bautySpa'), 'style2D' => __('Dark 2', 'bautySpa'), 'style3D' => __('Dark 3', 'bautySpa'), 'style4D' => __('Dark 4', 'bautySpa'), 'style5D' => __('Dark 5', 'bautySpa')), 'default' => 'style1'), array('id' => 'theme_switcher', 'type' => 'select', 'title' => __('Select Theme', 'bautySpa'), 'subtitle' => __('Select Your Desire Theme.', 'bautySpa'), 'options' => array('default' => __('Normal Version', 'bautySpa'), 'para' => __('Paralax Version', 'bautySpa')), 'default' => 'default'), array('id' => 'blog-page-details-head', 'type' => 'textarea', 'title' => __('Blog Detail Page Heading', 'redux-framework-demo'), 'subtitle' => __('Specify the Blog Detail Page Heading.', 'redux-framework-demo'), 'default' => 'BLOG DETAILS'), array('id' => 'blog-details-head-para', 'type' => 'media', 'title' => __('Blog Detail Page Paralax', 'redux-framework-demo'), 'compiler' => 'true', 'mode' => false, 'desc' => __('Blog Detail Page Paralax Image.', 'redux-framework-demo'), 'subtitle' => __('Upload any media using the WordPress native uploader', 'redux-framework-demo'), 'hint' => array('content' => 'This is a <b>hint</b> tool-tip for the Blog Detail Page Paralax Image.'))));
            $this->sections[] = array('type' => 'divide');
            $theme_info = '<div class="redux-framework-section-desc">';
            $theme_info .= '<p class="redux-framework-theme-data description theme-uri">' . __('<strong>Theme URL:</strong> ', 'redux-framework-demo') . '<a href="' . $this->theme->get('ThemeURI') . '" target="_blank">' . $this->theme->get('ThemeURI') . '</a></p>';
            $theme_info .= '<p class="redux-framework-theme-data description theme-author">' . __('<strong>Author:</strong> ', 'redux-framework-demo') . $this->theme->get('Author') . '</p>';
            $theme_info .= '<p class="redux-framework-theme-data description theme-version">' . __('<strong>Version:</strong> ', 'redux-framework-demo') . $this->theme->get('Version') . '</p>';
            $theme_info .= '<p class="redux-framework-theme-data description theme-description">' . $this->theme->get('Description') . '</p>';
            $tabs = $this->theme->get('Tags');
            if (!empty($tabs)) {
                $theme_info .= '<p class="redux-framework-theme-data description theme-tags">' . __('<strong>Tags:</strong> ', 'redux-framework-demo') . implode(', ', $tabs) . '</p>';
            }
            $theme_info .= '</div>';
            $this->sections[] = array('title' => __('Import / Export', 'redux-framework-demo'), 'desc' => __('Import and Export your Redux Framework settings from file, text or URL.', 'redux-framework-demo'), 'icon' => 'el-icon-refresh', 'fields' => array(array('id' => 'opt-import-export', 'type' => 'import_export', 'title' => 'Import Export', 'subtitle' => 'Save and restore your Redux options', 'full_width' => false)));
            $this->sections[] = array('type' => 'divide');
            $this->sections[] = array('icon' => 'el-icon-info-sign', 'title' => __('Theme Information', 'redux-framework-demo'), 'desc' => __('<p class="description">This is the Description. Again HTML is allowed</p>', 'redux-framework-demo'), 'fields' => array(array('id' => 'opt-raw-info', 'type' => 'raw', 'content' => $item_info)));
        }
开发者ID:lmacwan,项目名称:BreastPlasticSuregon_WP,代码行数:101,代码来源:sample-config.php

示例5: setSections

        public function setSections()
        {
            /**
                          Used within different fields. Simply examples. Search for ACTUAL DECLARATION for field examples
                         * */
            // Background Patterns Reader
            //if (is_dir($sample_patterns_path) || is_dir($sample_patterns_path) ) :
            // endif;
            ob_start();
            $ct = wp_get_theme();
            $this->theme = $ct;
            $item_name = $this->theme->get('Name');
            $tags = $this->theme->Tags;
            $screenshot = $this->theme->get_screenshot();
            $class = $screenshot ? 'has-screenshot' : '';
            $customize_title = sprintf(__('Customize &#8220;%s&#8221;', 'be-themes'), $this->theme->display('Name'));
            ?>
            <div id="current-theme" class="<?php 
            echo esc_attr($class);
            ?>
">
            <?php 
            if ($screenshot) {
                ?>
                <?php 
                if (current_user_can('edit_theme_options')) {
                    ?>
                        <a href="<?php 
                    echo wp_customize_url();
                    ?>
" class="load-customize hide-if-no-customize" title="<?php 
                    echo esc_attr($customize_title);
                    ?>
">
                            <img src="<?php 
                    echo esc_url($screenshot);
                    ?>
" alt="<?php 
                    esc_attr_e('Current theme preview');
                    ?>
" />
                        </a>
                <?php 
                }
                ?>
                    <img class="hide-if-customize" src="<?php 
                echo esc_url($screenshot);
                ?>
" alt="<?php 
                esc_attr_e('Current theme preview');
                ?>
" />
                <?php 
            }
            ?>

                <h4><?php 
            echo $this->theme->display('Name');
            ?>
</h4>

                <div>
                    <ul class="theme-info">
                        <li><?php 
            printf(__('By %s', 'be-themes'), $this->theme->display('Author'));
            ?>
</li>
                        <li><?php 
            printf(__('Version %s', 'be-themes'), $this->theme->display('Version'));
            ?>
</li>
                        <li><?php 
            echo '<strong>' . __('Tags', 'be-themes') . ':</strong> ';
            printf($this->theme->display('Tags'));
            ?>
</li>
                    </ul>
                    <p class="theme-description"><?php 
            echo $this->theme->display('Description');
            ?>
</p>
            <?php 
            if ($this->theme->parent()) {
                printf(' <p class="howto">' . __('This <a href="%1$s">child theme</a> requires its parent theme, %2$s.') . '</p>', __('http://codex.wordpress.org/Child_Themes', 'be-themes'), $this->theme->parent()->display('Name'));
            }
            ?>

                </div>
            </div>

            <?php 
            $item_info = ob_get_contents();
            ob_end_clean();
            $sampleHTML = '';
            if (file_exists(dirname(__FILE__) . '/info-html.html')) {
                Redux_Functions::initWpFilesystem();
                global $wp_filesystem;
                $sampleHTML = $wp_filesystem->get_contents(dirname(__FILE__) . '/info-html.html');
            }
            $title_font = "Lato";
//.........这里部分代码省略.........
开发者ID:leloulight,项目名称:monero,代码行数:101,代码来源:be-themes-update-config.php

示例6: setSections


//.........这里部分代码省略.........
            $customize_title = sprintf(__('Customize &#8220;%s&#8221;', 'bootstrapwp'), $this->theme->display('Name'));
            ?>
                <div id="current-theme" class="<?php 
            echo esc_attr($class);
            ?>
">
                    <?php 
            if ($screenshot) {
                ?>
                        <?php 
                if (current_user_can('edit_theme_options')) {
                    ?>
                            <a href="<?php 
                    echo wp_customize_url();
                    ?>
" class="load-customize hide-if-no-customize"
                               title="<?php 
                    echo esc_attr($customize_title);
                    ?>
">
                                <img src="<?php 
                    echo esc_url($screenshot);
                    ?>
"
                                     alt="<?php 
                    esc_attr_e('Current theme preview', 'bootstrapwp');
                    ?>
"/>
                            </a>
                        <?php 
                }
                ?>
                        <img class="hide-if-customize" src="<?php 
                echo esc_url($screenshot);
                ?>
"
                             alt="<?php 
                esc_attr_e('Current theme preview', 'bootstrapwp');
                ?>
"/>
                    <?php 
            }
            ?>

                    <h4><?php 
            echo $this->theme->display('Name');
            ?>
</h4>

                    <div>
                        <ul class="theme-info">
                            <li><?php 
            printf(__('By %s', 'bootstrapwp'), $this->theme->display('Author'));
            ?>
</li>
                            <li><?php 
            printf(__('Version %s', 'bootstrapwp'), $this->theme->display('Version'));
            ?>
</li>
                            <li><?php 
            echo '<strong>' . __('Tags', 'bootstrapwp') . ':</strong> ';
            printf($this->theme->display('Tags'));
            ?>
</li>
                        </ul>
                        <p class="theme-description"><?php 
            echo $this->theme->display('Description');
            ?>
</p>
                        <?php 
            if ($this->theme->parent()) {
                printf(' <p class="howto">' . __('This <a href="%1$s">child theme</a> requires its parent theme, %2$s.', 'bootstrapwp') . '</p>', __('http://codex.wordpress.org/Child_Themes', 'bootstrapwp'), $this->theme->parent()->display('Name'));
            }
            ?>

                    </div>
                </div>

                <?php 
            $item_info = ob_get_contents();
            ob_end_clean();
            $sampleHTML = '';
            if (file_exists(dirname(__FILE__) . '/info-html.html')) {
                Redux_Functions::initWpFilesystem();
                global $wp_filesystem;
                $sampleHTML = $wp_filesystem->get_contents(dirname(__FILE__) . '/info-html.html');
            }
            // ACTUAL DECLARATION OF SECTIONS
            //General
            $this->sections[] = array('icon' => 'el-icon-cog', 'title' => __('General', 'bootstrapwp'), 'fields' => array(array('type' => 'select', 'id' => 'css_style', 'title' => __('Theme Stylesheet', 'bootstrapwp'), 'subtitle' => __('Select your themes alternative color scheme.', 'bootstrapwp'), 'default' => 'bootstrap.min.css', 'options' => $styles), array('title' => __('Favicon', 'bootstrapwp'), 'subtitle' => __('Use this field to upload your custom favicon.', 'bootstrapwp'), 'id' => 'custom_favicon', 'default' => '', 'type' => 'media', 'url' => true)));
            // Header
            $this->sections[] = array('icon' => 'el-icon-website', 'title' => __('Header', 'bootstrapwp'), 'fields' => array(array('title' => __('Fixed Navbar', 'bootstrapwp'), 'subtitle' => __('Select to enable/disable a fixed navbar.', 'bootstrapwp'), 'id' => 'disable_fixed_navbar', 'default' => false, 'on' => __('Enable', 'bootstrapwp'), 'off' => __('Disable', 'bootstrapwp'), 'type' => 'switch'), array('title' => __('Inverse Navbar', 'bootstrapwp'), 'subtitle' => __('Select to enable/disable an inverse navbar color.', 'bootstrapwp'), 'id' => "disable_inverse_navbar", 'default' => false, 'on' => __('Enable', 'bootstrapwp'), 'off' => __('Disable', 'bootstrapwp'), 'type' => 'switch'), array('title' => __('Logo', 'bootstrapwp'), 'subtitle' => __('Use this field to upload your custom logo icon for use in the theme header. This is the icon that will be visible in mobile and animated rotation on hover at top left. (Recommended 40px x 40px)', 'bootstrapwp'), 'id' => 'custom_logo', 'default' => '', 'type' => 'media', 'url' => true), array('title' => __('Wordmark', 'bootstrapwp'), 'subtitle' => __('Use this field to upload your custom logo for use in the theme header. Will not be visible on tablets and mobile. (Recommended 200px x 50px)', 'bootstrapwp'), 'id' => 'custom_wordmark', 'default' => '', 'type' => 'media', 'url' => true)));
            //Blog
            $this->sections[] = array('icon' => 'el-icon-wordpress', 'title' => __('Blog', 'bootstrapwp'), 'fields' => array(array('title' => __('Display Meta Data', 'bootstrapwp'), 'subtitle' => __('Select to enable/disable the date and author.', 'bootstrapwp'), 'id' => 'disable_meta', 'default' => true, 'on' => __('Enable', 'bootstrapwp'), 'off' => __('Disable', 'bootstrapwp'), 'type' => 'switch'), array('title' => __('Read More Button Text', 'bootstrapwp'), 'subtitle' => __('This is the text that will replace Read More.', 'bootstrapwp'), 'id' => 'read_more_text', 'default' => 'Read More', 'type' => 'text'), array('title' => __('Make the Read More button Full Width - Block', 'bootstrapwp'), 'subtitle' => __('Enable/Disable full width button.', 'bootstrapwp'), 'id' => 'read_more_block', 'default' => true, 'on' => __('Enable', 'bootstrapwp'), 'off' => __('Disable', 'bootstrapwp'), 'type' => 'switch'), array('title' => __('Read More Button Size', 'bootstrapwp'), 'subtitle' => __('Select the Bootstrap button size you want.', 'bootstrapwp'), 'id' => 'read_more_size', 'default' => 'default', 'type' => 'select', 'options' => $btn_size), array('title' => __('Read More Button Color', 'bootstrapwp'), 'subtitle' => __('Select the Bootstrap button color you want.', 'bootstrapwp'), 'id' => 'read_more_color', 'default' => 'default', 'type' => 'select', 'options' => $btn_color), array('title' => __('Display Tags', 'bootstrapwp'), 'subtitle' => __('Select to enable/disable the post tags.', 'bootstrapwp'), 'id' => 'enable_disable_tags', 'default' => true, 'on' => __('Enable', 'bootstrapwp'), 'off' => __('Disable', 'bootstrapwp'), 'type' => 'switch')));
            //CSS
            $this->sections[] = array('icon' => 'el-icon-css', 'title' => __('CSS', 'bootstrapwp'), 'fields' => array(array('title' => __('Custom CSS', 'bootstrapwp'), 'subtitle' => __('Insert any custom CSS.', 'bootstrapwp'), 'id' => 'custom_css', 'type' => 'ace_editor', 'mode' => 'css', 'theme' => 'monokai')));
            if (file_exists(trailingslashit(dirname(__FILE__)) . 'README.html')) {
                $tabs['docs'] = array('icon' => 'el-icon-book', 'title' => __('Documentation', 'bootstrapwp'), 'content' => nl2br(file_get_contents(trailingslashit(dirname(__FILE__)) . 'README.html')));
            }
        }
开发者ID:skipshean,项目名称:bootstrapwp,代码行数:101,代码来源:redux-config.php

示例7: setSections

 public function setSections()
 {
     /**
      * Used within different fields. Simply examples. Search for ACTUAL DECLARATION for field examples
      **/
     $sampleHTML = '';
     if (file_exists(dirname(__FILE__) . '/info-html.html')) {
         Redux_Functions::initWpFilesystem();
         global $wp_filesystem;
         $sampleHTML = $wp_filesystem->get_contents(dirname(__FILE__) . '/info-html.html');
     }
     // ACTUAL DECLARATION OF SECTIONS
     $this->sections = array_merge($this->sections, WPMOLY_Settings::get_default_settings());
 }
开发者ID:masterdoed,项目名称:wpmovielibrary,代码行数:14,代码来源:class-wpmoly-redux.php

示例8: setSections


//.........这里部分代码省略.........
            $ct = wp_get_theme();
            $this->theme = $ct;
            $item_name = $this->theme->get('Name');
            $tags = $this->theme->Tags;
            $screenshot = $this->theme->get_screenshot();
            $class = $screenshot ? 'has-screenshot' : '';
            $customize_title = sprintf(__('Customize &#8220;%s&#8221;', 'kreativa'), $this->theme->display('Name'));
            ?>
            <div id="current-theme" class="<?php 
            echo esc_attr($class);
            ?>
">
            <?php 
            if ($screenshot) {
                ?>
                <?php 
                if (current_user_can('edit_theme_options')) {
                    ?>
                        <a href="<?php 
                    echo wp_customize_url();
                    ?>
" class="load-customize hide-if-no-customize" title="<?php 
                    echo esc_attr($customize_title);
                    ?>
">
                            <img src="<?php 
                    echo esc_url($screenshot);
                    ?>
" alt="<?php 
                    esc_attr_e('Current theme preview');
                    ?>
" />
                        </a>
                <?php 
                }
                ?>
                    <img class="hide-if-customize" src="<?php 
                echo esc_url($screenshot);
                ?>
" alt="<?php 
                esc_attr_e('Current theme preview');
                ?>
" />
                <?php 
            }
            ?>

                <h4><?php 
            echo $this->theme->display('Name');
            ?>
</h4>

                <div>
                    <ul class="theme-info">
                        <li><?php 
            printf(__('By %s', 'kreativa'), $this->theme->display('Author'));
            ?>
</li>
                        <li><?php 
            printf(__('Version %s', 'kreativa'), $this->theme->display('Version'));
            ?>
</li>
                        <li><?php 
            echo '<strong>' . __('Tags', 'kreativa') . ':</strong> ';
            printf($this->theme->display('Tags'));
            ?>
</li>
                    </ul>
                    <p class="theme-description"><?php 
            echo $this->theme->display('Description');
            ?>
</p>
            <?php 
            if ($this->theme->parent()) {
                printf(' <p class="howto">' . __('This <a href="%1$s">child theme</a> requires its parent theme, %2$s.') . '</p>', __('http://codex.wordpress.org/Child_Themes', 'kreativa'), $this->theme->parent()->display('Name'));
            }
            ?>

                </div>
            </div>

            <?php 
            $item_info = ob_get_contents();
            ob_end_clean();
            $sampleHTML = '';
            if (file_exists(dirname(__FILE__) . '/info-html.html')) {
                Redux_Functions::initWpFilesystem();
                global $wp_filesystem;
                $sampleHTML = $wp_filesystem->get_contents(dirname(__FILE__) . '/info-html.html');
            }
            // ACTUAL DECLARATION OF SECTIONS
            $this->sections[] = array('title' => __('General Options', 'kreativa'), 'icon' => 'el-icon-home', 'fields' => array(array('id' => 'theme-layout', 'type' => 'radio', 'title' => __('Option for Theme Layout', 'kreativa'), 'options' => array('1' => __('Wide', 'kreativa'), '2' => __('Boxed', 'kreativa')), 'default' => 1), array('id' => 'custom_color_primary', 'type' => 'color', 'title' => __('Your Custom Color(primary)', 'kreativa'), 'subtitle' => __('Select an primary custom color scheme.', 'kreativa')), array('id' => 'logo', 'type' => 'media', 'title' => __('Logo Normal', 'kreativa'), 'compiler' => 'true', 'mode' => false, 'subtitle' => __('Upload header logo for your website', 'kreativa')), array('id' => 'retinalogo', 'type' => 'media', 'title' => __('Retina Normal', 'kreativa'), 'compiler' => 'true', 'mode' => false, 'subtitle' => __('Upload header logo for your website', 'kreativa')), array('id' => 'blog_title', 'type' => 'switch', 'title' => __('Logo Text', 'kreativa'), 'subtitle' => __('Display Site Title from WP General Settings', 'kreativa'), 'default' => '1'), array('id' => 'favicon', 'type' => 'media', 'title' => __('Favicon', 'kreativa'), 'compiler' => 'true', 'mode' => false, 'subtitle' => __('Upload favicon for your website', 'kreativa')), array('id' => 'article_author', 'type' => 'switch', 'title' => __('Article Author', 'kreativa'), 'subtitle' => __('Display article author on blog post', 'kreativa'), 'default' => '1')));
            $this->sections[] = array('title' => __('Header Options', 'kreativa'), 'icon' => 'el-icon-home', 'fields' => array(array('id' => 'subtitle_text', 'type' => 'textarea', 'title' => __('Page Title Text', 'kreativa'), 'subtitle' => __('Description here will be displayed in each page along with title.', 'kreativa'), 'default' => 'Lets see more photos below about Kreativa'), array('id' => 'breadcrumb_image', 'type' => 'media', 'title' => __('Breadcrumb Image', 'kreativa'), 'default' => get_template_directory_uri() . '/assets/images/heading-bg.jpg', 'compiler' => 'true', 'mode' => false, 'subtitle' => __('Upload Breadcrumb Image', 'kreativa'))));
            $this->sections[] = array('icon' => 'el-icon-th', 'title' => __('Footer Options', 'kreativa'), 'fields' => array(array('id' => 'footer_text', 'type' => 'editor', 'title' => __('Footer Text', 'kreativa'), 'subtitle' => __('The text written here will be display in footer', 'kreativa'), 'default' => 'Copyright 2014, '), array('id' => 'footer-social', 'type' => 'switch', 'title' => __('Social Icons', 'kreativa'), 'subtitle' => __('Display social icons on footer', 'kreativa'), 'default' => '1'), array('id' => 'footer-style2', 'type' => 'switch', 'title' => __('Footer Style 2', 'kreativa'), 'subtitle' => __('Try our alternative footer style?', 'kreativa'), 'default' => '1'), array('id' => 'footer-layout', 'type' => 'image_select', 'title' => __('Option for Footer Layout', 'kreativa'), 'options' => array('1' => array('alt' => '1 Column', 'img' => ReduxFramework::$_url . 'assets/img/ft-1cl.png'), '2' => array('alt' => '2 Column', 'img' => ReduxFramework::$_url . 'assets/img/ft-2cl.png'), '3' => array('alt' => '2 Column Left', 'img' => ReduxFramework::$_url . 'assets/img/ft-2cl2.png'), '4' => array('alt' => '2 Column Right', 'img' => ReduxFramework::$_url . 'assets/img/ft-2cl3.png'), '5' => array('alt' => '2 Column Middle', 'img' => ReduxFramework::$_url . 'assets/img/ft-2cl4.png'), '6' => array('alt' => '3 Column       ', 'img' => ReduxFramework::$_url . 'assets/img/ft-3cl.png'), '7' => array('alt' => '3 Column Left', 'img' => ReduxFramework::$_url . 'assets/img/ft-3cl2.png'), '8' => array('alt' => '3 Column Right', 'img' => ReduxFramework::$_url . 'assets/img/ft-3cl3.png'), '9' => array('alt' => '3 Column middle', 'img' => ReduxFramework::$_url . 'assets/img/ft-3cl4.png'), '10' => array('alt' => '4 Column      ', 'img' => ReduxFramework::$_url . 'assets/img/ft-4cl.png')), 'default' => '2'), array('id' => 'footer-on', 'type' => 'switch', 'title' => __('Display Footer', 'kreativa'), 'subtitle' => __('You can hide/show footer.', 'kreativa'), 'default' => '1'), array('id' => 'secondfooter-on', 'type' => 'switch', 'title' => __('Display Secondary Footer', 'kreativa'), 'subtitle' => __('You can hide/show secondary footer.', 'kreativa'), 'default' => '1')));
            $this->sections[] = array('title' => __('Page Options', 'kreativa'), 'icon' => 'el-icon-home', 'fields' => array(array('id' => 'portfolio-layout', 'type' => 'select', 'multi' => false, 'title' => __('Portfolio Page Style', 'kreativa'), 'subtitle' => __('Choose the style of portfolio page', 'kreativa'), 'options' => array('3' => '3 Columns Layout', '4' => '4 Columns Layout'), 'default' => array('3')), array('id' => 'portfolio_related', 'type' => 'switch', 'title' => __('Display Realted Projects', 'kreativa'), 'subtitle' => __('You can hide/show related projects.', 'kreativa'), 'default' => '1'), array('id' => 'related_title', 'type' => 'text', 'title' => __('Title for Related Projects', 'kreativa'), 'subtitle' => __('Text will be displayed as a title of related projects.', 'kreativa'), 'default' => __('SIMILAR PROJECTS', 'kreativa')), array('id' => 'related_subtitle', 'type' => 'text', 'title' => __('Subtitle for Related Projects', 'kreativa'), 'subtitle' => __('Text will be displayed as a subtitle of related projects.', 'kreativa'), 'default' => __('THIS IS A SUBTITLE, IN THIS CASE IT SHOWS OUR SERVICE TITLE', 'kreativa')), array('id' => '404_text', 'type' => 'text', 'title' => __('404 Error Description', 'kreativa'), 'subtitle' => __('Text will be displayed in Not Found page with 404 error.', 'kreativa'), 'default' => __('404 error.', 'kreativa'))));
            $this->sections[] = array('icon' => 'el-icon-bullhorn', 'title' => __('Social Icons', 'kreativa'), 'desc' => __('<p class="description">You need to provide social details to display the social icons on footer.</p>', 'kreativa'), 'fields' => array(array('id' => 'social_facebook', 'type' => 'text', 'title' => __('Facebook URL', 'kreativa'), 'validate' => 'url'), array('id' => 'social_twitter', 'type' => 'text', 'title' => __('Twitter URL', 'kreativa'), 'validate' => 'url'), array('id' => 'google', 'type' => 'text', 'title' => __('Google Plus URL', 'kreativa'), 'validate' => 'url'), array('id' => 'github', 'type' => 'text', 'title' => __('Github URL', 'kreativa'), 'validate' => 'url'), array('id' => 'behance', 'type' => 'text', 'title' => __('Behance URL', 'kreativa'), 'validate' => 'url'), array('id' => 'pinterest', 'type' => 'text', 'title' => __('Pinterest URL', 'kreativa'), 'validate' => 'url')));
            $this->sections[] = array('icon' => 'el-icon-signal', 'title' => __('SEO options', 'kreativa'), 'desc' => __('<p class="description">We consider your online presense.</p>', 'kreativa'), 'fields' => array(array('id' => 'meta_javascript', 'type' => 'textarea', 'title' => __('Tracking Code', 'kreativa'), 'subtitle' => __('Paste your <b>Google Analytics</b> (or other) tracking code here. This will be added into the footer template of your theme.', 'kreativa')), array('id' => 'meta_head', 'type' => 'textarea', 'title' => __('Meta Heading', 'kreativa'), 'validate' => 'no_html'), array('id' => 'meta_author', 'type' => 'text', 'title' => __('Meta Author', 'kreativa')), array('id' => 'meta_desc', 'type' => 'textarea', 'title' => __('Meta Description', 'kreativa'), 'validate' => 'no_html'), array('id' => 'meta_keyword', 'type' => 'textarea', 'title' => __('Meta Keyword', 'kreativa'), 'validate' => 'no_html', 'subtitle' => __('Enter the wordpress seperated by comma.', 'kreativa'))));
            $this->sections[] = array('icon' => 'el-icon-check', 'title' => __('Custom CSS', 'kreativa'), 'desc' => __('<p class="description">You can add custom CSS to override existing theme design.</p>', 'kreativa'), 'fields' => array(array('id' => 'extra-css', 'type' => 'ace_editor', 'title' => __('CSS Code', 'kreativa'), 'subtitle' => __('Paste your CSS code here.', 'kreativa'), 'mode' => 'css', 'theme' => 'monokai', 'desc' => 'Possible modes can be found at <a href="http://ace.c9.io" target="_blank">http://ace.c9.io/</a>.')));
            $this->sections[] = array('title' => __('Import / Export', 'kreativa'), 'desc' => __('Import and Export your Redux Framework settings from file, text or URL.', 'kreativa'), 'icon' => 'el-icon-refresh', 'fields' => array(array('id' => 'opt-import-export', 'type' => 'import_export', 'title' => 'Import Export', 'subtitle' => 'Save and restore your Redux options', 'full_width' => false)));
        }
开发者ID:rafinkarki,项目名称:My_Themes,代码行数:101,代码来源:themeoption-config.php

示例9: setSections


//.........这里部分代码省略.........
            $class = $screenshot ? 'has-screenshot' : '';
            $customize_title = sprintf(__('Customize &#8220;%s&#8221;', 'awaken'), $this->theme->display('Name'));
            ?>
                <div id="current-theme" class="<?php 
            echo esc_attr($class);
            ?>
">
                    <?php 
            if ($screenshot) {
                ?>
                        <?php 
                if (current_user_can('edit_theme_options')) {
                    ?>
                            <a href="<?php 
                    echo wp_customize_url();
                    ?>
" class="load-customize hide-if-no-customize"
                               title="<?php 
                    echo esc_attr($customize_title);
                    ?>
">
                                <img src="<?php 
                    echo esc_url($screenshot);
                    ?>
"
                                     alt="<?php 
                    esc_attr_e('Current theme preview');
                    ?>
"/>
                            </a>
                        <?php 
                }
                ?>
                        <img class="hide-if-customize" src="<?php 
                echo esc_url($screenshot);
                ?>
"
                             alt="<?php 
                esc_attr_e('Current theme preview');
                ?>
"/>
                    <?php 
            }
            ?>

                    <h4><?php 
            echo $this->theme->display('Name');
            ?>
</h4>

                    <div>
                        <ul class="theme-info">
                            <li><?php 
            printf(__('By %s', 'awaken'), $this->theme->display('Author'));
            ?>
</li>
                            <li><?php 
            printf(__('Version %s', 'awaken'), $this->theme->display('Version'));
            ?>
</li>
                            <li><?php 
            echo '<strong>' . __('Tags', 'awaken') . ':</strong> ';
            printf($this->theme->display('Tags'));
            ?>
</li>
                        </ul>
                        <p class="theme-description"><?php 
            echo $this->theme->display('Description');
            ?>
</p>
                        <?php 
            if ($this->theme->parent()) {
                printf(' <p class="howto">' . __('This <a href="%1$s">child theme</a> requires its parent theme, %2$s.') . '</p>', __('http://codex.wordpress.org/Child_Themes', 'awaken'), $this->theme->parent()->display('Name'));
            }
            ?>

                    </div>
                </div>

                <?php 
            $item_info = ob_get_contents();
            ob_end_clean();
            $sampleHTML = '';
            if (file_exists(dirname(__FILE__) . '/info-html.html')) {
                Redux_Functions::initWpFilesystem();
                global $wp_filesystem;
                $sampleHTML = $wp_filesystem->get_contents(dirname(__FILE__) . '/info-html.html');
            }
            // ACTUAL DECLARATION OF SECTIONS
            $this->sections[] = array('title' => __('General Settings', 'awaken'), 'desc' => __('Use this tab to set the general settings of your site', 'awaken'), 'icon' => 'el-icon-cogs', 'fields' => array(array('id' => 'logo-uploader', 'type' => 'media', 'url' => true, 'title' => __('Logo', 'awaken'), 'compiler' => 'true', 'desc' => __('Make sure that you have selected the option below to display the logo.', 'awaken'), 'subtitle' => __('Upload a logo for your website. Recommended height for your logo is 135px.', 'awaken'), 'default' => array('url' => get_template_directory_uri() . '/images/logo.png')), array('id' => 'pro-general', 'type' => 'info', 'style' => 'success', 'title' => __('<a href="http://www.themezhut.com/themes/awaken-pro" target="_blank">Upgrade to Pro</a>', 'awaken'), 'desc' => __('Pro Version Comes with Layout Options, Unlimited Colors, Post Options, Unlimited Sidebars etc.', 'awaken')), array('id' => 'site-title-option', 'type' => 'radio', 'title' => __('Display Site Title / Logo', 'awaken'), 'subtitle' => __('Choose your preffered option.', 'awaken'), 'options' => array('text-only' => 'Display site title and description only.', 'logo-only' => 'Display logo only.', 'text-logo' => 'Display both logo and text.', 'title-none' => 'Display none.'), 'default' => 'text-only'), array('id' => 'excerpt-more', 'type' => 'textarea', 'title' => __('Read more text', 'awaken'), 'subtitle' => __('Give a read more text for posts.', 'awaken'), 'desc' => __('You can use html if you want.', 'awaken'), 'validate' => 'html', 'default' => '[...]'), array('id' => 'favicon-display-checkbox', 'type' => 'switch', 'title' => __('Show Favicon', 'awaken'), 'subtitle' => __('Choose your preferred option.', 'awaken'), 'default' => '0'), array('id' => 'section-media-start', 'type' => 'section', 'title' => __('Favicon', 'awaken'), 'indent' => true, 'required' => array('favicon-display-checkbox', "=", 1)), array('id' => 'favicon-uploader', 'type' => 'media', 'url' => true, 'title' => __('Upload a favicon', 'awaken'), 'compiler' => 'true', 'desc' => __('Upload a site favicon', 'awaken'), 'subtitle' => __('Upload or choose a favicon for your website.', 'awaken'), 'default' => array('url' => 'http://s.wordpress.org/style/images/codeispoetry.png')), array('id' => 'section-media-end', 'type' => 'section', 'indent' => false, 'required' => array('favicon-display-checkbox', "=", 1)), array('id' => 'awaken-header-code', 'type' => 'ace_editor', 'title' => __('Header JS Code', 'awaken'), 'subtitle' => __('Paste your Google Analytics (or other) tracking code here. This will be added into the header of your theme.', 'awaken'), 'mode' => 'javascript', 'theme' => 'chrome', 'desc' => 'Note: Please don\'t include the "&lt;script&gt; &lt;/script&gt;" tags. Just paste your js code here.', 'default' => "jQuery(document).ready(function(){\n\n});"), array('id' => 'awaken-footer-text', 'type' => 'editor', 'title' => __('Footer Text', 'awaken'), 'subtitle' => __('Enter your text here. If you want to align the text, center or right simply do that using the editor', 'awaken'), 'default' => '')));
            $this->sections[] = array('title' => __('Home Settings', 'awaken'), 'desc' => __('Use this tab to set the homepage settings of your site', 'awaken'), 'icon' => 'el-icon-home', 'fields' => array(array('id' => 'home-slider-activate', 'type' => 'checkbox', 'title' => __('Activate Slider', 'awaken'), 'subtitle' => __('Check the checkbox to activate the slider', 'awaken'), 'default' => '1'), array('id' => 'slider-category', 'type' => 'select', 'data' => 'categories', 'title' => __('Select the slider category', 'awaken'), 'subtitle' => __('Post thumbnails of the posts from selected category will be displayed in the slider', 'awaken'), 'desc' => __('Do not select a category or close the current category if you want to display latest posts.', 'awaken'), 'default' => ''), array('id' => 'fposts-category', 'type' => 'select', 'data' => 'categories', 'title' => __('Select the featured posts category', 'awaken'), 'subtitle' => __('Post thumbnails of the posts from selected category will be displayed as featured posts', 'awaken'), 'desc' => __('Do not select a category or close the current category if you want to display latest posts.', 'awaken'), 'default' => ''), array('id' => 'pro-home', 'type' => 'info', 'style' => 'success', 'title' => __('<a href="http://www.themezhut.com/themes/awaken-pro" target="_blank">Upgrade to Pro</a>', 'awaken'), 'desc' => __('Pro Version comes with unlimited slides, more slider options, custom slider etc', 'awaken'))));
            $this->sections[] = array('title' => __('Styling Options', 'awaken'), 'desc' => __('Use this tab to set the style settings of the site', 'awaken'), 'icon' => 'el-icon-website', 'fields' => array(array('id' => 'pro-styling', 'type' => 'info', 'style' => 'success', 'title' => __('<a href="http://www.themezhut.com/themes/awaken-pro" target="_blank">Upgrade to Pro</a>', 'awaken'), 'desc' => __('Pro Version comes with unlimited fonts, unlimited colors, custom styling options, boxed and wide layouts. etc', 'awaken')), array('id' => 'awaken-background', 'type' => 'background', 'output' => array('body'), 'title' => __('Body Background', 'awaken'), 'subtitle' => __('Body background with image, color, etc.', 'awaken')), array('id' => 'awaken-ace-editor-css', 'type' => 'ace_editor', 'title' => __('Custom CSS Code', 'awaken'), 'subtitle' => __('Add your CSS code here.', 'awaken'), 'mode' => 'css', 'theme' => 'monokai', 'default' => "")));
            $this->sections[] = array('title' => __('Post / Page Options', 'awaken'), 'desc' => __('Use this tab to set the post settings of the site', 'awaken'), 'icon' => 'el-icon-pencil-alt', 'fields' => array(array('id' => 'awaken-post-comments', 'type' => 'switch', 'title' => __('Comment area on posts.', 'awaken'), 'subtitle' => __('Switch on if you want to display comments and comment form in posts.', 'awaken'), 'default' => true), array('id' => 'awaken-page-comments', 'type' => 'switch', 'title' => __('Comment area on pages.', 'awaken'), 'subtitle' => __('Switch on if you want to display comments and comment form in pages.', 'awaken'), 'default' => true), array('id' => 'featured-image-switch', 'type' => 'switch', 'title' => __('Display featured image in single post article.', 'awaken'), 'subtitle' => __('Switch on if you want to display featured images in single posts.', 'awaken'), 'default' => true), array('id' => 'pro-general', 'type' => 'info', 'style' => 'success', 'title' => __('<a href="http://www.themezhut.com/themes/awaken-pro" target="_blank">Upgrade to Pro</a>', 'awaken'), 'desc' => __('Pro version comes with more post options.', 'awaken'))));
            $this->sections[] = array('title' => __('Social Media', 'awaken'), 'desc' => __('Use this tab to set the social media settings of the site', 'awaken'), 'icon' => 'el-icon-link', 'fields' => array(array('id' => 'social_media_switch', 'type' => 'checkbox', 'title' => __('Display social media icons.', 'awaken'), 'subtitle' => __('Check the checkbox to activate social icons.', 'awaken'), 'default' => '1'), array('id' => 'facebook-url', 'type' => 'text', 'title' => __('Facebook Link', 'awaken'), 'subtitle' => __('This must be a URL. Start with http://', 'awaken'), 'validate' => 'url', 'default' => ''), array('id' => 'twitter-url', 'type' => 'text', 'title' => __('Twitter Link', 'awaken'), 'subtitle' => __('This must be a URL. Start with http://', 'awaken'), 'validate' => 'url', 'default' => ''), array('id' => 'googleplus-url', 'type' => 'text', 'title' => __('Google Plus Link', 'awaken'), 'subtitle' => __('This must be a URL. Start with http://', 'awaken'), 'validate' => 'url', 'default' => ''), array('id' => 'linkedin-url', 'type' => 'text', 'title' => __('Linkedin Link', 'awaken'), 'subtitle' => __('This must be a URL. Start with http://', 'awaken'), 'validate' => 'url', 'default' => ''), array('id' => 'rss-url', 'type' => 'text', 'title' => __('RSS Link', 'awaken'), 'subtitle' => __('This must be a URL. Start with http://', 'awaken'), 'validate' => 'url', 'default' => ''), array('id' => 'instagram-url', 'type' => 'text', 'title' => __('Instagram Link', 'awaken'), 'subtitle' => __('This must be a URL. Start with http://', 'awaken'), 'validate' => 'url', 'default' => ''), array('id' => 'flickr-url', 'type' => 'text', 'title' => __('Flickr Link', 'awaken'), 'subtitle' => __('This must be a URL. Start with http://', 'awaken'), 'validate' => 'url', 'default' => ''), array('id' => 'youtube-url', 'type' => 'text', 'title' => __('Youtube Link', 'awaken'), 'subtitle' => __('This must be a URL. Start with http://', 'awaken'), 'validate' => 'url', 'default' => ''), array('id' => 'pro-social', 'type' => 'info', 'style' => 'success', 'title' => __('<a href="http://www.themezhut.com/themes/awaken-pro" target="_blank">Upgrade to Pro</a>', 'awaken'), 'desc' => __('Pro Version comes with more social media link options.', 'awaken'))));
            $this->sections[] = array('type' => 'divide');
            $this->sections[] = array('icon' => 'el-icon-eye-open', 'title' => __('<span class="sp-menu">Theme Support</span>', 'awaken'), 'desc' => __('<p class="description">Follow these links to get more details about Awaken WordPress Theme.</p>', 'redux-framework-demo'), 'fields' => array(array('id' => 'opt-info-field', 'type' => 'info', 'style' => 'success', 'desc' => __('<h4><a class="thgreen" href="http://www.themezhut.com/themes/awaken" target="_blank">Theme Details</a></h4> <h4><a class="thred" href="http://www.themezhut.com/awaken-wordpress-theme-documentation" target="_blank">Theme Setup Guide</a></h4> <h4><a class="thblue" href="http://www.themezhut.com/demo/awaken" target="_blank">Theme Demo</a></h4> <h4><a class="thlgreen" href="http://wordpress.org/themes/awaken" target="_blank">Rate Awaken Theme</a></h4> <h4><a class="thbrown" href="http://www.themezhut.com/themes/awaken-pro" target="_blank">Awaken Pro Details</a></h4> <h4><a class="thpurple" href="http://www.themezhut.com/demo/awaken-pro" target="_blank">Awaken Pro Demo</a></h4>', 'awaken')), array('id' => 'th-opt-info-rate', 'type' => 'info', 'style' => 'success', 'icon' => 'el el-star', 'title' => __('<h4>Support Us.</h4>', 'awaken'), 'desc' => __('The best way to thank us is, by rating our theme with 5 stars. <a href="http://wordpress.org/themes/awaken" target="_blank">Click here to rate our theme.</a>', 'awaken'))));
            $this->sections[] = array('type' => 'divide');
            $this->sections[] = array('title' => __('Import / Export', 'awaken'), 'desc' => __('Import and Export your Redux Framework settings from file, text or URL.', 'awaken'), 'icon' => 'el-icon-refresh', 'fields' => array(array('id' => 'opt-import-export', 'type' => 'import_export', 'title' => 'Import Export', 'subtitle' => 'Save and restore your Redux options', 'full_width' => false)));
            $this->sections[] = array('icon' => 'el-icon-info-sign', 'title' => __('Theme Information', 'awaken'), 'fields' => array(array('id' => 'opt-raw-info', 'type' => 'raw', 'content' => $item_info)));
        }
开发者ID:nvbinh,项目名称:wpnews,代码行数:101,代码来源:admin-config.php

示例10: setSections


//.........这里部分代码省略.........
                    <ul class="theme-info">
                        <li><?php 
            printf(__('By %s', 'wp_panda'), $this->theme->display('Author'));
            ?>
</li>
                        <li><?php 
            printf(__('Version %s', 'wp_panda'), $this->theme->display('Version'));
            ?>
</li>
                        <li><?php 
            echo '<strong>' . __('Tags', 'wp_panda') . ':</strong> ';
            printf($this->theme->display('Tags'));
            ?>
</li>
                    </ul>
                    <p class="theme-description"><?php 
            echo $this->theme->display('Description');
            ?>
</p>
                    <?php 
            if ($this->theme->parent()) {
                printf(' <p class="howto">' . __('This <a href="%1$s">child theme</a> requires its parent theme, %2$s.') . '</p>', __('http://codex.wordpress.org/Child_Themes', 'wp_panda'), $this->theme->parent()->display('Name'));
            }
            ?>

                </div>
            </div>

            <?php 
            $item_info = ob_get_contents();
            ob_end_clean();
            $sampleHTML = '';
            if (file_exists(dirname(__FILE__) . '/info-html.html')) {
                Redux_Functions::initWpFilesystem();
                global $wp_filesystem;
                $sampleHTML = $wp_filesystem->get_contents(dirname(__FILE__) . '/info-html.html');
            }
            // ACTUAL DECLARATION OF SECTIONS
            /*-----------------------------------------------------------------------------------*/
            /* - Контактная иныормация
               /*-----------------------------------------------------------------------------------*/
            $this->sections[] = array('title' => __('Контактная информация', 'wp_panda'), 'desc' => __('В этом разделе настраиваются контактные данные.', 'wp_panda'), 'icon' => 'font-icon-house', 'customizer' => false, 'fields' => array(array('id' => 'phone_1', 'type' => 'text', 'title' => __('Телефон 1', 'wp_panda'), 'subtitle' => __('Введите номер телефона', 'wp_panda'), 'default' => ''), array('id' => 'phone_2', 'type' => 'text', 'title' => __('Телефон 2', 'wp_panda'), 'subtitle' => __('Введите номер телефона', 'wp_panda'), 'default' => ''), array('id' => 'e_mail', 'type' => 'text', 'title' => __('Электронная почта', 'wp_panda'), 'subtitle' => __('Введите адрес электронной почты', 'wp_panda'), 'default' => '')));
            /*-----------------------------------------------------------------------------------*/
            /* - Региональные настройки
               /*-----------------------------------------------------------------------------------*/
            $this->sections[] = array('title' => __('Регион', 'wp_panda'), 'desc' => __('В этом разделе настраиваются данные специфичные для региона сайта.', 'wp_panda'), 'icon' => 'font-icon-house', 'customizer' => false, 'fields' => array(array('id' => 'site_city', 'type' => 'text', 'title' => __('Город', 'wp_panda'), 'subtitle' => __('Регион к которму привязан сайт', 'wp_panda'), 'default' => ''), array('id' => 'site_city_in', 'type' => 'text', 'title' => __('Город в предложном падеже', 'wp_panda'), 'subtitle' => __('Введите название региона в предложном падеже', 'wp_panda'), 'default' => ''), array('id' => 'city_district', 'type' => 'multi_text', 'title' => __('Районы', 'wp_panda'), 'subtitle' => __('Введите районы вашего города', 'wp_panda'), 'desc' => __('Добавить ещще один район', 'wp_panda'))));
            /*-----------------------------------------------------------------------------------*/
            /* - Настройки предметов
               /*-----------------------------------------------------------------------------------*/
            $this->sections[] = array('title' => __('Предметы', 'wp_panda'), 'desc' => __('В этом разделе настраиваются данные о предметах.', 'wp_panda'), 'icon' => 'font-icon-cycle', 'customizer' => false, 'fields' => array(array('id' => 'site_student', 'type' => 'multi_text', 'title' => __('Категории учеников', 'wp_panda'), 'subtitle' => __('Введите категории учеников с которыми иожет рабртать преподаватель', 'wp_panda'), 'desc' => __('Добавить ещще одну категорию', 'wp_panda')), array('id' => 'teacher_status', 'type' => 'multi_text', 'title' => __('Статус преподавателя', 'wp_panda'), 'subtitle' => __('Введите возможные статусы преподавателя', 'wp_panda'), 'desc' => __('Добавить ещще один статус', 'wp_panda')), array('id' => 'lesson_time', 'type' => 'multi_text', 'title' => __('Длительность занятия', 'wp_panda'), 'subtitle' => __('Введите возможные длительности занятий', 'wp_panda'), 'desc' => __('Добавить ещще одну длительность', 'wp_panda'))));
            /*-----------------------------------------------------------------------------------*/
            /*  - General
                /*-----------------------------------------------------------------------------------*/
            $this->sections[] = array('title' => __('Лого и фавикон', 'wp_panda'), 'icon' => 'font-icon-cycle', 'customizer' => false, 'fields' => array(array('id' => 'custom_logo', 'type' => 'media', 'title' => __('Логотип', 'wp_panda'), 'desc' => ''), array('id' => 'favicon_1', 'type' => 'media', 'title' => __('Favicon', 'wp_panda'), 'subtitle' => __('Загрузите  16px x 16px Png/Gif', 'wp_panda'), 'desc' => ''), array('id' => 'favicon_2', 'type' => 'media', 'title' => __('Favicon', 'wp_panda'), 'subtitle' => __('Загрузите  96px x 196px Png', 'wp_panda'), 'desc' => ''), array('id' => 'favicon_3', 'type' => 'media', 'title' => __('Favicon', 'wp_panda'), 'subtitle' => __('Загрузите  152px x 152px Png', 'wp_panda'), 'desc' => ''), array('id' => 'favicon_4', 'type' => 'media', 'title' => __('Favicon', 'wp_panda'), 'subtitle' => __('Загрузите  144px x 144px Png', 'wp_panda'), 'desc' => '')));
            // Preloader
            /* $this->sections[] = array(
                             'title'         =>  __('Preloader', 'wp_panda'),
                             'subsection'    =>  true,
                             'icon'          =>  'font-icon-arrow-right-simple-thin-round',
                             'customizer'    =>  false,
                             'fields'        =>  array(
            
                                 // Preloader
                                 array(
                                     'id'        =>  'preloader_settings',
                                     'type'      =>  'switch',
开发者ID:WP-Panda,项目名称:crrepetitor,代码行数:67,代码来源:config.php

示例11: setSections


//.........这里部分代码省略.........
                    }
                }
            }
            ob_start();
            $ct = wp_get_theme();
            $this->theme = $ct;
            $item_name = $this->theme->get('Name');
            $tags = $this->theme->Tags;
            $screenshot = $this->theme->get_screenshot();
            $class = $screenshot ? 'has-screenshot' : '';
            $customize_title = sprintf(__('Customize &#8220;%s&#8221;', 'simpleTheme_ThemeOption'), $this->theme->display('Name'));
            ?>
                <div id="current-theme" class="<?php 
            echo esc_attr($class);
            ?>
">
                    <?php 
            if ($screenshot) {
                ?>
                        <?php 
                if (current_user_can('edit_theme_options')) {
                    ?>
                            <a href="<?php 
                    echo wp_customize_url();
                    ?>
" class="load-customize hide-if-no-customize"
                               title="<?php 
                    echo esc_attr($customize_title);
                    ?>
">
                                <img src="<?php 
                    echo esc_url($screenshot);
                    ?>
"
                                     alt="<?php 
                    esc_attr_e('Current theme preview', 'simpleTheme_ThemeOption');
                    ?>
"/>
                            </a>
                        <?php 
                }
                ?>
                        <img class="hide-if-customize" src="<?php 
                echo esc_url($screenshot);
                ?>
"
                             alt="<?php 
                esc_attr_e('Current theme preview', 'simpleTheme_ThemeOption');
                ?>
"/>
                    <?php 
            }
            ?>

                    <h4><?php 
            echo $this->theme->display('Name');
            ?>
</h4>

                    <div>
                        <ul class="theme-info">
                            <li><?php 
            printf(__('By %s', 'simpleTheme_ThemeOption'), $this->theme->display('Author'));
            ?>
</li>
                            <li><?php 
            printf(__('Version %s', 'simpleTheme_ThemeOption'), $this->theme->display('Version'));
            ?>
</li>
                            <li><?php 
            echo '<strong>' . __('Tags', 'simpleTheme_ThemeOption') . ':</strong> ';
            printf($this->theme->display('Tags'));
            ?>
</li>
                        </ul>
                        <p class="theme-description"><?php 
            echo $this->theme->display('Description');
            ?>
</p>
                        <?php 
            if ($this->theme->parent()) {
                printf(' <p class="howto">' . __('This <a href="%1$s">child theme</a> requires its parent theme, %2$s.', 'simpleTheme_ThemeOption') . '</p>', __('http://codex.wordpress.org/Child_Themes', 'simpleTheme_ThemeOption'), $this->theme->parent()->display('Name'));
            }
            ?>

                    </div>
                </div>

                <?php 
            $item_info = ob_get_contents();
            ob_end_clean();
            $sampleHTML = '';
            if (file_exists(dirname(__FILE__) . '/info-html.html')) {
                Redux_Functions::initWpFilesystem();
                global $wp_filesystem;
                $sampleHTML = $wp_filesystem->get_contents(dirname(__FILE__) . '/info-html.html');
            }
            // ACTUAL DECLARATION OF SECTIONS
            $this->sections[] = array('title' => __('Theme Options', 'simpleTheme'), 'desc' => __(''), 'icon' => 'el-icon-home', 'fields' => array(array('title' => __('Cod Google Analitics', 'simpleTheme_ThemeOption'), 'id' => 'googleAnalyticsSiteId', 'type' => 'media', 'tiles' => true, 'url' => true, 'default' => 0)));
        }
开发者ID:bogdanpetru,项目名称:wpAtom,代码行数:101,代码来源:theme-options.php

示例12: setSections


//.........这里部分代码省略.........
                    }
                }
            }
            ob_start();
            $ct = wp_get_theme();
            $this->theme = $ct;
            $item_name = $this->theme->get('Name');
            $tags = $this->theme->Tags;
            $screenshot = $this->theme->get_screenshot();
            $class = $screenshot ? 'has-screenshot' : '';
            $customize_title = sprintf(__('Customize &#8220;%s&#8221;', 'redux-framework-demo'), $this->theme->display('Name'));
            ?>
                <div id="current-theme" class="<?php 
            echo esc_attr($class);
            ?>
">
                    <?php 
            if ($screenshot) {
                ?>
                        <?php 
                if (current_user_can('edit_theme_options')) {
                    ?>
                            <a href="<?php 
                    echo wp_customize_url();
                    ?>
" class="load-customize hide-if-no-customize"
                               title="<?php 
                    echo esc_attr($customize_title);
                    ?>
">
                                <img src="<?php 
                    echo esc_url($screenshot);
                    ?>
"
                                     alt="<?php 
                    esc_attr_e('Current theme preview', 'redux-framework-demo');
                    ?>
"/>
                            </a>
                        <?php 
                }
                ?>
                        <img class="hide-if-customize" src="<?php 
                echo esc_url($screenshot);
                ?>
"
                             alt="<?php 
                esc_attr_e('Current theme preview', 'redux-framework-demo');
                ?>
"/>
                    <?php 
            }
            ?>

                    <h4><?php 
            echo $this->theme->display('Name');
            ?>
</h4>

                    <div>
                        <ul class="theme-info">
                            <li><?php 
            printf(__('By %s', 'redux-framework-demo'), $this->theme->display('Author'));
            ?>
</li>
                            <li><?php 
            printf(__('Version %s', 'redux-framework-demo'), $this->theme->display('Version'));
            ?>
</li>
                            <li><?php 
            echo '<strong>' . __('Tags', 'redux-framework-demo') . ':</strong> ';
            printf($this->theme->display('Tags'));
            ?>
</li>
                        </ul>
                        <p class="theme-description"><?php 
            echo $this->theme->display('Description');
            ?>
</p>
                        <?php 
            if ($this->theme->parent()) {
                printf(' <p class="howto">' . __('This <a href="%1$s">child theme</a> requires its parent theme, %2$s.', 'redux-framework-demo') . '</p>', __('http://codex.wordpress.org/Child_Themes', 'redux-framework-demo'), $this->theme->parent()->display('Name'));
            }
            ?>

                    </div>
                </div>

                <?php 
            $item_info = ob_get_contents();
            ob_end_clean();
            $sampleHTML = '';
            if (file_exists(dirname(__FILE__) . '/info-html.html')) {
                Redux_Functions::initWpFilesystem();
                global $wp_filesystem;
                $sampleHTML = $wp_filesystem->get_contents(dirname(__FILE__) . '/info-html.html');
            }
            // ACTUAL DECLARATION OF SECTIONS
            $this->sections[] = array('title' => __('General Settings', 'wpml'), 'desc' => __('', 'wpml'), 'icon' => 'el-icon-cogs', 'fields' => array(array('id' => 'delete-on-deactivation', 'type' => 'switch', 'title' => __('Cleanup', 'wpml'), 'subtitle' => __('Delete all data on deactivation? (emails and settings)?', 'wpml'), 'default' => 0, 'on' => 'Enabled', 'off' => 'Disabled'), array('id' => 'can-see-submission-data', 'type' => 'select', 'data' => 'capabilities', 'default' => 'manage_options', 'title' => __('Can See Submission data', 'wpml'), 'subtitle' => __('Select the minimum role.', 'wpml')), array('id' => 'datetimeformat-use-wordpress', 'type' => 'switch', 'title' => __('WordPress Date Time Format', 'wpml'), 'subtitle' => __(sprintf("Use format from WordPress settings (%s)", date_i18n(get_option('date_format') . " " . get_option('time_format'))), 'wpml'), 'default' => 0, 'on' => 'Enabled', 'off' => 'Disabled'), array('id' => 'section-log-rotation-start', 'type' => 'section', 'title' => __('Log Rotation', 'wpml'), 'subtitle' => __('Save space by deleting logs regularly.', 'wpml'), 'indent' => true), array('id' => 'log-rotation-limit-amout', 'type' => 'switch', 'title' => __('Cleanup by Amount', 'wpml'), 'subtitle' => __('Setup a automated cleanup routine!', 'wpml'), 'default' => 0, 'on' => 'Enabled', 'off' => 'Disabled'), array('id' => 'log-rotation-limit-amout-keep', 'type' => 'slider', 'required' => array('log-rotation-limit-amout', '=', '1'), 'title' => __('Amount', 'wpml'), 'subtitle' => __('When should mails are deleted?', 'wpml'), 'desc' => __('Cleanup when the stored mails exceed...', 'wpml'), 'default' => 75, 'min' => 25, 'step' => 50, 'max' => 3000, 'display_value' => 'text'), array('id' => 'log-rotation-delete-time', 'type' => 'switch', 'title' => __('Cleanup by Time', 'wpml'), 'subtitle' => __('Setup a automated cleanup routine!', 'wpml'), 'default' => 0, 'on' => 'Enabled', 'off' => 'Disabled'), array('id' => 'log-rotation-delete-time-days', 'type' => 'slider', 'required' => array('log-rotation-delete-time', '=', '1'), 'title' => __('Time', 'wpml'), 'subtitle' => __('When should mails are deleted?', 'wpml'), 'desc' => __('Delete mails older than days...', 'wpml'), 'default' => 30, 'min' => 1, 'step' => 7, 'max' => 400, 'display_value' => 'text'), array('id' => 'section-log-rotation-end', 'type' => 'section', 'indent' => false)));
        }
开发者ID:ROMB,项目名称:wp-mail-logging,代码行数:101,代码来源:options-init.php

示例13: setSections


//.........这里部分代码省略.........
			<div id="current-theme" class="<?php 
            echo esc_attr($class);
            ?>
">
			<?php 
            if ($screenshot) {
                ?>
				<?php 
                if (current_user_can('edit_theme_options')) {
                    ?>
						<a href="<?php 
                    echo wp_customize_url();
                    ?>
" class="load-customize hide-if-no-customize" title="<?php 
                    echo esc_attr($customize_title);
                    ?>
">
							<img src="<?php 
                    echo esc_url($screenshot);
                    ?>
" alt="<?php 
                    esc_attr_e('Current theme preview');
                    ?>
" />
						</a>
				<?php 
                }
                ?>
					<img class="hide-if-customize" src="<?php 
                echo esc_url($screenshot);
                ?>
" alt="<?php 
                esc_attr_e('Current theme preview');
                ?>
" />
				<?php 
            }
            ?>

				<h4><?php 
            echo $this->theme->display('Name');
            ?>
</h4>

				<div>
					<ul class="theme-info">
						<li><?php 
            printf(__('By %s', 'redux-framework-demo'), $this->theme->display('Author'));
            ?>
</li>
						<li><?php 
            printf(__('Version %s', 'redux-framework-demo'), $this->theme->display('Version'));
            ?>
</li>
						<li><?php 
            echo '<strong>' . __('Tags', 'redux-framework-demo') . ':</strong> ';
            printf($this->theme->display('Tags'));
            ?>
</li>
					</ul>
					<p class="theme-description"><?php 
            echo $this->theme->display('Description');
            ?>
</p>
			<?php 
            if ($this->theme->parent()) {
                printf(' <p class="howto">' . __('This <a href="%1$s">child theme</a> requires its parent theme, %2$s.') . '</p>', __('http://codex.wordpress.org/Child_Themes', 'redux-framework-demo'), $this->theme->parent()->display('Name'));
            }
            ?>

				</div>
			</div>

			<?php 
            $item_info = ob_get_contents();
            ob_end_clean();
            $sampleHTML = '';
            if (file_exists(dirname(__FILE__) . '/info-html.html')) {
                Redux_Functions::initWpFilesystem();
                global $wp_filesystem;
                $sampleHTML = $wp_filesystem->get_contents(dirname(__FILE__) . '/info-html.html');
            }
            /*
             ********************************************
             **************** THEME PANELS **************
             ********************************************
             */
            // Theme prefix
            global $themePrefix;
            // Social networks
            $this->sections[] = array('title' => __('Rodapé'), 'desc' => '<p class="description">' . __('Informações adicionais') . '</p>', 'fields' => array(array('id' => $themePrefix . 'developed', 'type' => 'text', 'title' => 'Autor', 'subtitle' => __('Autor do site.'), 'default' => 'Desenvolvido por <b>Vitor Henrique da Silva</b>')));
            /*
             ********************************************
             ************ END THEME PANELS **************
             ********************************************
             */
            if (file_exists(trailingslashit(dirname(__FILE__)) . 'README.html')) {
                $tabs['docs'] = array('icon' => 'el-icon-book', 'title' => __('Documentation', 'redux-framework-demo'), 'content' => nl2br(file_get_contents(trailingslashit(dirname(__FILE__)) . 'README.html')));
            }
        }
开发者ID:vhenrique,项目名称:CRUD---Estoque-PHP-WP,代码行数:101,代码来源:custom-theme-options.php

示例14: setSections


//.........这里部分代码省略.........
					<ul class="theme-info">
						<li><?php 
            printf(__('By %s', 'robusta'), $this->theme->display('Author'));
            ?>
</li>
						<li><?php 
            printf(__('Version %s', 'robusta'), $this->theme->display('Version'));
            ?>
</li>
						<li><?php 
            echo '<strong>' . __('Tags', 'robusta') . ':</strong> ';
            printf($this->theme->display('Tags'));
            ?>
</li>
					</ul>
					<p class="theme-description"><?php 
            echo esc_html($this->theme->display('Description'));
            ?>
</p>
					<?php 
            if ($this->theme->parent()) {
                printf(' <p class="howto">' . __('This <a href="%1$s">child theme</a> requires its parent theme, %2$s.', 'robusta') . '</p>', __('http://codex.wordpress.org/Child_Themes', 'robusta'), $this->theme->parent()->display('Name'));
            }
            ?>

				</div>
			</div>

			<?php 
            $item_info = ob_get_contents();
            ob_end_clean();
            $sampleHTML = '';
            if (file_exists(dirname(__FILE__) . '/info-html.html')) {
                Redux_Functions::initWpFilesystem();
                global $wp_filesystem;
                $sampleHTML = $wp_filesystem->get_contents(dirname(__FILE__) . '/info-html.html');
            }
            $of_options_fontsize = array("8px" => "8px", "9px" => "9px", "10px" => "10px", "11px" => "11px", "12px" => "12px", "13px" => "13px", "14px" => "14px", "15px" => "15px", "16px" => "16px", "17px" => "17px", "18px" => "18px", "19px" => "19px", "20px" => "20px", "21px" => "21px", "22px" => "22px", "23px" => "23px", "24px" => "24px", "25px" => "25px", "26px" => "26px", "27px" => "27px", "28px" => "28px", "29px" => "29px", "30px" => "30px", "31px" => "31px", "32px" => "32px", "33px" => "33px", "34px" => "34px", "35px" => "35px", "36px" => "36px", "37px" => "37px", "38px" => "38px", "39px" => "39px", "40px" => "40px");
            $of_options_font = array("1" => "Google Font", "2" => "Standard Font", "3" => "Custom Font");
            //Google font API
            $of_options_google_font = array();
            if (is_admin()) {
                $results = '';
                $whitelist = array('127.0.0.1', '::1');
                if (!in_array($_SERVER['REMOTE_ADDR'], $whitelist)) {
                    $results = wp_remote_get('https://www.googleapis.com/webfonts/v1/webfonts?sort=alpha&key=AIzaSyDnf-ujK_DUCihfvzqdlBokan6zbnrJbi0');
                    if (!is_wp_error($results)) {
                        $results = json_decode($results['body']);
                        if (isset($results->items)) {
                            foreach ($results->items as $font) {
                                $of_options_google_font[$font->family] = $font->family;
                            }
                        }
                    }
                }
            }
            //Standard Fonts
            $of_options_standard_fonts = array('Arial, Helvetica, sans-serif' => 'Arial, Helvetica, sans-serif', "'Arial Black', Gadget, sans-serif" => "'Arial Black', Gadget, sans-serif", "'Bookman Old Style', serif" => "'Bookman Old Style', serif", "'Comic Sans MS', cursive" => "'Comic Sans MS', cursive", "Courier, monospace" => "Courier, monospace", "Garamond, serif" => "Garamond, serif", "Georgia, serif" => "Georgia, serif", "Impact, Charcoal, sans-serif" => "Impact, Charcoal, sans-serif", "'Lucida Console', Monaco, monospace" => "'Lucida Console', Monaco, monospace", "'Lucida Sans Unicode', 'Lucida Grande', sans-serif" => "'Lucida Sans Unicode', 'Lucida Grande', sans-serif", "'MS Sans Serif', Geneva, sans-serif" => "'MS Sans Serif', Geneva, sans-serif", "'MS Serif', 'New York', sans-serif" => "'MS Serif', 'New York', sans-serif", "'Palatino Linotype', 'Book Antiqua', Palatino, serif" => "'Palatino Linotype', 'Book Antiqua', Palatino, serif", "Tahoma, Geneva, sans-serif" => "Tahoma, Geneva, sans-serif", "'Times New Roman', Times, serif" => "'Times New Roman', Times, serif", "'Trebuchet MS', Helvetica, sans-serif" => "'Trebuchet MS', Helvetica, sans-serif", "Verdana, Geneva, sans-serif" => "Verdana, Geneva, sans-serif");
            // Custom Font
            $fonts = array();
            $of_options_custom_fonts = array();
            $font_path = get_template_directory() . "/fonts";
            if (!($handle = opendir($font_path))) {
                $fonts = array();
            } else {
                while (false !== ($file = readdir($handle))) {
开发者ID:tldjssla,项目名称:jejufoodwinefestival,代码行数:67,代码来源:theme-options.php

示例15: 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


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