• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP is_customize_preview函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: Brand

function Brand()
{
    ?>
  <div class="brand">
    <h1 class="brand__title"><a href="<?php 
    echo esc_url(home_url('/'));
    ?>
" rel="home"><?php 
    bloginfo('name');
    ?>
</a></h1>
    <?php 
    $description = get_bloginfo('description', 'display');
    if ($description || is_customize_preview()) {
        ?>
      <span class="brand__description"><?php 
        echo $description;
        /* WPCS: xss ok. */
        ?>
</span>
    <?php 
    }
    ?>
  </div>
<?php 
}
开发者ID:gios-asu,项目名称:bemmy-wordpress-theme,代码行数:26,代码来源:Brand.php


示例2: optimizer_widgets_init

function optimizer_widgets_init()
{
    $editbutton = is_customize_preview() ? '<a class="edit_widget" title="Edit Widget - #%1$s"><i class="fa fa-pencil"></i></a>' : '';
    register_sidebar(array('name' => __('Right Sidebar', 'optimizer'), 'id' => 'sidebar', 'description' => __('When you assign widgets to this area, it will be displayed on the right side of all pages and posts', 'optimizer'), 'before_widget' => '<div id="%1$s" class="widget %2$s" data-widget-id="%1$s"><div class="widget_wrap">' . $editbutton, 'after_widget' => '<span class="widget_corner"></span></div></div>', 'before_title' => '<h3 class="widgettitle">', 'after_title' => '</h3>'));
    register_sidebar(array('name' => __('Footer Widgets', 'optimizer'), 'id' => 'foot_sidebar', 'description' => __('This Widget Area is displayed in the footer section of your site.', 'optimizer'), 'before_widget' => '<li id="%1$s" class="widget %2$s" data-widget-id="%1$s"><div class="widget_wrap">' . $editbutton, 'after_widget' => '</li>', 'before_title' => '<h3 class="widgettitle">', 'after_title' => '</h3>'));
    register_sidebar(array('name' => __('Frontpage Widgets', 'optimizer'), 'id' => 'front_sidebar', 'description' => __('With Optmizer Free you can only add 4 widgets to this Area. Upgrade to PRO to add unlimited Widgets.', 'optimizer'), 'before_widget' => '<div id="%1$s" class="widget %2$s" data-widget-id="%1$s"><div class="widget_wrap">' . $editbutton, 'after_widget' => '</div></div>', 'before_title' => '<h3 class="widgettitle">', 'after_title' => '</h3>'));
}
开发者ID:danaevernden,项目名称:danaeverndenWP,代码行数:7,代码来源:core.php


示例3: __construct

 /**
  * Register widget with WordPress.
  */
 public function __construct()
 {
     parent::__construct('image', apply_filters('jetpack_widget_name', esc_html__('Image', 'jetpack')), array('classname' => 'widget_image', 'description' => __('Display an image in your sidebar', 'jetpack'), 'customize_selective_refresh' => true));
     if (is_active_widget(false, false, $this->id_base) || is_active_widget(false, false, 'monster') || is_customize_preview()) {
         add_action('wp_enqueue_scripts', array($this, 'enqueue_style'));
     }
 }
开发者ID:jordankoschei,项目名称:jordankoschei-dot-com,代码行数:10,代码来源:image-widget.php


示例4: alcatraz_output_site_description

/**
 * Output the site description.
 *
 * @since  1.0.0
 */
function alcatraz_output_site_description()
{
    $description = get_bloginfo('description', 'display');
    if ($description || is_customize_preview()) {
        printf('<p class="%s">%s</p>', 'site-description', $description);
    }
}
开发者ID:BraadMartin,项目名称:Alcatraz,代码行数:12,代码来源:theme-hooks.php


示例5: vc_wpex_remove_vc_scripts

 function vc_wpex_remove_vc_scripts()
 {
     if (is_customize_preview()) {
         wp_deregister_script('wpb_composer_front_js');
         wp_dequeue_script('wpb_composer_front_js');
     }
 }
开发者ID:rovak73,项目名称:sinfronterasdoc,代码行数:7,代码来源:wp_customize.php


示例6: widget

 function widget($args, $instance)
 {
     extract($args);
     /* Our variables from the widget settings. */
     $title = isset($instance['title']) ? apply_filters('widget_title', $instance['title']) : __('THE OPTIMIZER', 'optimizer');
     $subtitle = isset($instance['subtitle']) ? apply_filters('widget_title', $instance['subtitle']) : __('a little about..', 'optimizer');
     $content = isset($instance['content']) ? apply_filters('wp_editor_widget_content', $instance['content']) : '<p>' . __('Collaboratively administrate empowered markets via plug-and-play networks. Dynamically procrastinate B2C users after installed base benefits. Dramatically visualize customer directed convergence without revolutionary ROI.', 'optimizer') . '</p>';
     $divider = isset($instance['divider']) ? apply_filters('widget_title', $instance['divider']) : 'fa-stop';
     $title_color = isset($instance['title_color']) ? $instance['title_color'] : '#222222';
     $content_color = isset($instance['content_color']) ? $instance['content_color'] : '#a8b4bf';
     $content_bg = isset($instance['content_bg']) ? $instance['content_bg'] : '#ffffff';
     /* Before widget (defined by themes). */
     echo $before_widget;
     if (is_customize_preview()) {
         echo '<span class="widgetname">' . $this->name . '</span>';
     }
     echo '<div class="text_block_wrap"><div class="center"><div class="about_inner">';
     if (isset($subtitle)) {
         echo '<span class="about_pre">' . do_shortcode($subtitle) . '</span>';
     }
     if (!empty($title)) {
         echo '<h1 class="about_header">' . do_shortcode($title) . '</h1>';
     }
     if ($divider) {
         if ($divider !== 'no_divider') {
             echo '<div class="optimizer_divider"><span class="div_left"></span><span class="div_middle"><i class="fa ' . $divider . '"></i></span><span class="div_right"></span></div>';
         }
     }
     if ($content) {
         echo '<div class="about_content">' . do_shortcode($content) . '</div>';
     }
     echo '</div></div></div>';
     /* After widget (defined by themes). */
     echo $after_widget;
 }
开发者ID:pbhanu1994,项目名称:bhanuprakash,代码行数:35,代码来源:front-about.php


示例7: __construct

 /**
  * Main constructor
  *
  * @since 1.6.0
  */
 public function __construct()
 {
     // Get customizer enabled panels
     $enabled_panels = get_option('wpex_customizer_panels', array('typography' => true));
     // Customizer actions
     if (isset($enabled_panels['typography'])) {
         add_action('customize_register', array($this, 'register'), 40);
     }
     // Add fonts to the mce editor
     add_action('admin_init', array($this, 'mce_scripts'));
     add_filter('tiny_mce_before_init', array($this, 'mce_fonts'));
     // Load Google Font scripts
     if (wpex_get_mod('google_fonts_in_footer')) {
         add_action('wp_footer', array($this, 'load_fonts'));
     } else {
         add_action('wp_enqueue_scripts', array($this, 'load_fonts'));
     }
     // CSS output
     if (is_customize_preview() && isset($enabled_panels['typography'])) {
         add_action('customize_preview_init', array($this, 'customize_preview_init'));
         add_action('wp_head', array($this, 'live_preview_styles'), 999);
     } else {
         add_filter('wpex_head_css', array($this, 'head_css'), 99);
     }
 }
开发者ID:iq007,项目名称:MadScape,代码行数:30,代码来源:typography.php


示例8: get

 public function get($option_id, $default = '')
 {
     static $cached_options = array();
     if (in_array($option_id, $this->keys()) && isset($_GET[$option_id])) {
         return $_GET[$option_id];
     }
     if (isset($cached_options[$option_id]) && !is_customize_preview()) {
         return $cached_options[$option_id];
     }
     $ot_keys = apply_filters('youxi_option_ot_keys', array());
     $ot_on_off = apply_filters('youxi_option_ot_on_off', array());
     if (in_array($option_id, $ot_keys)) {
         if (in_array($option_id, $ot_on_off)) {
             $return = 'on' === ot_get_option($option_id, $default);
         } else {
             $return = ot_get_option($option_id, $default);
         }
     } else {
         $defaults = $this->defaults();
         $options = $this->get_all();
         if (isset($options[$option_id])) {
             $return = $options[$option_id];
         } elseif (isset($defaults[$option_id])) {
             $return = $defaults[$option_id];
         } else {
             $return = $default;
         }
     }
     return $cached_options[$option_id] = $return;
 }
开发者ID:yemingyuen,项目名称:mingsg,代码行数:30,代码来源:class-option.php


示例9: pagelines_check_install

 function pagelines_check_install()
 {
     $install = false;
     $url = add_query_arg(array('edtr' => 'on', 'toolbox' => 'open'), site_url());
     if (isset($_REQUEST['pl-install-theme']) && !pl_is_wporg()) {
         $install = true;
     }
     if (is_admin()) {
         global $pagenow;
         if (is_customize_preview()) {
             return false;
         }
         if (isset($_REQUEST['activated']) && $pagenow == "themes.php" && !pl_is_wporg()) {
             $install = true;
         }
         if (isset($_REQUEST['activated']) && $pagenow == "themes.php" && pl_is_wporg()) {
             add_action('admin_notices', array($this, 'install_notice'));
             $install = false;
         }
         if (pl_is_wporg() && isset($_REQUEST['i-love-wporg'])) {
             $install = true;
         }
     }
     if ($install == true) {
         // Simon why do we need this??
         if (get_theme_mod('pl_installed')) {
             wp_redirect($url);
             exit;
         } else {
             $url = $this->run_installation_routine();
             wp_redirect($url);
             exit;
         }
     }
 }
开发者ID:taeche,项目名称:SoDoEx,代码行数:35,代码来源:init.install.php


示例10: __construct

 /**
  * Constructor.
  *
  * @since Twenty Fourteen 1.0
  *
  * @return Twenty_Fourteen_Ephemera_Widget
  */
 public function __construct()
 {
     parent::__construct('widget_twentyfourteen_ephemera', __('Twenty Fourteen Ephemera', 'twentyfourteen'), array('classname' => 'widget_twentyfourteen_ephemera', 'description' => __('Use this widget to list your recent Aside, Quote, Video, Audio, Image, Gallery, and Link posts.', 'twentyfourteen'), 'customize_selective_refresh' => true));
     if (is_active_widget(false, false, $this->id_base) || is_customize_preview()) {
         add_action('wp_enqueue_scripts', array($this, 'enqueue_scripts'));
     }
 }
开发者ID:SayenkoDesign,项目名称:ividf,代码行数:14,代码来源:widgets.php


示例11: __construct

 function __construct()
 {
     parent::__construct('facebook-likebox', apply_filters('jetpack_widget_name', __('Facebook Page Plugin', 'jetpack')), array('classname' => 'widget_facebook_likebox', 'description' => __('Use the Facebook Page Plugin to connect visitors to your Facebook Page', 'jetpack'), 'customize_selective_refresh' => true));
     if (is_active_widget(false, false, $this->id_base) || is_active_widget(false, false, 'monster') || is_customize_preview()) {
         add_action('wp_enqueue_scripts', array($this, 'enqueue_scripts'));
     }
 }
开发者ID:pcuervo,项目名称:wp-carnival,代码行数:7,代码来源:facebook-likebox.php


示例12: capture_customizer_page

 /**
  * Here we capture the page and show template acordingly
  * @param $template
  *
  * @return string
  */
 public function capture_customizer_page($template)
 {
     if (is_customize_preview() && isset($_GET['mailtpl_display']) && 'true' == $_GET['mailtpl_display']) {
         return apply_filters('mailtpl/customizer_template', MAILTPL_PLUGIN_DIR . "/admin/templates/default.php");
     }
     return $template;
 }
开发者ID:eliorivero,项目名称:wordpress-email-templates,代码行数:13,代码来源:class-mailtpl-customizer.php


示例13: __construct

 function __construct()
 {
     $this->load_files();
     // TEMPLATE ACTIONS
     // !important - must load after $post variable
     // ALSO, bbPress and other plugins make adjustments to queries which change pages from 404 to something else.
     // Therefore must come after WP_Query (parse query)
     // workaround for customizer in WP >4.3
     // default was 'wp' but customizer needs the libs loaded on 'init'
     if (is_customize_preview()) {
         $hook = 'init';
     } else {
         $hook = 'wp';
     }
     add_action($hook, array($this, 'load_libs'), 10);
     add_action('admin_init', array($this, 'load_libs'), 5);
     add_filter('parse_request', array($this, 'check_for_type'));
     add_action('wp_enqueue_scripts', array($this, 'process_styles'));
     add_action('wp_head', array($this, 'process_head'));
     add_action('wp_footer', array($this, 'process_foot'));
     // RENDER SECTION TEMPLATES ACTIONS
     add_action('pagelines_fixed', array($this, 'process_fixed'));
     add_action('pagelines_header', array($this, 'process_header'));
     add_action('pagelines_template', array($this, 'process_template'));
     add_action('pagelines_footer', array($this, 'process_footer'));
 }
开发者ID:taeche,项目名称:SoDoEx,代码行数:26,代码来源:init.editor.php


示例14: __construct

 /**
  * Class constructor.
  *
  * @since 1.9.0
  */
 function __construct()
 {
     $widget_ops = array('description' => __('A dynamic list of recently active, popular, and newest Friends of the displayed member.  Widget is only shown when viewing a member profile.', 'buddypress'), 'classname' => 'widget_bp_core_friends_widget buddypress widget', 'customize_selective_refresh' => true);
     parent::__construct(false, $name = _x('(BuddyPress) Friends', 'widget name', 'buddypress'), $widget_ops);
     if (is_customize_preview() || is_active_widget(false, false, $this->id_base)) {
         add_action('bp_enqueue_scripts', array($this, 'enqueue_scripts'));
     }
 }
开发者ID:CompositeUK,项目名称:clone.BuddyPress,代码行数:13,代码来源:class-bp-core-friends-widget.php


示例15: __construct

 /**
  * Registers the widget with WordPress.
  */
 function __construct()
 {
     parent::__construct('jetpack_my_community', apply_filters('jetpack_widget_name', esc_html__('My Community', 'jetpack')), array('description' => esc_html__("Display members of your site's community.", 'jetpack'), 'customize_selective_refresh' => true));
     if (is_active_widget(false, false, $this->id_base) || is_active_widget(false, false, 'monster') || is_customize_preview()) {
         add_action('wp_enqueue_scripts', array($this, 'enqueue_style'));
     }
     $this->default_title = esc_html__('Community', 'jetpack');
 }
开发者ID:automattic,项目名称:jetpack,代码行数:11,代码来源:my-community.php


示例16: __construct

 /**
  * Working as a group, we get things done better.
  *
  * @since 1.0.3
  */
 public function __construct()
 {
     $widget_ops = array('description' => __('A dynamic list of recently active, popular, and newest groups', 'buddypress'), 'classname' => 'widget_bp_groups_widget buddypress widget', 'customize_selective_refresh' => true);
     parent::__construct(false, _x('(BuddyPress) Groups', 'widget name', 'buddypress'), $widget_ops);
     if (is_customize_preview() || is_active_widget(false, false, $this->id_base)) {
         add_action('bp_enqueue_scripts', array($this, 'enqueue_scripts'));
     }
 }
开发者ID:buddypress,项目名称:BuddyPress-build,代码行数:13,代码来源:class-bp-groups-widget.php


示例17: link_to_customizer

 function link_to_customizer()
 {
     $ver = defined('THEME_ASSETS_VERSION') ? THEME_ASSETS_VERSION : false;
     if (!is_customize_preview() && current_user_can('edit_theme_options')) {
         wp_enqueue_script('skrollr-metadesc-customizer-link', get_template_directory_uri() . '/inc/metadesc/customizer_link.js', array('jquery'), $ver, true);
         wp_localize_script('skrollr-metadesc-customizer-link', 'customizer_url', admin_url('customize.php'));
     }
 }
开发者ID:lonid,项目名称:skrollr,代码行数:8,代码来源:register.php


示例18: __construct

 public function __construct()
 {
     parent::__construct('wpcom_social_media_icons_widget', apply_filters('jetpack_widget_name', esc_html__('Social Media Icons', 'jetpack')), array('description' => __('A simple widget that displays social media icons.', 'jetpack'), 'customize_selective_refresh' => true));
     $this->defaults = array('title' => __('Social', 'jetpack'), 'facebook_username' => '', 'twitter_username' => '', 'instagram_username' => '', 'pinterest_username' => '', 'linkedin_username' => '', 'github_username' => '', 'youtube_username' => '', 'vimeo_username' => '', 'googleplus_username' => '');
     $this->services = array('facebook' => array('Facebook', 'https://www.facebook.com/%s/'), 'twitter' => array('Twitter', 'https://twitter.com/%s/'), 'instagram' => array('Instagram', 'https://instagram.com/%s/'), 'pinterest' => array('Pinterest', 'https://www.pinterest.com/%s/'), 'linkedin' => array('LinkedIn', 'https://www.linkedin.com/in/%s/'), 'github' => array('GitHub', 'https://github.com/%s/'), 'youtube' => array('YouTube', 'https://www.youtube.com/%s/'), 'vimeo' => array('Vimeo', 'https://vimeo.com/%s/'), 'googleplus' => array('Google+', 'https://plus.google.com/u/0/%s/'));
     if (is_active_widget(false, false, $this->id_base) || is_customize_preview()) {
         add_action('wp_enqueue_scripts', array($this, 'enqueue_style'));
     }
 }
开发者ID:pcuervo,项目名称:wp-carnival,代码行数:9,代码来源:social-media-icons.php


示例19: add_customizer_css

 /**
  * Add CSS in <head> for styles handled by the theme customizer
  * If the Customizer is active pull in the raw css. Otherwise pull in the prepared theme_mods if they exist.
  *
  * @since 2.1.0
  * @return void
  */
 public function add_customizer_css()
 {
     $storefront_woocommerce_extension_styles = get_theme_mod('storefront_woocommerce_extension_styles');
     if (is_customize_preview() || defined('WP_DEBUG') && true === WP_DEBUG || false === $storefront_woocommerce_extension_styles) {
         wp_add_inline_style('storefront-woocommerce-style', $this->get_woocommerce_extension_css());
     } else {
         wp_add_inline_style('storefront-woocommerce-style', $storefront_woocommerce_extension_styles);
     }
 }
开发者ID:nishitlangaliya,项目名称:storefront,代码行数:16,代码来源:class-storefront-woocommerce.php


示例20: customizer_init

 /**
  * Initialize our Customizer settings and controls.
  *
  * @since  1.0.0
  */
 public function customizer_init()
 {
     if (!is_customize_preview()) {
         return;
     }
     require_once ALCATRAZ_DESIGNER_PATH . 'classes/class-alcatraz-designer-customize.php';
     $alcatraz_designer_customize = new Alcatraz_Designer_Customize();
     $alcatraz_designer_customize->init();
 }
开发者ID:carrieforde,项目名称:alcatraz-designer,代码行数:14,代码来源:class-alcatraz-designer.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP is_dataroot_insecure函数代码示例发布时间:2022-05-15
下一篇:
PHP is_create_action函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap