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


PHP add_editor_style函数代码示例

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


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

示例1: bavotasan_setup

 /**
  * Initial setup for Magazine Basic theme
  *
  * This function is attached to the 'after_setup_theme' action hook.
  *
  * @uses	load_theme_textdomain()
  * @uses	get_locale()
  * @uses	add_theme_support()
  * @uses	add_editor_style()
  * @uses	register_default_headers()
  *
  * @since 3.0.0
  */
 function bavotasan_setup()
 {
     $bavotasan_theme_options = bavotasan_theme_options();
     load_theme_textdomain('magazine-basic', BAVOTASAN_THEME_TEMPLATE . '/library/languages');
     // Add default posts and comments RSS feed links to <head>.
     add_theme_support('automatic-feed-links');
     // This theme styles the visual editor with editor-style.css to match the theme style.
     add_editor_style(array('library/css/admin/editor-style.css', bavotasan_font_url()));
     // This theme uses wp_nav_menu() in two locations.
     register_nav_menu('primary', __('Primary Menu', 'magazine-basic'));
     register_nav_menu('secondary', __('Secondary Menu', 'magazine-basic'));
     // Add support for a variety of post formats
     add_theme_support('post-formats', array('gallery', 'image', 'video', 'audio', 'quote', 'link', 'status', 'aside'));
     // This theme uses Featured Images (also known as post thumbnails) for archive pages
     add_theme_support('post-thumbnails');
     add_image_size('1_column', $bavotasan_theme_options['1_image_width'], 999);
     add_image_size('2_column', $bavotasan_theme_options['2_image_width'], 999);
     add_image_size('3_column', $bavotasan_theme_options['3_image_width'], 999);
     // Add a filter to bavotasan_header_image_width and bavotasan_header_image_height to change the width and height of your custom header.
     add_theme_support('custom-header', array('random-default' => true, 'default-text-color' => '333', 'flex-width' => true, 'flex-height' => true, 'width' => apply_filters('bavotasan_header_image_width', 1200), 'height' => apply_filters('bavotasan_header_image_height', 288), 'admin-head-callback' => 'bavotasan_admin_header_style', 'admin-preview-callback' => 'bavotasan_admin_header_image'));
     add_theme_support('custom-background', array('default-image' => BAVOTASAN_THEME_URL . '/library/images/solid.png'));
     // Add HTML5 elements
     add_theme_support('html5', array('comment-list', 'search-form', 'comment-form'));
     // Add title tag support
     add_theme_support('title-tag');
     // Remove default gallery styles
     add_filter('use_default_gallery_style', '__return_false');
 }
开发者ID:pavlinov,项目名称:1b.school59.eu,代码行数:41,代码来源:functions.php

示例2: exclusive_setup

function exclusive_setup()
{
    add_theme_support('custom-header', array('default-image' => '', 'header-text' => false, 'wp-head-callback' => 'exclusive_header_style'));
    $exclusive_defaults = array('default-color' => 'E3E1E2', 'default-image' => '', 'admin-head-callback' => '', 'admin-preview-callback' => '');
    add_theme_support('custom-background', $exclusive_defaults);
    if (!get_theme_mod('background_color', false)) {
        set_theme_mod('background_color', 'e3e1e2');
    }
    load_theme_textdomain('wd_exclusive', get_template_directory() . '/languages');
    add_editor_style();
    global $exclusive_layout_page;
    foreach ($exclusive_layout_page->options_themeoptions as $value) {
        if (isset($value['id'])) {
            if (get_theme_mod($value['id']) === FALSE) {
                ${$value}['var_name'] = $value['std'];
            } else {
                ${$value}['var_name'] = get_theme_mod($value['id']);
            }
        }
    }
    global $content_width;
    if (!isset($content_width)) {
        $content_width = $content_area;
    }
}
开发者ID:jhersonn20,项目名称:www,代码行数:25,代码来源:functions.php

示例3: twentyeleven_setup

 /**
  * Set up theme defaults and registers support for various WordPress features.
  *
  * Note that this function is hooked into the after_setup_theme hook, which runs
  * before the init hook. The init hook is too late for some features, such as indicating
  * support post thumbnails.
  *
  * To override twentyeleven_setup() in a child theme, add your own twentyeleven_setup to your child theme's
  * functions.php file.
  *
  * @uses load_theme_textdomain()    For translation/localization support.
  * @uses add_editor_style()         To style the visual editor.
  * @uses add_theme_support()        To add support for post thumbnails, automatic feed links, custom headers
  * 	                                and backgrounds, and post formats.
  * @uses register_nav_menus()       To add support for navigation menus.
  * @uses register_default_headers() To register the default custom header images provided with the theme.
  * @uses set_post_thumbnail_size()  To set a custom post thumbnail size.
  *
  * @since Twenty Eleven 1.0
  */
 function twentyeleven_setup()
 {
     /*
      * Make Twenty Eleven available for translation.
      * Translations can be added to the /languages/ directory.
      * If you're building a theme based on Twenty Eleven, use
      * a find and replace to change 'twentyeleven' to the name
      * of your theme in all the template files.
      */
     load_theme_textdomain('twentyeleven', get_template_directory() . '/languages');
     // This theme styles the visual editor with editor-style.css to match the theme style.
     add_editor_style();
     // Load up our theme options page and related code.
     require get_template_directory() . '/inc/theme-options.php';
     // Grab Twenty Eleven's Ephemera widget.
     require get_template_directory() . '/inc/widgets.php';
     // Add default posts and comments RSS feed links to <head>.
     add_theme_support('automatic-feed-links');
     // This theme uses wp_nav_menu() in one location.
     register_nav_menu('primary', __('Primary Menu', 'twentyeleven'));
     // Add support for a variety of post formats
     add_theme_support('post-formats', array('aside', 'link', 'gallery', 'status', 'quote', 'image'));
     $theme_options = twentyeleven_get_theme_options();
     if ('dark' == $theme_options['color_scheme']) {
         $default_background_color = '1d1d1d';
     } else {
         $default_background_color = 'e2e2e2';
     }
     // Add support for custom backgrounds.
     add_theme_support('custom-background', array('default-color' => $default_background_color));
     // This theme uses Featured Images (also known as post thumbnails) for per-post/per-page Custom Header images
     add_theme_support('post-thumbnails');
     // Add support for custom headers.
     $custom_header_support = array('default-text-color' => '000', 'width' => apply_filters('twentyeleven_header_image_width', 1000), 'height' => apply_filters('twentyeleven_header_image_height', 288), 'flex-height' => true, 'random-default' => true, 'wp-head-callback' => 'twentyeleven_header_style', 'admin-head-callback' => 'twentyeleven_admin_header_style', 'admin-preview-callback' => 'twentyeleven_admin_header_image');
     add_theme_support('custom-header', $custom_header_support);
     if (!function_exists('get_custom_header')) {
         // This is all for compatibility with versions of WordPress prior to 3.4.
         define('HEADER_TEXTCOLOR', $custom_header_support['default-text-color']);
         define('HEADER_IMAGE', '');
         define('HEADER_IMAGE_WIDTH', $custom_header_support['width']);
         define('HEADER_IMAGE_HEIGHT', $custom_header_support['height']);
         add_custom_image_header($custom_header_support['wp-head-callback'], $custom_header_support['admin-head-callback'], $custom_header_support['admin-preview-callback']);
         add_custom_background();
     }
     /*
      * We'll be using post thumbnails for custom header images on posts and pages.
      * We want them to be the size of the header image that we just defined.
      * Larger images will be auto-cropped to fit, smaller ones will be ignored. See header.php.
      */
     set_post_thumbnail_size($custom_header_support['width'], $custom_header_support['height'], true);
     /*
      * Add Twenty Eleven's custom image sizes.
      * Used for large feature (header) images.
      */
     add_image_size('large-feature', $custom_header_support['width'], $custom_header_support['height'], true);
     // Used for featured posts if a large-feature doesn't exist.
     add_image_size('small-feature', 500, 300);
     // Default custom headers packaged with the theme. %s is a placeholder for the theme template directory URI.
     register_default_headers(array('wheel' => array('url' => '%s/images/headers/wheel.jpg', 'thumbnail_url' => '%s/images/headers/wheel-thumbnail.jpg', 'description' => __('Wheel', 'twentyeleven')), 'shore' => array('url' => '%s/images/headers/shore.jpg', 'thumbnail_url' => '%s/images/headers/shore-thumbnail.jpg', 'description' => __('Shore', 'twentyeleven')), 'trolley' => array('url' => '%s/images/headers/trolley.jpg', 'thumbnail_url' => '%s/images/headers/trolley-thumbnail.jpg', 'description' => __('Trolley', 'twentyeleven')), 'pine-cone' => array('url' => '%s/images/headers/pine-cone.jpg', 'thumbnail_url' => '%s/images/headers/pine-cone-thumbnail.jpg', 'description' => __('Pine Cone', 'twentyeleven')), 'chessboard' => array('url' => '%s/images/headers/chessboard.jpg', 'thumbnail_url' => '%s/images/headers/chessboard-thumbnail.jpg', 'description' => __('Chessboard', 'twentyeleven')), 'lanterns' => array('url' => '%s/images/headers/lanterns.jpg', 'thumbnail_url' => '%s/images/headers/lanterns-thumbnail.jpg', 'description' => __('Lanterns', 'twentyeleven')), 'willow' => array('url' => '%s/images/headers/willow.jpg', 'thumbnail_url' => '%s/images/headers/willow-thumbnail.jpg', 'description' => __('Willow', 'twentyeleven')), 'hanoi' => array('url' => '%s/images/headers/hanoi.jpg', 'thumbnail_url' => '%s/images/headers/hanoi-thumbnail.jpg', 'description' => __('Hanoi Plant', 'twentyeleven'))));
 }
开发者ID:nstungxd,项目名称:F2CA5,代码行数:80,代码来源:functions.php

示例4: _tk_setup

 /**
  * Set up theme defaults and register support for various WordPress features.
  *
  * Note that this function is hooked into the after_setup_theme hook, which runs
  * before the init hook. The init hook is too late for some features, such as indicating
  * support post thumbnails.
  */
 function _tk_setup()
 {
     global $cap, $content_width;
     // This theme styles the visual editor with editor-style.css to match the theme style.
     add_editor_style();
     /**
      * Add default posts and comments RSS feed links to head
      */
     add_theme_support('automatic-feed-links');
     /**
      * Enable support for Post Thumbnails on posts and pages
      *
      * @link http://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails
      */
     add_theme_support('post-thumbnails');
     /**
      * Enable support for Post Formats
      */
     add_theme_support('post-formats', array('aside', 'image', 'video', 'quote', 'link'));
     /**
      * Setup the WordPress core custom background feature.
      */
     add_theme_support('custom-background', apply_filters('_tk_custom_background_args', array('default-color' => 'ffffff', 'default-image' => '')));
     /**
      * Make theme available for translation
      * Translations can be filed in the /languages/ directory
      * If you're building a theme based on _tk, use a find and replace
      * to change '_tk' to the name of your theme in all the template files
      */
     load_theme_textdomain('_tk', get_template_directory() . '/languages');
     /**
      * This theme uses wp_nav_menu() in one location.
      */
     register_nav_menus(array('primary' => __('Header bottom menu', '_tk')));
 }
开发者ID:nmpza,项目名称:_nmp,代码行数:42,代码来源:functions.php

示例5: setup

/**
 * Theme setup
 */
function setup()
{
    // Enable features from Soil when plugin is activated
    // https://roots.io/plugins/soil/
    add_theme_support('soil-clean-up');
    add_theme_support('soil-nav-walker');
    add_theme_support('soil-nice-search');
    add_theme_support('soil-jquery-cdn');
    add_theme_support('soil-relative-urls');
    // Make theme available for translation
    // Community translations can be found at https://github.com/roots/sage-translations
    load_theme_textdomain('sage', get_template_directory() . '/lang');
    // Enable plugins to manage the document title
    // http://codex.wordpress.org/Function_Reference/add_theme_support#Title_Tag
    add_theme_support('title-tag');
    // Register wp_nav_menu() menus
    // http://codex.wordpress.org/Function_Reference/register_nav_menus
    register_nav_menus(['primary_navigation' => __('Primary Navigation', 'sage')]);
    // Enable post thumbnails
    // http://codex.wordpress.org/Post_Thumbnails
    // http://codex.wordpress.org/Function_Reference/set_post_thumbnail_size
    // http://codex.wordpress.org/Function_Reference/add_image_size
    add_theme_support('post-thumbnails');
    // Enable post formats
    // http://codex.wordpress.org/Post_Formats
    add_theme_support('post-formats', ['aside', 'gallery', 'link', 'image', 'quote', 'video', 'audio']);
    // Enable HTML5 markup support
    // http://codex.wordpress.org/Function_Reference/add_theme_support#HTML5
    add_theme_support('html5', ['caption', 'comment-form', 'comment-list', 'gallery', 'search-form']);
    // Use main stylesheet for visual editor
    // To add custom styles edit /assets/styles/layouts/_tinymce.scss
    add_editor_style(Assets\asset_path('styles/main.css'));
}
开发者ID:msoroeta,项目名称:theme-name,代码行数:36,代码来源:setup.php

示例6: unity_night_ahoy

function unity_night_ahoy()
{
    //Allow editor style.
    add_editor_style(get_stylesheet_directory_uri() . '/library/css/editor-style.css');
    // let's get language support going, if you need it
    load_theme_textdomain('unity-night', get_template_directory() . '/library/translation');
    // USE THIS TEMPLATE TO CREATE CUSTOM POST TYPES EASILY
    require_once 'library/custom-post-type.php';
    // launching operation cleanup
    add_action('init', 'unity_night_head_cleanup');
    // A better title
    add_filter('wp_title', 'rw_title', 10, 3);
    // remove WP version from RSS
    add_filter('the_generator', 'unity_night_rss_version');
    // remove pesky injected css for recent comments widget
    add_filter('wp_head', 'unity_night_remove_wp_widget_recent_comments_style', 1);
    // clean up comment styles in the head
    add_action('wp_head', 'unity_night_remove_recent_comments_style', 1);
    // clean up gallery output in wp
    add_filter('gallery_style', 'unity_night_gallery_style');
    // enqueue base scripts and styles
    add_action('wp_enqueue_scripts', 'unity_night_scripts_and_styles', 999);
    // ie conditional wrapper
    // launching this stuff after theme setup
    unity_night_theme_support();
    // adding sidebars to Wordpress (these are created in functions.php)
    add_action('widgets_init', 'unity_night_register_sidebars');
    // cleaning up random code around images
    add_filter('the_content', 'unity_night_filter_ptags_on_images');
    // cleaning up excerpt
    add_filter('excerpt_more', 'unity_night_excerpt_more');
}
开发者ID:dericcain,项目名称:unity-night,代码行数:32,代码来源:functions.php

示例7: goran_setup

/**
 * Sets up theme defaults and registers support for various WordPress features.
 *
 * Note that this function is hooked into the after_setup_theme hook, which
 * runs before the init hook. The init hook is too late for some features, such
 * as indicating support for post thumbnails.
 */
function goran_setup()
{
    /*
     * Declare textdomain for this child theme.
     */
    load_child_theme_textdomain('goran', get_stylesheet_directory() . '/languages');
    /*
     * Enable support for Post Thumbnails on posts and pages.
     *
     * @link http://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails
     */
    add_image_size('edin-thumbnail-landscape', 314, 228, true);
    add_image_size('edin-thumbnail-square', 314, 314, true);
    add_image_size('edin-featured-image', 772, 9999);
    add_image_size('edin-hero', 1230, 1230);
    /*
     * Unregister nav menu.
     */
    unregister_nav_menu('secondary');
    /*
     * Editor styles.
     */
    add_editor_style(array('editor-style.css', goran_noto_sans_font_url(), goran_noto_serif_font_url(), goran_droid_sans_mono_font_url()));
    /**
     * Add support for Eventbrite.
     * See: https://wordpress.org/plugins/eventbrite-api/
     */
    add_theme_support('eventbrite');
}
开发者ID:vegemite4me,项目名称:goran-pest,代码行数:36,代码来源:functions.php

示例8: semifolio_setup

 /**
  * Sets up theme defaults and registers support for various WordPress features.
  *
  * Note that this function is hooked into the after_setup_theme hook, which
  * runs before the init hook. The init hook is too late for some features, such
  * as indicating support for post thumbnails.
  */
 function semifolio_setup()
 {
     /*
      * Make theme available for translation.
      * Translations can be filed in the /languages/ directory.
      * If you're building a theme based on Cartel, use a find and replace
      * to change 'semifolio' to the name of your theme in all the template files
      */
     load_theme_textdomain('semifolio', get_template_directory() . '/languages');
     // Add default posts and comments RSS feed links to head.
     add_theme_support('automatic-feed-links');
     // The title tag, only works on WordPress 4.1 or later
     add_theme_support('title-tag');
     // Add stylesheet for the WYSIWYG editor
     add_editor_style();
     /*
      * Enable support for Post Thumbnails on posts and pages.
      *
      * @link http://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails
      */
     add_theme_support('post-thumbnails');
     // This theme uses wp_nav_menu() in one location.
     register_nav_menus(array('primary' => __('Primary Menu', 'semifolio'), 'top-menu' => __('Top Menu', 'semifolio')));
     // Enable support for Post Formats.
     //add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link' ) );
     // Custom backgrounds support
     $defaults_bg = array('default-color' => 'ffffff', 'default-image' => '', 'wp-head-callback' => 'semifolio_custom_background_cb', 'admin_head_callback' => '', 'admin_preview_callback' => '');
     add_theme_support('custom-background', apply_filters('semifolio_custom_background_args', $defaults_bg));
     // Custom header support
     $defaults_hd = array('default-text-color' => '', 'default-image' => '', 'upload' => true, 'wp-head-callback' => 'semifolio_header_style', 'admin_head_callback' => 'semifolio_admin_header_style', 'admin_preview_callback' => 'semifolio_admin_header_img');
     add_theme_support('custom-header', apply_filters('semifolio_custom_header_args', $defaults_hd));
     // Enable support for HTML5 markup.
     add_theme_support('html5', array('comment-list', 'search-form', 'comment-form', 'gallery', 'caption'));
 }
开发者ID:jokoprastiyo,项目名称:semifolio,代码行数:41,代码来源:functions.php

示例9: my_setup

 function my_setup()
 {
     // This theme styles the visual editor with editor-style.css to match the theme style.
     add_editor_style();
     // This theme uses post thumbnails
     if (function_exists('add_theme_support')) {
         // Added in 2.9
         add_theme_support('post-thumbnails');
         set_post_thumbnail_size(235, 148, true);
         // Normal post thumbnails
         add_image_size('post-thumbnail-xl', 578, 250, true);
         // Portfolio Extra Large Thumbnail
         add_image_size('portfolio-post-thumbnail', 268, 168, true);
         // Portfolio Thumbnail
         add_image_size('portfolio-post-thumbnail-small', 196, 148, true);
         // Portfolio Small Thumbnail
         add_image_size('portfolio-post-thumbnail-large', 417, 208, true);
         // Portfolio Large Thumbnail
         add_image_size('portfolio-post-thumbnail-xl', 498, 238, true);
         // Portfolio Extra Large Thumbnail
         add_image_size('small-post-thumbnail', 139, 139, true);
         // Small Thumbnail
     }
     // Add default posts and comments RSS feed links to head
     add_theme_support('automatic-feed-links');
     // custom menu support
     add_theme_support('menus');
     if (function_exists('register_nav_menus')) {
         register_nav_menus(array('header_menu' => 'Header Menu'));
     }
 }
开发者ID:anaved,项目名称:wordpress-tinkering,代码行数:31,代码来源:theme-init.php

示例10: xt_corporate_lite_setup

/**
 * Theme setup
 */
function xt_corporate_lite_setup()
{
    // Make theme available for translation
    load_theme_textdomain('xt-corporate-lite', get_template_directory() . '/lang');
    // Enable plugins to manage the document title
    // http://codex.wordpress.org/Function_Reference/add_theme_support#Title_Tag
    add_theme_support('title-tag');
    // Register wp_nav_menu() menus
    // http://codex.wordpress.org/Function_Reference/register_nav_menus
    register_nav_menus(array('primary_navigation' => __('Primary Navigation', 'xt-corporate-lite')));
    register_nav_menus(array('footer_navigation' => __('Footer Navigation', 'xt-corporate-lite')));
    // Add Feed Links
    add_theme_support('automatic-feed-links');
    // Add post thumbnails
    // http://codex.wordpress.org/Post_Thumbnails
    // http://codex.wordpress.org/Function_Reference/set_post_thumbnail_size
    // http://codex.wordpress.org/Function_Reference/add_image_size
    add_theme_support('post-thumbnails');
    // Add post formats
    // http://codex.wordpress.org/Post_Formats
    //add_theme_support('post-formats', ['aside', 'gallery', 'link', 'image', 'quote', 'video', 'audio']);
    // Add HTML5 markup for captions
    // http://codex.wordpress.org/Function_Reference/add_theme_support#HTML5
    add_theme_support('html5', array('caption', 'comment-form', 'comment-list'));
    // Add Custom Background Support
    add_theme_support("custom-background");
    // Tell the TinyMCE editor to use a custom stylesheet
    add_editor_style(get_template_directory_uri() . '/assets/css/editor-style.css');
}
开发者ID:chowy1026,项目名称:jenny,代码行数:32,代码来源:init.php

示例11: bavotasan_setup

 /**
  * Initial setup
  *
  * This function is attached to the 'after_setup_theme' action hook.
  *
  * @uses	load_theme_textdomain()
  * @uses	get_locale()
  * @uses	BAVOTASAN_THEME_TEMPLATE
  * @uses	add_theme_support()
  * @uses	add_editor_style()
  * @uses	add_custom_background()
  * @uses	add_custom_image_header()
  * @uses	register_default_headers()
  *
  * @since 1.0.0
  */
 function bavotasan_setup()
 {
     load_theme_textdomain('tienda', BAVOTASAN_THEME_TEMPLATE . '/library/languages');
     // Add default posts and comments RSS feed links to <head>.
     add_theme_support('automatic-feed-links');
     // This theme styles the visual editor with editor-style.css to match the theme style.
     add_editor_style('library/css/admin/editor-style.css');
     // This theme uses wp_nav_menu() in three location.
     register_nav_menu('primary', __('Primary Menu', 'tienda'));
     register_nav_menu('top', __('Top Menu', 'tienda'));
     // Add support for a variety of post formats
     add_theme_support('post-formats', array('gallery', 'image', 'video', 'audio', 'quote', 'link', 'status', 'aside'));
     // This theme uses Featured Images (also known as post thumbnails) for archive pages
     add_theme_support('post-thumbnails', array('post', 'product'));
     add_image_size('featured-img', 840, 410, true);
     // Add a filter to bavotasan_header_image_width and bavotasan_header_image_height to change the width and height of your custom header.
     add_theme_support('custom-header', array('header-text' => false, 'flex-height' => true, 'flex-width' => true, 'random-default' => true, 'width' => apply_filters('bavotasan_header_image_width', 1800), 'height' => apply_filters('bavotasan_header_image_height', 600)));
     // Add support for custom backgrounds
     add_theme_support('custom-background', array('default-color' => 'ffffff'));
     // Add HTML5 elements
     add_theme_support('html5', array('search-form', 'comment-form', 'comment-list', 'gallery', 'caption'));
     // Add title tag support
     add_theme_support('title-tag');
     // Remove default gallery styles
     add_filter('use_default_gallery_style', '__return_false');
     // Add Woocommerce support
     add_theme_support('woocommerce');
 }
开发者ID:aleffsantos,项目名称:Frameye-WebApp,代码行数:44,代码来源:functions.php

示例12: calibrefx_initializing

/**
 * Run the Engine
 */
function calibrefx_initializing()
{
    global $calibrefx;
    $calibrefx = Calibrefx::get_instance();
    // Add theme support
    add_theme_support('html5', array('comment-list', 'comment-form', 'search-form'));
    add_theme_support('menus');
    add_theme_support('title-tag');
    add_theme_support('automatic-feed-links');
    add_theme_support('post-thumbnails');
    add_theme_support('post-formats', array('aside', 'status', 'image', 'video', 'audio', 'quote', 'link', 'gallery', 'chat'));
    if (is_child_theme()) {
        add_filter('calibrefx_helpers_to_include', 'childfx_load_extension', 10, 2);
        add_filter('calibrefx_shortcodes_to_include', 'childfx_load_extension', 15, 2);
        add_filter('calibrefx_hooks_to_include', 'childfx_load_extension', 20, 2);
        add_filter('calibrefx_widgets_to_include', 'childfx_load_extension', 25, 2);
        add_filter('calibrefx_library_path', 'childfx_load_library');
    }
    //Load every active module
    Calibrefx::load_modules();
    /*
     * This theme styles the visual editor to resemble the theme style,
     * specifically font, colors, icons, and column width.
     */
    add_editor_style(array('assets/css/editor-style.css', 'assets/css/cfxicons.css', 'assets/css/font-awesome.css', 'assets/css/genericons.css', calibrefx_fonts_url()));
    // Run the engine
    $calibrefx->run();
    /** Run the calibrefx_post_init hook */
    do_action('calibrefx_post_init');
}
开发者ID:andisultan,项目名称:calibrefx,代码行数:33,代码来源:functions.php

示例13: salejunction_setup

function salejunction_setup()
{
    global $wpdb;
    add_theme_support('automatic-feed-links');
    add_theme_support('post-thumbnails');
    add_image_size('index-categories', 200, 150, true);
    add_image_size('page-single', 600, 600, true);
    add_editor_style();
    register_nav_menu('custom_menu', MAIN_MENU);
    //Load languages file
    load_theme_textdomain('salejunction', get_template_directory() . '/languages');
    $locale = get_locale();
    $locale_file = get_template_directory() . "/languages/{$locale}.php";
    if (is_readable($locale_file)) {
        require_once $locale_file;
    }
    /**
     * Set the content width based on the theme's design and stylesheet.
     *
     * Used to set the width of images and content. Should be equal to the width the theme
     * is designed for, generally via the style.css stylesheet.
     */
    global $content_width;
    if (!isset($content_width)) {
        $content_width = 590;
    }
}
开发者ID:hoainam1989,项目名称:smwp,代码行数:27,代码来源:inkthemes-functions.php

示例14: _action_theme_setup

 function _action_theme_setup()
 {
     /*
      * Make Theme available for translation.
      */
     load_theme_textdomain('unyson', get_template_directory() . '/languages');
     // This theme styles the visual editor to resemble the theme style.
     add_editor_style(array('css/editor-style.css', fw_theme_font_url()));
     // Add RSS feed links to <head> for posts and comments.
     add_theme_support('automatic-feed-links');
     // Enable support for Post Thumbnails, and declare two sizes.
     add_theme_support('post-thumbnails');
     set_post_thumbnail_size(811, 372, true);
     add_image_size('fw-theme-full-width', 1038, 576, true);
     /*
      * Switch default core markup for search form, comment form, and comments
      * to output valid HTML5.
      */
     add_theme_support('html5', array('search-form', 'comment-form', 'comment-list', 'gallery', 'caption'));
     /*
      * Enable support for Post Formats.
      * See http://codex.wordpress.org/Post_Formats
      */
     add_theme_support('post-formats', array('aside', 'image', 'video', 'audio', 'quote', 'link', 'gallery'));
     // Add support for featured content.
     add_theme_support('featured-content', array('featured_content_filter' => 'fw_theme_get_featured_posts', 'max_posts' => 6));
     // This theme uses its own gallery styles.
     add_filter('use_default_gallery_style', '__return_false');
 }
开发者ID:Umeeshh,项目名称:Scratch-Theme,代码行数:29,代码来源:hooks.php

示例15: exclusive_setup

function exclusive_setup()
{
    add_theme_support('custom-header', array('default-image' => '', 'header-text' => false, 'wp-head-callback' => 'exclusive_header_style'));
    $exclusive_defaults = array('default-color' => 'E3E1E2', 'default-image' => '', 'admin-head-callback' => '', 'admin-preview-callback' => '');
    add_theme_support('custom-background', $exclusive_defaults);
    if (!get_theme_mod('background_color', false)) {
        set_theme_mod('background_color', 'e3e1e2');
    }
    add_theme_support('title-tag');
    //Enable post and comments RSS feed links to head
    add_theme_support('automatic-feed-links');
    // Enable post thumbnails
    add_theme_support('post-thumbnails');
    set_post_thumbnail_size(150, 150);
    load_theme_textdomain('exclusive', get_template_directory() . '/languages');
    add_editor_style();
    global $exclusive_layout_page;
    foreach ($exclusive_layout_page->options_themeoptions as $value) {
        if (isset($value['id'])) {
            if (get_theme_mod($value['id']) === FALSE) {
                ${$value}['var_name'] = $value['std'];
            } else {
                ${$value}['var_name'] = get_theme_mod($value['id']);
            }
        }
    }
    global $content_width;
    if (!isset($content_width)) {
        $content_width = $content_area;
    }
}
开发者ID:ssxenon01,项目名称:exclusive,代码行数:31,代码来源:functions.php


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