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


PHP layers_get_theme_mod函数代码示例

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


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

示例1: layers_print_typekit

    function layers_print_typekit()
    {
        if ('' == layers_get_theme_mod('typekit-id')) {
            return;
        }
        ?>
		<script type="text/javascript" src="//use.typekit.net/<?php 
        echo esc_js(layers_get_theme_mod('typekit-id'));
        ?>
.js"></script>
		<script type="text/javascript">try{Typekit.load();}catch(e){}</script>
<?php 
    }
开发者ID:rovedajr,项目名称:layerswp,代码行数:13,代码来源:custom-fonts.php

示例2: layers_generate_customizer_fonts

 function layers_generate_customizer_fonts()
 {
     global $layers_custom_fonts;
     // Apply Font Styles
     $customizer_options = new Layers_Customizer_Config();
     foreach ($customizer_options->controls() as $controls) {
         foreach ($controls as $control_key => $control_data) {
             if ('layers-font' == $control_data['type'] && layers_get_theme_mod($control_key)) {
                 // Add fonts to a bucket for registration
                 $layers_custom_fonts[] = layers_get_theme_mod($control_key);
                 layers_inline_styles($control_data['selectors'], 'font-family', array('font-family' => layers_get_theme_mod($control_key)));
             }
         }
     }
 }
开发者ID:antares-ff,项目名称:ANTARES-Test,代码行数:15,代码来源:custom-fonts.php

示例3: site_setup_actions

 /**
  * Get Layers Setup Options
  */
 public function site_setup_actions()
 {
     $site_setup_actions['google-analytics'] = array('label' => __('Google Analytics', 'layerswp'), 'excerpt' => __('Enter in your Google Analytics ID to enable website traffic reporting.', 'layerswp'), 'form' => array('layers-header-google-id' => array('type' => 'text', 'name' => 'layers-header-google-id', 'id' => 'layers-header-google-id', 'placeholder' => __('UA-xxxxxx-xx', 'layerswp'), 'value' => layers_get_theme_mod('header-google-id'))), 'skip-action' => 'layers_site_setup_step_dismissal', 'submit-action' => 'layers_onboarding_set_theme_mods', 'submit-text' => __('Save', 'layerswp'));
     $site_setup_actions['copyright'] = array('label' => __('Copyright Text', 'layerswp'), 'form' => array('layers-footer-copyright-text' => array('type' => 'text', 'name' => 'layers-footer-copyright-text', 'id' => 'layers-footer-copyright-text', 'placeholder' => __('Made at the tip of Africa. &copy;', 'layerswp'), 'value' => layers_get_theme_mod('footer-copyright-text'))), 'skip-action' => 'layers_site_setup_step_dismissal', 'submit-action' => 'layers_onboarding_set_theme_mods', 'submit-text' => __('Save', 'layerswp'));
     if (0 == count(get_posts('post_type=nav_menu_item'))) {
         $site_setup_actions['menus'] = array('label' => __('Setup your website menu', 'layerswp'), 'excerpt' => __(sprintf('Navigation is a key element of setting up your website. Controly our menus here. For more information read our <a href="%s" target="_blank">help guide</a>.', 'http://docs.layerswp.com/doc/create-your-menus/'), 'layerswp'), 'form' => array('layers-menu-link' => array('type' => 'button', 'name' => 'layers-menu-link', 'id' => 'layers-menu-link', 'href' => admin_url('nav-menus.php'), 'target' => '_blank', 'tag' => 'a', 'class' => 'layers-button btn-primary', 'label' => __('Setup Menus', 'layerswp'))), 'skip-action' => 'layers_site_setup_step_dismissal');
     }
     return apply_filters('layers_setup_actions', $site_setup_actions);
 }
开发者ID:JaneJieYing,项目名称:HiFridays,代码行数:12,代码来源:init.php

示例4: intercom_js

    function intercom_js()
    {
        global $current_user, $wpdb, $wp_version, $wp_customize;
        // Don't load in the customizer, or if we're not logged in; don't even try it.
        if (!is_user_logged_in() || !is_admin() || !current_user_can('administrator')) {
            return;
        }
        // Get current user info
        $current_user = wp_get_current_user();
        /**
         * Basic Intercom settings
         */
        $json['app_id'] = $this->app_id;
        $json['user_hash'] = (string) hash_hmac('sha256', $current_user->user_email, $this->secret_key);
        /**
         * User centric data
         */
        $json['email'] = (string) $current_user->user_email;
        $json['name'] = (string) $current_user->display_name;
        $json['created_at'] = strtotime($current_user->user_registered);
        $json['company'] = strtotime(get_bloginfo('name'));
        /**
         * Child theme information
         */
        $this->theme = wp_get_theme();
        if ('layerswp' != $this->theme->get('TextDomain')) {
            $json['Theme'] = (string) $this->theme->get('Name');
            $json['Theme Author'] = (string) $this->theme->get('Author');
            $json['Theme Author URL'] = (string) $this->theme->get('AuthorURI');
        }
        /**
         * Layers specific data
         */
        $this->layers_theme = wp_get_theme('layerswp');
        $json['WordPress Version'] = $wp_version;
        $json['Layers Version'] = $this->layers_theme->get('Version');
        $json['Layers Page Count'] = (double) count(layers_get_builder_pages());
        /**
         * Website URL
         */
        $json['Website URL'] = (string) get_home_url();
        /**
         * Important plugins
         */
        $json['Easy Digital Downloads'] = (bool) (class_exists('Easy_Digital_Downloads') ? 1 : 0);
        $json['WooCommerce'] = (bool) (class_exists('WooCommerce') ? 1 : 0);
        $json['Layers Updater'] = (bool) (class_exists('Layers_Updater') || is_plugin_active_for_network('Layers_Updater') ? 1 : 0);
        if (class_exists('Layers_DevKit') && defined('LAYERS_DEVKIT_VER')) {
            $json['DevKit'] = LAYERS_DEVKIT_VER;
        }
        if (class_exists('Layers_ColorKit') && defined('LAYERS_COLORKIT_VER')) {
            $json['ColorKit'] = LAYERS_COLORKIT_VER;
        }
        if (class_exists('Layers_WooCommerce') && defined('LAYERS_STOREKIT_VER')) {
            $json['StoreKit'] = LAYERS_STOREKIT_VER;
        }
        if (class_exists('Layers_Showcase') && defined('LAYERS_SHOWCASE_VER')) {
            $json['Showcase'] = LAYERS_SHOWCASE_VER;
        }
        if (class_exists('Layers_Pro') && defined('LAYERS_PRO_VER')) {
            $json['Layers Pro'] = LAYERS_PRO_VER;
        }
        if (get_option('info_site_usage')) {
            $json['Site Category'] = get_option('info_site_usage');
        }
        $json['Skill Level'] = get_option('layers_info_developer');
        $json['Launchpad'] = class_exists('apollo_launchpad') ? 1 : 0;
        $launchpad = get_option('apollo_display_options');
        if (isset($launchpad['launchdate'])) {
            $json['launched_at'] = strtotime($launchpad['launchdate']);
        }
        $json['Custom CSS'] = (bool) layers_get_theme_mod('custom-css');
        // jsonify the settings
        $settings_json = json_encode((object) $json, defined('JSON_PRETTY_PRINT') ? JSON_PRETTY_PRINT : TRUE);
        ?>

		<script>window.intercomSettings = <?php 
        echo $settings_json;
        ?>
;</script>

		<script>(function(){var w=window;var ic=w.Intercom;if(typeof ic==="function"){ic('reattach_activator');ic('update',intercomSettings);}else{var d=document;var i=function(){i.c(arguments)};i.q=[];i.c=function(args){i.q.push(args)};w.Intercom=i;function l(){var s=d.createElement('script');s.type='text/javascript';s.async=true;s.src='https://widget.intercom.io/widget/<?php 
        echo $this->app_id;
        ?>
';var x=d.getElementsByTagName('script')[0];x.parentNode.insertBefore(s,x);}if(w.attachEvent){w.attachEvent('onload',l);}else{w.addEventListener('load',l,false);}}})()</script>
	<?php 
    }
开发者ID:maheshwaghmare,项目名称:layerswp,代码行数:87,代码来源:intercom.php

示例5: layers_apply_custom_styles

 function layers_apply_custom_styles()
 {
     wp_enqueue_style(LAYERS_THEME_SLUG . '-custom-styles', get_template_directory_uri() . '/assets/css/custom.css');
     wp_add_inline_style(LAYERS_THEME_SLUG . '-custom-styles', layers_get_theme_mod('custom-css'));
 }
开发者ID:anupvit,项目名称:hariomtoolsandtackleswebsite,代码行数:5,代码来源:template.php

示例6: layers_header_class

		<header <?php 
layers_header_class();
?>
 >
			<?php 
do_action('layers_before_header_inner');
?>
			<div class="<?php 
if ('layout-fullwidth' != layers_get_theme_mod('header-width')) {
    echo 'container';
}
?>
 clearfix">
				<?php 
if ('header-logo-center' == layers_get_theme_mod('header-menu-layout')) {
    ?>
					<?php 
    get_template_part('partials/header', 'centered');
    ?>
				<?php 
} else {
    ?>
					<?php 
    get_template_part('partials/header', 'standard');
    ?>
				<?php 
}
// if centered header
?>
			</div>
开发者ID:antares-ff,项目名称:ANTARES-Test,代码行数:30,代码来源:header.php

示例7: layers_add_google_analytics

    function layers_add_google_analytics()
    {
        $analytics_id = layers_get_theme_mod('header-google-id');
        if ('' != $analytics_id) {
            ?>
			<script>
			  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
			  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
			  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
			  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

			  ga('create', '<?php 
            echo $analytics_id;
            ?>
', 'auto');
			  ga('send', 'pageview');

			</script>
		<?php 
        }
    }
开发者ID:antares-ff,项目名称:ANTARES-Test,代码行数:21,代码来源:template.php

示例8: get_layers_field_name

 /**
  * Widget name generation (replaces get_custom_field_id)
  *
  * @param    string  $field_name_1   Level 1 name
  * @param    string  $field_name_2   Level 2 name
  * @param    string  $field_name_3   Level 3 name
  * @return   string  Name attribute
  */
 function get_layers_field_name($field_name_1 = '', $field_name_2 = '', $field_name_3 = '')
 {
     // If we don't have these important widget details then bail.
     if (!isset($this->widget['name'])) {
         return;
     }
     // Compile the first part.
     $string = $this->widget['name'];
     // Now add any custom strings passed as args.
     if ('' != $field_name_1) {
         $string .= '[' . $field_name_1 . ']';
     }
     if ('' != $field_name_2) {
         $string .= '[' . $field_name_2 . ']';
     }
     if ('' != $field_name_3) {
         $string .= '[' . $field_name_3 . ']';
     }
     if ((bool) layers_get_theme_mod('dev-switch-widget-field-names')) {
         $debug_string = substr($string, strpos($string, ']') + 1, strlen($string));
         echo '<span class="layers-widget-defaults-debug">' . $debug_string . '</span><br />';
     }
     return $string;
 }
开发者ID:HackingWP,项目名称:layerswp,代码行数:32,代码来源:design-bar.php

示例9: layers_center_column_class

        global $product;
        $_product = $product;
        ?>
            <div <?php 
        layers_center_column_class();
        ?>
>
                <div class="product-top clearfix">
                    <?php 
        do_action('woocommerce_before_single_product', $post, $_product);
        ?>
                    <div class="row">
                        
                        <!-- Show the Images -->
                        <div class="column product-images span-6 <?php 
        echo 'advanced-layout-right' == layers_get_theme_mod('woocommerce-product-page-layout') ? 'pull-right no-gutter' : '';
        ?>
">
                            <?php 
        do_action('woocommerce_before_single_product_summary', $post, $_product);
        ?>
                        </div>

                        <!-- Show the Product Summary -->
                        <div class="column purchase-options-container span-6">
                            <?php 
        do_action('woocommerce_single_product_summary', $post, $_product);
        ?>
                        </div>
                    </div>
                </div>
开发者ID:JaneJieYing,项目名称:HiFridays,代码行数:31,代码来源:single-product.php

示例10: layers_scripts

 function layers_scripts()
 {
     /**
      * Front end Scripts
      */
     wp_enqueue_script(LAYERS_THEME_SLUG . '-plugins', get_template_directory_uri() . '/assets/js/plugins.js', array('jquery'), LAYERS_VERSION);
     // Sticky-Kit
     wp_enqueue_script(LAYERS_THEME_SLUG . '-framework', get_template_directory_uri() . '/assets/js/layers.framework.js', array('jquery'), LAYERS_VERSION);
     // Framework
     wp_localize_script(LAYERS_THEME_SLUG . '-framework', 'layers_script_settings', array('header_sticky_breakpoint' => apply_filters('layers_sticky_header_breakpoint', 270)));
     if (is_singular() && comments_open() && get_option('thread_comments')) {
         wp_enqueue_script('comment-reply');
     }
     // Comment reply script
     // Google Maps
     wp_register_script(LAYERS_THEME_SLUG . '-map-api', '//maps.googleapis.com/maps/api/js?key=' . layers_get_theme_mod('google-maps-api'));
     wp_register_script(LAYERS_THEME_SLUG . '-map-trigger', get_template_directory_uri() . '/core/widgets/js/maps.js', array('jquery'), LAYERS_VERSION);
     /**
      * Front end Styles
      */
     wp_enqueue_style(LAYERS_THEME_SLUG . '-framework', get_template_directory_uri() . '/assets/css/framework.css', array(), LAYERS_VERSION);
     wp_enqueue_style(LAYERS_THEME_SLUG . '-components', get_template_directory_uri() . '/assets/css/components.css', array(), LAYERS_VERSION);
     // Compontents
     wp_enqueue_style(LAYERS_THEME_SLUG . '-responsive', get_template_directory_uri() . '/assets/css/responsive.css', array(), LAYERS_VERSION);
     // Responsive
     wp_enqueue_style(LAYERS_THEME_SLUG . '-icon-fonts', get_template_directory_uri() . '/assets/css/layers-icons.css', array(), LAYERS_VERSION);
     // Icon Font
     if (class_exists('WooCommerce')) {
         wp_enqueue_style(LAYERS_THEME_SLUG . '-woocommerce', get_template_directory_uri() . '/assets/css/woocommerce.css', array(), LAYERS_VERSION);
         // Woocommerce
     }
     if (is_admin_bar_showing()) {
         wp_enqueue_style(LAYERS_THEME_SLUG . '-admin', get_template_directory_uri() . '/core/assets/icons.css', array(), LAYERS_VERSION);
         // Admin CSS
     }
     wp_register_style(LAYERS_THEME_SLUG . '-font-awesome', get_template_directory_uri() . '/core/assets/plugins/font-awesome/font-awesome.min.css', array(), LAYERS_VERSION);
     // Font Awesome
     // Swiper Slider
     wp_register_script(LAYERS_THEME_SLUG . '-slider-js', get_template_directory_uri() . '/core/widgets/js/swiper.js', array('jquery'), LAYERS_VERSION);
     wp_register_style(LAYERS_THEME_SLUG . '-slider', get_template_directory_uri() . '/core/widgets/css/swiper.css', array(), LAYERS_VERSION);
     // Layers Masonry.
     wp_register_script(LAYERS_THEME_SLUG . '-layers-masonry-js', get_template_directory_uri() . '/assets/js/layers.masonry.js', array('jquery', 'masonry'), LAYERS_VERSION);
 }
开发者ID:maheshwaghmare,项目名称:layerswp,代码行数:43,代码来源:functions.php

示例11: wp_nav_menu

					<div class="column span-6 clearfix t-right">
						<?php 
wp_nav_menu(array('theme_location' => LAYERS_THEME_SLUG . '-footer', 'container' => 'nav', 'container_class' => 'nav nav-horizontal pull-right', 'fallback_cb' => false));
?>
					</div>
				</div>
				<?php 
do_action('layers_after_footer_copyright');
?>
			</div>
			<?php 
do_action('layers_after_footer_inner');
?>

			<?php 
if (false != layers_get_theme_mod('show-layers-badge')) {
    ?>
				<?php 
    _e(sprintf('<a class="created-using-layers" target="_blank" tooltip="Built with Layers" href="%s"><span>Built with Layers</span></a>', 'http://www.layerswp.com'), 'layerswp');
    ?>
			<?php 
}
?>
		</footer><!-- END / FOOTER -->
		<?php 
do_action('layers_after_footer');
?>

	</section><!-- END / MAIN SITE #wrapper -->
	<?php 
do_action('layers_after_site_wrapper');
开发者ID:HackingWP,项目名称:layerswp,代码行数:31,代码来源:footer.php

示例12: layers_woocommerce_can_show_sidebar

 function layers_woocommerce_can_show_sidebar($can_show_sidebar, $sidebar)
 {
     if (is_post_type_archive('product')) {
         $can_show_sidebar = layers_get_theme_mod('archive-' . $sidebar);
     } elseif (is_singular('product')) {
         $can_show_sidebar = layers_get_theme_mod('single-' . $sidebar);
     }
     return $can_show_sidebar;
 }
开发者ID:angelabier1,项目名称:layerswp,代码行数:9,代码来源:woocommerce.php

示例13: layers_child_customizer_styles

 function layers_child_customizer_styles()
 {
     /**
      * Setup the colors to use below
      */
     $widget_title_color = layers_get_theme_mod('widget-title-color', TRUE);
     if ('' != $widget_title_color) {
         // Content - Links
         layers_inline_styles(array('selectors' => array('.sidebar .section-nav-title'), 'css' => array('color' => $widget_title_color)));
     }
 }
开发者ID:resarahman,项目名称:Layers-Child-Demo,代码行数:11,代码来源:functions.php

示例14: do_action

    ?>
				<?php 
}
// if 0 != sidebars
?>

				<?php 
do_action('layers_before_footer_copyright');
?>
				<div class="row copyright">
					<?php 
if ('' != layers_get_theme_mod('footer-copyright-text')) {
    ?>
						<div class="column span-6">
							<p class="site-text"><?php 
    echo esc_html(layers_get_theme_mod('footer-copyright-text'));
    ?>
</p>
						</div>
					<?php 
}
?>
					<div class="column span-6 clearfix t-right">
						<?php 
wp_nav_menu(array('theme_location' => LAYERS_THEME_SLUG . '-footer', 'container' => 'nav', 'container_class' => 'nav nav-horizontal pull-right', 'fallback_cb' => false));
?>
					</div>
				</div>
				<?php 
do_action('layers_after_footer_copyright');
?>
开发者ID:antares-ff,项目名称:ANTARES-Test,代码行数:31,代码来源:footer.php

示例15: get_header

/**
 * The template for displaying Woo Commerce products
 *
 * @package Layers
 * @since Layers 1.0.0
 * @version     1.6.4
 */
get_header();
?>

<?php 
get_template_part('partials/header', 'page-title');
?>

<section class="<?php 
if ('layout-fullwidth' != layers_get_theme_mod('content-layout-layout')) {
    echo 'container';
}
?>
 clearfix content-main row">

        <?php 
/**
 * Maybe show the left sidebar
 */
layers_maybe_get_sidebar('left-woocommerce-sidebar', implode(' ', layers_get_wrapper_class('left_woocommerce_sidebar', 'column pull-left sidebar span-3')));
?>

        <?php 
if (have_posts()) {
    ?>
开发者ID:HackingWP,项目名称:layerswp,代码行数:31,代码来源:taxonomy-product_cat.php


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