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

PHP ttfmake_is_plus函数代码示例

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

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



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

示例1: ttfmake_customizer_define_footer_sections

 /**
  * Define the sections and settings for the Footer panel
  *
  * @since  1.3.0.
  *
  * @param  array    $sections    The master array of Customizer sections
  * @return array                 The augmented master array
  */
 function ttfmake_customizer_define_footer_sections($sections)
 {
     $theme_prefix = 'ttfmake_';
     $panel = 'ttfmake_footer';
     $footer_sections = array();
     /**
      * Background Image
      */
     $footer_sections['footer-background'] = array('panel' => $panel, 'title' => __('Background Image', 'make'), 'options' => array('footer-background-image' => array('setting' => array('sanitize_callback' => 'esc_url_raw'), 'control' => array('control_type' => 'TTFMAKE_Customize_Image_Control', 'label' => __('Footer Background Image', 'make'), 'context' => $theme_prefix . 'footer-background-image')), 'footer-background-repeat' => array('setting' => array('sanitize_callback' => 'ttfmake_sanitize_choice'), 'control' => array('label' => __('Footer Background Repeat', 'make'), 'type' => 'radio', 'choices' => ttfmake_get_choices('footer-background-repeat'))), 'footer-background-position' => array('setting' => array('sanitize_callback' => 'ttfmake_sanitize_choice'), 'control' => array('label' => __('Footer Background Position', 'make'), 'type' => 'radio', 'choices' => ttfmake_get_choices('footer-background-position'))), 'footer-background-size' => array('setting' => array('sanitize_callback' => 'ttfmake_sanitize_choice'), 'control' => array('label' => __('Footer Background Size', 'make'), 'type' => 'radio', 'choices' => ttfmake_get_choices('footer-background-size')))));
     /**
      * Widget Areas
      */
     $footer_sections['footer-widget'] = array('panel' => $panel, 'title' => __('Widget Areas', 'make'), 'options' => array('footer-widget-areas' => array('setting' => array('sanitize_callback' => 'ttfmake_sanitize_choice'), 'control' => array('label' => __('Number of Widget Areas', 'make'), 'type' => 'select', 'choices' => ttfmake_get_choices('footer-widget-areas')))));
     /**
      * Layout
      */
     $footer_sections['footer'] = array('panel' => $panel, 'title' => __('Layout', 'make'), 'options' => array('footer-layout' => array('setting' => array('sanitize_callback' => 'ttfmake_sanitize_choice'), 'control' => array('label' => __('Footer Layout', 'make'), 'type' => 'select', 'choices' => ttfmake_get_choices('footer-layout'))), 'footer-layout-line' => array('control' => array('control_type' => 'TTFMAKE_Customize_Misc_Control', 'type' => 'line')), 'footer-text' => array('setting' => array('sanitize_callback' => 'ttfmake_sanitize_text', 'transport' => 'postMessage'), 'control' => array('label' => __('Footer Text', 'make'), 'type' => 'text')), 'footer-options-heading' => array('control' => array('control_type' => 'TTFMAKE_Customize_Misc_Control', 'type' => 'heading', 'label' => __('Social Icons', 'make'))), 'footer-show-social' => array('setting' => array('sanitize_callback' => 'absint'), 'control' => array('label' => __('Show social icons in footer', 'make'), 'type' => 'checkbox'))));
     /**
      * White Label
      */
     if (!ttfmake_is_plus()) {
         $footer_sections['footer-white-label'] = array('panel' => $panel, 'title' => __('White Label', 'make'), 'description' => __('Want to remove the theme byline from your website&#8217;s footer?', 'make'), 'options' => array('footer-white-label-text' => array('control' => array('control_type' => 'TTFMAKE_Customize_Misc_Control', 'type' => 'text', 'description' => sprintf('<a href="%1$s" target="_blank">%2$s</a>', esc_url(ttfmake_get_plus_link('white-label')), sprintf(__('Upgrade to %1$s', 'make'), 'Make Plus'))))));
     }
     // Filter the definitions
     $footer_sections = apply_filters('make_customizer_footer_sections', $footer_sections);
     // Merge with master array
     return array_merge($sections, $footer_sections);
 }
开发者ID:marceloroberto,项目名称:make,代码行数:36,代码来源:footer.php


示例2: ttfmake_customizer_define_typography_sections

 /**
  * Define the sections and settings for the General panel
  *
  * @since  1.3.0.
  *
  * @param  array    $sections    The master array of Customizer sections
  * @return array                 The augmented master array
  */
 function ttfmake_customizer_define_typography_sections($sections)
 {
     $panel = 'ttfmake_typography';
     $typography_sections = array();
     /**
      * Typekit
      */
     if (!ttfmake_is_plus()) {
         $typography_sections['font-typekit'] = array('panel' => $panel, 'title' => __('Typekit', 'make'), 'description' => __('Looking to add premium fonts from Typekit to your website?', 'make'), 'options' => array('font-typekit-update-text' => array('control' => array('control_type' => 'TTFMAKE_Customize_Misc_Control', 'type' => 'text', 'description' => sprintf('<a href="%1$s" target="_blank">%2$s</a>', esc_url(ttfmake_get_plus_link('typekit')), sprintf(__('Upgrade to %1$s', 'make'), 'Make Plus'))))));
     }
     /**
      * Google Web Fonts
      */
     $typography_sections['font-google'] = array('panel' => $panel, 'title' => __('Google Web Fonts', 'make'), 'options' => array('font-subset' => array('setting' => array('sanitize_callback' => 'ttfmake_sanitize_font_subset'), 'control' => array('label' => __('Character Subset', 'make'), 'type' => 'select', 'choices' => ttfmake_get_google_font_subsets())), 'font-subset-text' => array('control' => array('control_type' => 'TTFMAKE_Customize_Misc_Control', 'type' => 'text', 'description' => __('Not all fonts provide each of these subsets.', 'make')))));
     /**
      * Site Title & Tagline
      */
     $typography_sections['font-site-title-tagline'] = array('panel' => $panel, 'title' => __('Site Title &amp; Tagline', 'make'), 'options' => array('font-family-site-title' => array('setting' => array('sanitize_callback' => 'ttfmake_sanitize_font_choice'), 'control' => array('label' => __('Site Title Font Family', 'make'), 'type' => 'select', 'choices' => ttfmake_font_choices_placeholder())), 'font-size-site-title' => array('setting' => array('sanitize_callback' => 'absint'), 'control' => array('label' => __('Site Title Font Size (in px)', 'make'), 'type' => ttfmake_customizer_supports_panels() ? 'number' : 'text')), 'font-family-site-tagline' => array('setting' => array('sanitize_callback' => 'ttfmake_sanitize_font_choice'), 'control' => array('label' => __('Site Tagline Font Family', 'make'), 'type' => 'select', 'choices' => ttfmake_font_choices_placeholder())), 'font-size-site-tagline' => array('setting' => array('sanitize_callback' => 'absint'), 'control' => array('label' => __('Site Tagline Font Size (in px)', 'make'), 'type' => ttfmake_customizer_supports_panels() ? 'number' : 'text'))));
     /**
      * Main Navigation
      */
     $typography_sections['font-main-menu'] = array('panel' => $panel, 'title' => __('Main Menu', 'make'), 'options' => array('font-family-nav' => array('setting' => array('sanitize_callback' => 'ttfmake_sanitize_font_choice'), 'control' => array('label' => __('Menu Item Font Family', 'make'), 'type' => 'select', 'choices' => ttfmake_font_choices_placeholder())), 'font-size-nav' => array('setting' => array('sanitize_callback' => 'absint'), 'control' => array('label' => __('Menu Item Font Size (in px)', 'make'), 'type' => ttfmake_customizer_supports_panels() ? 'number' : 'text')), 'font-family-subnav' => array('setting' => array('sanitize_callback' => 'ttfmake_sanitize_font_choice'), 'control' => array('label' => __('Sub-Menu Item Font Family', 'make'), 'type' => 'select', 'choices' => ttfmake_font_choices_placeholder())), 'font-size-subnav' => array('setting' => array('sanitize_callback' => 'absint'), 'control' => array('label' => __('Sub-Menu Item Font Size (in px)', 'make'), 'type' => ttfmake_customizer_supports_panels() ? 'number' : 'text')), 'font-subnav-option-heading' => array('control' => array('control_type' => 'TTFMAKE_Customize_Misc_Control', 'type' => 'heading', 'label' => __('Sub-Menu Item Options', 'make'))), 'font-subnav-mobile' => array('setting' => array('sanitize_callback' => 'absint'), 'control' => array('label' => __('Use Menu Item styles in mobile view', 'make'), 'type' => 'checkbox'))));
     /**
      * Widgets
      */
     $typography_sections['font-widget'] = array('panel' => $panel, 'title' => __('Widgets', 'make'), 'options' => array('font-family-widget' => array('setting' => array('sanitize_callback' => 'ttfmake_sanitize_font_choice'), 'control' => array('label' => __('Widget Font Family', 'make'), 'type' => 'select', 'choices' => ttfmake_font_choices_placeholder())), 'font-size-widget' => array('setting' => array('sanitize_callback' => 'absint'), 'control' => array('label' => __('Widget Font Size (in px)', 'make'), 'type' => ttfmake_customizer_supports_panels() ? 'number' : 'text'))));
     /**
      * Headers & Body
      */
     $typography_sections['font'] = array('panel' => $panel, 'title' => __('Headers &amp; Body', 'make'), 'options' => array('font-family-h1' => array('setting' => array('sanitize_callback' => 'ttfmake_sanitize_font_choice'), 'control' => array('label' => __('H1 Font Family', 'make'), 'type' => 'select', 'choices' => ttfmake_font_choices_placeholder())), 'font-size-h1' => array('setting' => array('sanitize_callback' => 'absint'), 'control' => array('label' => __('H1 Font Size (in px)', 'make'), 'type' => ttfmake_customizer_supports_panels() ? 'number' : 'text')), 'font-family-h2' => array('setting' => array('sanitize_callback' => 'ttfmake_sanitize_font_choice'), 'control' => array('label' => __('H2 Font Family', 'make'), 'type' => 'select', 'choices' => ttfmake_font_choices_placeholder())), 'font-size-h2' => array('setting' => array('sanitize_callback' => 'absint'), 'control' => array('label' => __('H2 Font Size (in px)', 'make'), 'type' => ttfmake_customizer_supports_panels() ? 'number' : 'text')), 'font-family-h3' => array('setting' => array('sanitize_callback' => 'ttfmake_sanitize_font_choice'), 'control' => array('label' => __('H3 Font Family', 'make'), 'type' => 'select', 'choices' => ttfmake_font_choices_placeholder())), 'font-size-h3' => array('setting' => array('sanitize_callback' => 'absint'), 'control' => array('label' => __('H3 Font Size (in px)', 'make'), 'type' => ttfmake_customizer_supports_panels() ? 'number' : 'text')), 'font-family-h4' => array('setting' => array('sanitize_callback' => 'ttfmake_sanitize_font_choice'), 'control' => array('label' => __('H4 Font Family', 'make'), 'type' => 'select', 'choices' => ttfmake_font_choices_placeholder())), 'font-size-h4' => array('setting' => array('sanitize_callback' => 'absint'), 'control' => array('label' => __('H4 Font Size (in px)', 'make'), 'type' => ttfmake_customizer_supports_panels() ? 'number' : 'text')), 'font-family-h5' => array('setting' => array('sanitize_callback' => 'ttfmake_sanitize_font_choice'), 'control' => array('label' => __('H5 Font Family', 'make'), 'type' => 'select', 'choices' => ttfmake_font_choices_placeholder())), 'font-size-h5' => array('setting' => array('sanitize_callback' => 'absint'), 'control' => array('label' => __('H5 Font Size (in px)', 'make'), 'type' => ttfmake_customizer_supports_panels() ? 'number' : 'text')), 'font-family-h6' => array('setting' => array('sanitize_callback' => 'ttfmake_sanitize_font_choice'), 'control' => array('label' => __('H6 Font Family', 'make'), 'type' => 'select', 'choices' => ttfmake_font_choices_placeholder())), 'font-size-h6' => array('setting' => array('sanitize_callback' => 'absint'), 'control' => array('label' => __('H6 Font Size (in px)', 'make'), 'type' => ttfmake_customizer_supports_panels() ? 'number' : 'text')), 'font-family-body' => array('setting' => array('sanitize_callback' => 'ttfmake_sanitize_font_choice'), 'control' => array('label' => __('Body Font Family', 'make'), 'type' => 'select', 'choices' => ttfmake_font_choices_placeholder())), 'font-size-body' => array('setting' => array('sanitize_callback' => 'absint'), 'control' => array('label' => __('Body Font Size (in px)', 'make'), 'type' => ttfmake_customizer_supports_panels() ? 'number' : 'text'))));
     // Filter the definitions
     $typography_sections = apply_filters('make_customizer_typography_sections', $typography_sections);
     // Merge with master array
     return array_merge($sections, $typography_sections);
 }
开发者ID:marceloroberto,项目名称:make,代码行数:43,代码来源:typography.php


示例3: __construct

 /**
  * Initiate actions.
  *
  * @since  1.0.0.
  *
  * @return TTFMAKE_Builder_Base
  */
 public function __construct()
 {
     // Include the API
     require get_template_directory() . '/inc/builder/core/api.php';
     // Add the core sections
     require get_template_directory() . '/inc/builder/sections/section-definitions.php';
     // Include the save routines
     require get_template_directory() . '/inc/builder/core/save.php';
     // Include the front-end helpers
     require get_template_directory() . '/inc/builder/sections/section-front-end-helpers.php';
     // Set up actions
     add_action('admin_init', array($this, 'register_post_type_support_for_builder'));
     add_action('add_meta_boxes', array($this, 'add_meta_boxes'), 1);
     // Bias toward top of stack
     add_action('admin_enqueue_scripts', array($this, 'admin_enqueue_scripts'), 11);
     add_action('admin_print_styles-post.php', array($this, 'admin_print_styles'));
     add_action('admin_print_styles-post-new.php', array($this, 'admin_print_styles'));
     add_filter('admin_body_class', array($this, 'admin_body_class'));
     add_action('admin_footer', array($this, 'print_templates'));
     add_action('tiny_mce_before_init', array($this, 'tiny_mce_before_init'), 15, 2);
     add_action('after_wp_tiny_mce', array($this, 'after_wp_tiny_mce'));
     add_action('post_submitbox_misc_actions', array($this, 'builder_toggle'));
     if (false === ttfmake_is_plus()) {
         add_action('post_submitbox_misc_actions', array($this, 'post_submitbox_misc_actions'));
     }
 }
开发者ID:natejacobson,项目名称:WSUWP-spine-parent-theme,代码行数:33,代码来源:base.php


示例4: ttfmake_customizer_define_typography_sections

 /**
  * Define the sections and settings for the General panel
  *
  * @since  1.3.0.
  *
  * @param  array    $sections    The master array of Customizer sections
  * @return array                 The augmented master array
  */
 function ttfmake_customizer_define_typography_sections($sections)
 {
     $panel = 'ttfmake_typography';
     $typography_sections = array();
     /**
      * Global
      */
     $typography_sections['font'] = array('panel' => $panel, 'title' => __('Global', 'make'), 'options' => array_merge(ttfmake_customizer_typography_group_definitions('body', __('Default', 'make')), array('body-link-group' => array('control' => array('control_type' => 'TTFMAKE_Customize_Misc_Control', 'label' => __('Links', 'make'), 'type' => 'group-title')), 'font-weight-body-link' => array('setting' => array('sanitize_callback' => 'ttfmake_sanitize_choice'), 'control' => array('control_type' => 'TTFMAKE_Customize_Radio_Control', 'label' => __('Font Weight', 'make'), 'type' => 'radio', 'mode' => 'buttonset', 'choices' => ttfmake_get_choices('font-weight-body-link'))))));
     /**
      * Text Headers
      */
     $typography_sections['font-headers'] = array('panel' => $panel, 'title' => __('Text Headers', 'make'), 'options' => array_merge(ttfmake_customizer_typography_group_definitions('h1', __('H1', 'make')), ttfmake_customizer_typography_group_definitions('h2', __('H2', 'make')), ttfmake_customizer_typography_group_definitions('h3', __('H3', 'make')), ttfmake_customizer_typography_group_definitions('h4', __('H4', 'make')), ttfmake_customizer_typography_group_definitions('h5', __('H5', 'make')), ttfmake_customizer_typography_group_definitions('h6', __('H6', 'make'))));
     /**
      * Site Title & Tagline
      */
     $typography_sections['font-site-title-tagline'] = array('panel' => $panel, 'title' => __('Site Title &amp; Tagline', 'make'), 'options' => array_merge(ttfmake_customizer_typography_group_definitions('site-title', __('Site Title', 'make')), ttfmake_customizer_typography_group_definitions('site-tagline', __('Tagline', 'make'))));
     /**
      * Main Navigation
      */
     $typography_sections['font-main-menu'] = array('panel' => $panel, 'title' => __('Main Menu', 'make'), 'options' => array_merge(ttfmake_customizer_typography_group_definitions('nav', __('Menu Items', 'make')), ttfmake_customizer_typography_group_definitions('subnav', __('Sub-Menu Items', 'make')), array('font-nav-mobile-option-heading' => array('control' => array('control_type' => 'TTFMAKE_Customize_Misc_Control', 'type' => 'heading', 'label' => __('Mobile', 'make'))), 'font-subnav-mobile' => array('setting' => array('sanitize_callback' => 'absint'), 'control' => array('label' => __('Use Menu Item styles in mobile view', 'make'), 'type' => 'checkbox')), 'font-nav-current-item-option-heading' => array('control' => array('control_type' => 'TTFMAKE_Customize_Misc_Control', 'type' => 'group-title', 'label' => __('Current Item', 'make'))), 'font-weight-nav-current-item' => array('setting' => array('sanitize_callback' => 'ttfmake_sanitize_choice'), 'control' => array('control_type' => 'TTFMAKE_Customize_Radio_Control', 'label' => __('Font Weight', 'make'), 'type' => 'radio', 'mode' => 'buttonset', 'choices' => ttfmake_get_choices('font-weight-nav-current-item'))))));
     /**
      * Header Bar
      */
     $typography_sections['font-header-bar'] = array('panel' => $panel, 'title' => __('Header Bar', 'make'), 'options' => ttfmake_customizer_typography_group_definitions('header-bar-text', __('Header Bar Text', 'make'), __('Includes Header Text, Header Bar Menu items, and the search field.', 'make')));
     /**
      * Sidebars
      */
     $typography_sections['font-sidebar'] = array('panel' => $panel, 'title' => __('Sidebars', 'make'), 'options' => array_merge(ttfmake_customizer_typography_group_definitions('widget-title', __('Widget Title', 'make')), ttfmake_customizer_typography_group_definitions('widget', __('Widget Body', 'make'))));
     /**
      * Footer
      */
     $typography_sections['font-footer'] = array('panel' => $panel, 'title' => __('Footer', 'make'), 'options' => array_merge(ttfmake_customizer_typography_group_definitions('footer-widget-title', __('Widget Title', 'make')), ttfmake_customizer_typography_group_definitions('footer-widget', __('Widget Body', 'make')), ttfmake_customizer_typography_group_definitions('footer-text', __('Footer Text', 'make'))));
     /**
      * Google Font Subsets
      */
     $typography_sections['font-google'] = array('panel' => $panel, 'title' => __('Google Font Subsets', 'make'), 'options' => array('font-subset' => array('setting' => array('sanitize_callback' => 'ttfmake_sanitize_font_subset'), 'control' => array('label' => __('Character Subset', 'make'), 'type' => 'select', 'choices' => ttfmake_get_google_font_subsets())), 'font-subset-text' => array('control' => array('control_type' => 'TTFMAKE_Customize_Misc_Control', 'type' => 'text', 'description' => sprintf(__('Not all fonts provide each of these subsets. Please visit the %s to see which subsets are available for each font.', 'make'), sprintf('<a href="%1$s" target="_blank">%2$s</a>', esc_url('https://www.google.com/fonts'), __('Google Fonts website', 'make')))))));
     /**
      * Typekit
      */
     if (!ttfmake_is_plus()) {
         $typography_sections['font-typekit'] = array('panel' => $panel, 'title' => __('Typekit', 'make'), 'description' => __('Looking to add premium fonts from Typekit to your website?', 'make'), 'options' => array('font-typekit-update-text' => array('control' => array('control_type' => 'TTFMAKE_Customize_Misc_Control', 'type' => 'text', 'description' => sprintf('<a href="%1$s" target="_blank">%2$s</a>', esc_url(ttfmake_get_plus_link('typekit')), sprintf(__('Upgrade to %1$s', 'make'), 'Make Plus'))))));
     }
     /**
      * Filter the definitions for the controls in the Typography panel of the Customizer.
      *
      * @since 1.3.0.
      *
      * @param array    $typography_sections    The array of definitions.
      */
     $typography_sections = apply_filters('make_customizer_typography_sections', $typography_sections);
     // Merge with master array
     return array_merge($sections, $typography_sections);
 }
开发者ID:fovoc,项目名称:make,代码行数:61,代码来源:typography.php


示例5: ttfmake_add_plus_metabox

/**
 * Add a Make Plus metabox to each qualified post type edit screen
 *
 * @since  1.0.6.
 *
 * @return void
 */
function ttfmake_add_plus_metabox()
{
    if (ttfmake_is_plus() || !is_super_admin()) {
        return;
    }
    // Post types
    $post_types = get_post_types(array('public' => true, '_builtin' => false));
    $post_types[] = 'post';
    $post_types[] = 'page';
    // Add the metabox for each type
    foreach ($post_types as $type) {
        add_meta_box('ttfmake-plus-metabox', __('Layout Settings', 'make'), 'ttfmake_render_plus_metabox', $type, 'side', 'default');
    }
}
开发者ID:marceloroberto,项目名称:make,代码行数:21,代码来源:edit-page.php


示例6: ttfmake_customizer_define_general_sections

 /**
  * Define the sections and settings for the General panel
  *
  * @since  1.3.0.
  *
  * @param  array    $sections    The master array of Customizer sections
  * @return array                 The augmented master array
  */
 function ttfmake_customizer_define_general_sections($sections)
 {
     $theme_prefix = 'ttfmake_';
     $panel = 'ttfmake_general';
     $general_sections = array();
     /**
      * Site Title & Tagline
      *
      * This is a built-in section.
      */
     /**
      * Logo
      */
     $general_sections['logo'] = array('panel' => $panel, 'title' => __('Logo', 'make'), 'options' => array('logo-regular' => array('setting' => array('sanitize_callback' => 'esc_url_raw'), 'control' => array('control_type' => 'TTFMAKE_Customize_Image_Control', 'label' => __('Regular Logo', 'make'), 'context' => $theme_prefix . 'logo-regular')), 'logo-retina' => array('setting' => array('sanitize_callback' => 'esc_url_raw'), 'control' => array('control_type' => 'TTFMAKE_Customize_Image_Control', 'label' => __('Retina Logo (2x)', 'make'), 'description' => __('The Retina Logo should be twice the size of the Regular Logo.', 'make'), 'context' => $theme_prefix . 'logo-retina')), 'logo-favicon' => array('setting' => array('sanitize_callback' => 'esc_url_raw'), 'control' => array('control_type' => 'TTFMAKE_Customize_Image_Control', 'label' => __('Favicon', 'make'), 'description' => __('File must be <strong>.png</strong> or <strong>.ico</strong> format. Optimal dimensions: <strong>32px x 32px</strong>.', 'make'), 'context' => $theme_prefix . 'logo-favicon', 'extensions' => array('png', 'ico'))), 'logo-apple-touch' => array('setting' => array('sanitize_callback' => 'esc_url_raw'), 'control' => array('control_type' => 'TTFMAKE_Customize_Image_Control', 'label' => __('Apple Touch Icon', 'make'), 'description' => __('File must be <strong>.png</strong> format. Optimal dimensions: <strong>152px x 152px</strong>.', 'make'), 'context' => $theme_prefix . 'logo-apple-touch', 'extensions' => array('png')))));
     /**
      * Navigation
      *
      * This is a built-in section.
      */
     /**
      * Labels
      */
     $general_sections['labels'] = array('panel' => $panel, 'title' => __('Labels', 'make'), 'options' => array('navigation-mobile-label' => array('setting' => array('sanitize_callback' => 'esc_html', 'theme_supports' => 'menus', 'transport' => 'postMessage'), 'control' => array('label' => __('Mobile Menu Label', 'make'), 'description' => __('Resize your browser window to preview the mobile menu label.', 'make'), 'type' => 'text')), 'general-sticky-label' => array('setting' => array('sanitize_callback' => 'esc_html', 'transport' => 'postMessage'), 'control' => array('label' => __('Sticky Label', 'make'), 'type' => 'text'))));
     // Only show the Read More label option if no filters have been added to the deprecated filter hook.
     /** This filter is documented in inc/template-tags.php */
     if (false === apply_filters('make_read_more_text', false)) {
         $general_sections['labels']['options']['label-read-more'] = array('setting' => array('sanitize_callback' => 'esc_html', 'transport' => 'postMessage'), 'control' => array('label' => __('Read More Label', 'make'), 'type' => 'text'));
     }
     /**
      * Social Profiles
      */
     $general_sections['social'] = array('panel' => $panel, 'title' => __('Social Profiles', 'make'), 'description' => __('Enter the complete URL to your profile for each service below that you would like to share.', 'make'), 'options' => array('social-facebook-official' => array('setting' => array('sanitize_callback' => 'esc_url_raw'), 'control' => array('label' => 'Facebook', 'type' => 'text')), 'social-twitter' => array('setting' => array('sanitize_callback' => 'esc_url_raw'), 'control' => array('label' => 'Twitter', 'type' => 'text')), 'social-google-plus-square' => array('setting' => array('sanitize_callback' => 'esc_url_raw'), 'control' => array('label' => 'Google +', 'type' => 'text')), 'social-linkedin' => array('setting' => array('sanitize_callback' => 'esc_url_raw'), 'control' => array('label' => 'LinkedIn', 'type' => 'text')), 'social-instagram' => array('setting' => array('sanitize_callback' => 'esc_url_raw'), 'control' => array('label' => 'Instagram', 'type' => 'text')), 'social-flickr' => array('setting' => array('sanitize_callback' => 'esc_url_raw'), 'control' => array('label' => 'Flickr', 'type' => 'text')), 'social-youtube' => array('setting' => array('sanitize_callback' => 'esc_url_raw'), 'control' => array('label' => 'YouTube', 'type' => 'text')), 'social-vimeo-square' => array('setting' => array('sanitize_callback' => 'esc_url_raw'), 'control' => array('label' => 'Vimeo', 'type' => 'text')), 'social-pinterest' => array('setting' => array('sanitize_callback' => 'esc_url_raw'), 'control' => array('label' => 'Pinterest', 'type' => 'text')), 'social-custom-menu-text' => array('control' => array('control_type' => 'TTFMAKE_Customize_Misc_Control', 'type' => 'text', 'description' => sprintf(__('If you would like to add a social profile that is not listed above, or change the order of the icons, create a custom menu %s.', 'make'), sprintf('<a href="' . esc_url('https://thethemefoundry.com/docs/make-docs/tutorials/set-social-profile-links-using-custom-menu/') . '">%s</a>', __('as described here', 'make')))))));
     /**
      * Email
      */
     $general_sections['email'] = array('panel' => $panel, 'title' => __('Email', 'make'), 'description' => __('Enter an email address to add an email icon link to your social profile icons.', 'make'), 'options' => array('social-email' => array('setting' => array('sanitize_callback' => 'sanitize_email'), 'control' => array('label' => 'Email', 'type' => 'text'))));
     /**
      * RSS
      */
     $general_sections['rss'] = array('panel' => $panel, 'title' => __('RSS', 'make'), 'description' => __('If configured, an RSS icon will appear with your social profile icons.', 'make'), 'options' => array('social-rss-heading' => array('control' => array('control_type' => 'TTFMAKE_Customize_Misc_Control', 'type' => 'heading', 'label' => __('Default RSS', 'make'))), 'social-hide-rss' => array('setting' => array('sanitize_callback' => 'absint'), 'control' => array('label' => __('Hide default RSS feed link', 'make'), 'type' => 'checkbox')), 'social-custom-rss' => array('setting' => array('sanitize_callback' => 'esc_url_raw'), 'control' => array('label' => __('Custom RSS URL (replaces default)', 'make'), 'type' => 'text'))));
     /**
      * Static Front Page
      *
      * This is a built-in section.
      */
     /**
      * White Label
      */
     if (!ttfmake_is_plus()) {
         $general_sections['footer-white-label'] = array('panel' => $panel, 'title' => __('White Label', 'make'), 'description' => __('Want to remove the theme byline from your website&#8217;s footer?', 'make'), 'options' => array('footer-white-label-text' => array('control' => array('control_type' => 'TTFMAKE_Customize_Misc_Control', 'type' => 'text', 'description' => sprintf('<a href="%1$s" target="_blank">%2$s</a>', esc_url(ttfmake_get_plus_link('white-label')), sprintf(__('Upgrade to %1$s', 'make'), 'Make Plus'))))));
     }
     /**
      * Filter the definitions for the controls in the General panel of the Customizer.
      *
      * @since 1.3.0.
      *
      * @param array    $general_sections    The array of definitions.
      */
     $general_sections = apply_filters('make_customizer_general_sections', $general_sections);
     // Merge with master array
     return array_merge($sections, $general_sections);
 }
开发者ID:2015wp2beup2date4kwii,项目名称:make,代码行数:70,代码来源:general.php


示例7: admin_enqueue_scripts

 /**
  * Enqueue the JS and CSS for the admin.
  *
  * @since  1.0.0.
  *
  * @param  string    $hook_suffix    The suffix for the screen.
  * @return void
  */
 public function admin_enqueue_scripts($hook_suffix)
 {
     // Only load resources if they are needed on the current page
     if (!in_array($hook_suffix, array('post.php', 'post-new.php')) || !ttfmake_post_type_supports_builder(get_post_type())) {
         return;
     }
     wp_register_script('ttfmake-sections/js/models/gallery-item.js', get_template_directory_uri() . '/inc/builder/sections/js/models/gallery-item.js', array(), TTFMAKE_VERSION, true);
     wp_register_script('ttfmake-sections/js/views/gallery-item.js', get_template_directory_uri() . '/inc/builder/sections/js/views/gallery-item.js', array(), TTFMAKE_VERSION, true);
     wp_register_script('ttfmake-sections/js/views/gallery.js', get_template_directory_uri() . '/inc/builder/sections/js/views/gallery.js', array(), TTFMAKE_VERSION, true);
     wp_register_script('ttfmake-sections/js/views/text.js', get_template_directory_uri() . '/inc/builder/sections/js/views/text.js', array(), TTFMAKE_VERSION, true);
     wp_register_script('ttfmake-sections/js/models/banner-slide.js', get_template_directory_uri() . '/inc/builder/sections/js/models/banner-slide.js', array(), TTFMAKE_VERSION, true);
     wp_register_script('ttfmake-sections/js/views/banner-slide.js', get_template_directory_uri() . '/inc/builder/sections/js/views/banner-slide.js', array(), TTFMAKE_VERSION, true);
     wp_register_script('ttfmake-sections/js/views/banner.js', get_template_directory_uri() . '/inc/builder/sections/js/views/banner.js', array(), TTFMAKE_VERSION, true);
     if (false === ttfmake_is_plus()) {
         wp_enqueue_script('ttfmake-sections/js/quick-start.js', get_template_directory_uri() . '/inc/builder/sections/js/quick-start.js', array('ttfmake-builder'), TTFMAKE_VERSION, true);
     }
     // Add additional dependencies to the Builder JS
     add_filter('ttfmake_builder_js_dependencies', array($this, 'add_js_dependencies'));
     // Add the section CSS
     wp_enqueue_style('ttfmake-sections/css/sections.css', get_template_directory_uri() . '/inc/builder/sections/css/sections.css', array(), TTFMAKE_VERSION, 'all');
 }
开发者ID:marceloroberto,项目名称:make,代码行数:29,代码来源:section-definitions.php


示例8: ttfmake_customizer_scripts

 /**
  * Enqueue customizer sections script
  *
  * Hooked to 'customize_controls_enqueue_scripts' via ttfmake_customizer_init()
  *
  * @since  1.5.0.
  *
  * @return void
  */
 function ttfmake_customizer_scripts()
 {
     // Styles
     wp_enqueue_style('ttfmake-customizer-jquery-ui', get_template_directory_uri() . '/inc/customizer/css/jquery-ui/jquery-ui-1.10.4.custom.css', array(), '1.10.4');
     wp_enqueue_style('ttfmake-customizer-chosen', get_template_directory_uri() . '/inc/customizer/css/chosen/chosen.css', array(), '1.3.0');
     // Custom styling depends on version of WP
     // Nav menu panel was introduced in 4.3
     $suffix = '';
     if (!class_exists('WP_Customize_Nav_Menus')) {
         $suffix = '-legacy';
     }
     wp_enqueue_style('ttfmake-customizer-sections', get_template_directory_uri() . "/inc/customizer/css/customizer-sections{$suffix}.css", array('ttfmake-customizer-jquery-ui', 'ttfmake-customizer-chosen'), TTFMAKE_VERSION);
     // Scripts
     wp_enqueue_script('ttfmake-customizer-chosen', get_template_directory_uri() . '/inc/customizer/js/chosen.jquery.js', array('jquery', 'customize-controls'), '1.3.0', true);
     wp_enqueue_script('ttfmake-customizer-sections', get_template_directory_uri() . '/inc/customizer/js/customizer-sections' . TTFMAKE_SUFFIX . '.js', array('customize-controls', 'ttfmake-customizer-chosen'), TTFMAKE_VERSION, true);
     // Collect localization data
     $data = array('fontOptions' => ttfmake_get_font_property_option_keys('font-family'), 'allFontChoices' => ttfmake_all_font_choices_js());
     // Add localization strings
     if (!ttfmake_is_plus()) {
         $localize = array('chosen_no_results_default' => esc_html__('No results match', 'make'), 'chosen_no_results_fonts' => esc_html__('No matching fonts', 'make'), 'plusURL' => esc_url(ttfmake_get_plus_link('customize-head')), 'plusLabel' => esc_html__('Upgrade to Make Plus', 'make'));
         $data = $data + $localize;
     }
     // Localize the script
     wp_localize_script('ttfmake-customizer-sections', 'ttfmakeCustomizerL10n', $data);
 }
开发者ID:jalex403,项目名称:make,代码行数:34,代码来源:bootstrap.php


示例9: ttfmake_customizer_sections_script

 /**
  * Enqueue customizer sections script
  *
  * Hooked to 'customize_controls_enqueue_scripts' via ttfmake_customizer_init()
  *
  * @since  1.0.0.
  *
  * @return void
  */
 function ttfmake_customizer_sections_script()
 {
     wp_enqueue_script('ttfmake-customizer-sections', get_template_directory_uri() . '/inc/customizer/js/customizer-sections' . TTFMAKE_SUFFIX . '.js', array('customize-controls'), TTFMAKE_VERSION, true);
     // Collect localization data
     $data = array('fontOptions' => ttfmake_get_font_property_option_keys('family'), 'allFontChoices' => ttfmake_all_font_choices_js());
     // Add localization strings for Upgrade button
     if (!ttfmake_is_plus()) {
         $localize = array('plusURL' => esc_url(ttfmake_get_plus_link('customize-head')), 'plusLabel' => __('Upgrade to Make Plus', 'make'));
         $data = $data + $localize;
     }
     // Localize the script
     wp_localize_script('ttfmake-customizer-sections', 'ttfmakeCustomizerL10n', $data);
 }
开发者ID:marceloroberto,项目名称:make,代码行数:22,代码来源:bootstrap.php


示例10: admin_body_class

 /**
  * Add a class to indicate the current template being used.
  *
  * @since  1.0.4.
  *
  * @param  array    $classes    The current classes.
  * @return array                The modified classes.
  */
 function admin_body_class($classes)
 {
     global $pagenow;
     // Do not complete the function if the product template is in use (i.e., the builder needs to be shown)
     if (ttfmake_post_type_supports_builder(get_post_type())) {
         if ('post-new.php' === $pagenow || 'post.php' === $pagenow && ttfmake_is_builder_page()) {
             $classes .= ' ttfmake-builder-active';
             // Add a class to denote Make Plus
             if (ttfmake_is_plus()) {
                 $classes .= ' make-plus-enabled';
             } else {
                 $classes .= ' make-plus-disabled';
             }
         } else {
             $classes .= ' ttfmake-default-active';
         }
         // Add a class to denote Make Plus
         if (ttfmake_is_plus()) {
             $classes .= ' make-plus-enabled';
         } else {
             $classes .= ' make-plus-disabled';
         }
     }
     return $classes;
 }
开发者ID:fovoc,项目名称:make,代码行数:33,代码来源:base.php


示例11: ttfmake_customizer_footer

 /**
  * Configure settings and controls for the Footer section
  *
  * @since  1.0.0.
  *
  * @param  object    $wp_customize    The global customizer object.
  * @param  string    $section         The section name.
  * @return void
  */
 function ttfmake_customizer_footer($wp_customize, $section)
 {
     $priority = new TTFMAKE_Prioritizer();
     $control_prefix = 'ttfmake_';
     $setting_prefix = str_replace($control_prefix, '', $section);
     // Footer layout
     $setting_id = $setting_prefix . '-layout';
     $wp_customize->add_setting($setting_id, array('default' => ttfmake_get_default($setting_id), 'type' => 'theme_mod', 'sanitize_callback' => 'ttfmake_sanitize_choice'));
     $wp_customize->add_control($control_prefix . $setting_id, array('settings' => $setting_id, 'section' => $section, 'label' => __('Footer Layout', 'make'), 'type' => 'select', 'choices' => ttfmake_get_choices($setting_id), 'priority' => $priority->add()));
     // Footer layout line
     $setting_id = $setting_prefix . '-layout-line';
     $wp_customize->add_control(new TTFMAKE_Customize_Misc_Control($wp_customize, $control_prefix . $setting_id, array('section' => $section, 'type' => 'line', 'priority' => $priority->add())));
     // Footer text
     $setting_id = $setting_prefix . '-text';
     $wp_customize->add_setting($setting_id, array('default' => ttfmake_get_default($setting_id), 'type' => 'theme_mod', 'sanitize_callback' => 'ttfmake_sanitize_text', 'transport' => 'postMessage'));
     $wp_customize->add_control($control_prefix . $setting_id, array('settings' => $setting_id, 'section' => $section, 'label' => __('Footer Text', 'make'), 'type' => 'text', 'priority' => $priority->add()));
     // Footer text color
     $setting_id = $setting_prefix . '-text-color';
     $wp_customize->add_setting($setting_id, array('default' => ttfmake_get_default($setting_id), 'type' => 'theme_mod', 'sanitize_callback' => 'maybe_hash_hex_color'));
     $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, $control_prefix . $setting_id, array('settings' => $setting_id, 'section' => $section, 'label' => __('Footer Text Color', 'make'), 'priority' => $priority->add())));
     // Footer border color
     $setting_id = $setting_prefix . '-border-color';
     $wp_customize->add_setting($setting_id, array('default' => ttfmake_get_default($setting_id), 'type' => 'theme_mod', 'sanitize_callback' => 'maybe_hash_hex_color'));
     $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, $control_prefix . $setting_id, array('settings' => $setting_id, 'section' => $section, 'label' => __('Footer Border Color', 'make'), 'priority' => $priority->add())));
     // Background color
     $setting_id = $setting_prefix . '-background-color';
     $wp_customize->add_setting($setting_id, array('default' => ttfmake_get_default($setting_id), 'type' => 'theme_mod', 'sanitize_callback' => 'maybe_hash_hex_color'));
     $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, $control_prefix . $setting_id, array('settings' => $setting_id, 'section' => $section, 'label' => __('Footer Background Color', 'make'), 'priority' => $priority->add())));
     // Background Image
     $setting_id = $setting_prefix . '-background-image';
     $wp_customize->add_setting($setting_id, array('default' => ttfmake_get_default($setting_id), 'type' => 'theme_mod', 'sanitize_callback' => 'esc_url_raw'));
     $wp_customize->add_control(new TTFMAKE_Customize_Image_Control($wp_customize, $control_prefix . $setting_id, array('settings' => $setting_id, 'section' => $section, 'label' => __('Footer Background Image', 'make'), 'priority' => $priority->add(), 'context' => $control_prefix . $setting_id)));
     // Background Repeat
     $setting_id = $setting_prefix . '-background-repeat';
     $wp_customize->add_setting($setting_id, array('default' => ttfmake_get_default($setting_id), 'type' => 'theme_mod', 'sanitize_callback' => 'ttfmake_sanitize_choice'));
     $wp_customize->add_control($control_prefix . $setting_id, array('settings' => $setting_id, 'section' => $section, 'label' => __('Background Repeat', 'make'), 'type' => 'radio', 'choices' => ttfmake_get_choices($setting_id), 'priority' => $priority->add()));
     // Background Position
     $setting_id = $setting_prefix . '-background-position';
     $wp_customize->add_setting($setting_id, array('default' => ttfmake_get_default($setting_id), 'type' => 'theme_mod', 'sanitize_callback' => 'ttfmake_sanitize_choice'));
     $wp_customize->add_control($control_prefix . $setting_id, array('settings' => $setting_id, 'section' => $section, 'label' => __('Background Position', 'make'), 'type' => 'radio', 'choices' => ttfmake_get_choices($setting_id), 'priority' => $priority->add()));
     // Background Size
     $setting_id = $setting_prefix . '-background-size';
     $wp_customize->add_setting($setting_id, array('default' => ttfmake_get_default($setting_id), 'type' => 'theme_mod', 'sanitize_callback' => 'ttfmake_sanitize_choice'));
     $wp_customize->add_control($control_prefix . $setting_id, array('settings' => $setting_id, 'section' => $section, 'label' => __('Background Size', 'make'), 'type' => 'radio', 'choices' => ttfmake_get_choices($setting_id), 'priority' => $priority->add()));
     // Footer background line
     $setting_id = $setting_prefix . '-background-line';
     $wp_customize->add_control(new TTFMAKE_Customize_Misc_Control($wp_customize, $control_prefix . $setting_id, array('section' => $section, 'type' => 'line', 'priority' => $priority->add())));
     // Footer widget areas
     $setting_id = $setting_prefix . '-widget-areas';
     $wp_customize->add_setting($setting_id, array('default' => ttfmake_get_default($setting_id), 'type' => 'theme_mod', 'sanitize_callback' => 'ttfmake_sanitize_choice'));
     $wp_customize->add_control($control_prefix . $setting_id, array('settings' => $setting_id, 'section' => $section, 'label' => __('Footer Widget Areas', 'make'), 'type' => 'select', 'choices' => ttfmake_get_choices($setting_id), 'priority' => $priority->add()));
     // Footer options heading
     $setting_id = $setting_prefix . '-options-heading';
     $wp_customize->add_control(new TTFMAKE_Customize_Misc_Control($wp_customize, $control_prefix . $setting_id, array('section' => $section, 'type' => 'heading', 'label' => __('Footer Options', 'make'), 'priority' => $priority->add())));
     // Show social icons
     $setting_id = $setting_prefix . '-show-social';
     $wp_customize->add_setting($setting_id, array('default' => ttfmake_get_default($setting_id), 'type' => 'theme_mod', 'sanitize_callback' => 'absint'));
     $wp_customize->add_control($control_prefix . $setting_id, array('settings' => $setting_id, 'section' => $section, 'label' => __('Show social icons', 'make'), 'type' => 'checkbox', 'priority' => $priority->add()));
     if (!ttfmake_is_plus()) {
         // White Label line
         $setting_id = $setting_prefix . '-whitelabel-line';
         $wp_customize->add_control(new TTFMAKE_Customize_Misc_Control($wp_customize, $control_prefix . $setting_id, array('section' => $section, 'type' => 'line', 'priority' => $priority->add())));
         // White Label heading
         $setting_id = $setting_prefix . '-whitelabel-heading';
         $wp_customize->add_control(new TTFMAKE_Customize_Misc_Control($wp_customize, $control_prefix . $setting_id, array('section' => $section, 'type' => 'heading', 'label' => __('White Label', 'make'), 'priority' => $priority->add())));
         // White Label info
         $setting_id = $setting_prefix . '-whitelabel-make-plus';
         $wp_customize->add_control(new TTFMAKE_Customize_Misc_Control($wp_customize, $control_prefix . $setting_id, array('section' => $section, 'type' => 'text', 'description' => sprintf(__('Want to remove the theme byline from your website&#8217;s footer? %s.', 'make'), sprintf('<a href="%1$s" target="_blank">%2$s</a>', esc_url(ttfmake_get_plus_link('white-label')), sprintf(__('Upgrade to %1$s', 'make'), 'Make Plus'))), 'priority' => $priority->add())));
     }
 }
开发者ID:marceloroberto,项目名称:make,代码行数:79,代码来源:footer.php


示例12: ttfmake_plus_upgrade_notices

/**
 * Upgrade notices related to Make Plus.
 *
 * @since 1.4.9.
 *
 * @return void
 */
function ttfmake_plus_upgrade_notices()
{
    if (ttfmake_is_plus() && function_exists('ttfmp_get_app')) {
        $make_plus_version = ttfmp_get_app()->version;
        if (version_compare($make_plus_version, '1.4.7', '<=')) {
            ttfmake_register_admin_notice('make-plus-lte-147', sprintf(__('A new version of Make Plus is available. If you encounter problems updating through %1$s, please %2$s to update manually.', 'make'), sprintf('<a href="%1$s">%2$s</a>', admin_url('update-core.php'), __('the WordPress interface', 'make')), sprintf('<a href="%1$s" target="_blank">%2$s</a>', esc_url('https://thethemefoundry.com/tutorials/updating-your-existing-theme/'), __('follow these steps', 'make'))), array('cap' => 'update_plugins', 'screen' => array('dashboard', 'update-core.php', 'plugins.php'), 'type' => 'warning'));
        }
    }
}
开发者ID:fovoc,项目名称:make,代码行数:16,代码来源:compatibility.php


示例13: ttfmake_load_section_header

该文章已有0人参与评论

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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