Пример #1
0
function dln_cherry_get_styles($styles)
{
    // Get the theme prefix.
    $prefix = cherry_get_prefix();
    // Get the active theme stylesheet version.
    $version = wp_get_theme()->get('Version');
    $styles['toast'] = array('handle' => $prefix . 'app', 'src' => cherry_file_uri('assets/css/app.min.css'), 'version' => $version);
    $styles['app'] = array('handle' => $prefix . 'app', 'src' => cherry_file_uri('assets/css/app.min.css'), 'version' => $version);
    return $styles;
}
Пример #2
0
/**
 * Returns an array of the core framework's available styles for use in themes.
 *
 * @since  4.0.0
 * @return array $styles All the available framework styles.
 */
function cherry_get_styles()
{
    // Get the theme prefix.
    $prefix = cherry_get_prefix();
    // Get the active theme stylesheet version.
    $version = wp_get_theme()->get('Version');
    // Prepare set of stylesheets.
    $styles = array();
    // Get the theme-supported stylesheets.
    $supports = get_theme_support('cherry-styles');
    // If the theme support for any styles.
    if (!empty($supports[0]) && is_array($supports[0])) {
        $drop_downs = array('handle' => get_template() . '-drop-downs', 'src' => trailingslashit(CHERRY_URI) . 'assets/css/drop-downs.css', 'version' => '1.0.0');
        // Is responsive site?
        $responsive = cherry_get_option('grid-responsive');
        $grid_responsive = 'true' == $responsive ? array('handle' => $prefix . 'grid-responsive', 'src' => cherry_file_uri('assets/css/grid-responsive.css'), 'version' => $version) : false;
        $main_responsive = 'true' == $responsive ? array('handle' => $prefix . 'main-responsive', 'src' => cherry_file_uri('assets/css/main-responsive.css'), 'version' => $version) : false;
        /**
         * Filter a set of default framework styles.
         *
         * @since 4.0.0
         * @param array $defaults Default styles.
         */
        $defaults = apply_filters('cherry_get_styles_defaults', array('grid-base' => array('handle' => $prefix . 'grid-base', 'src' => cherry_file_uri('assets/css/grid-base.css'), 'version' => $version), 'grid-responsive' => $grid_responsive, 'drop-downs' => $drop_downs, 'magnific-popup' => array('handle' => 'magnific-popup', 'src' => trailingslashit(CHERRY_URI) . 'assets/css/magnific-popup.css', 'version' => '1.0.0'), 'slick' => array('handle' => 'slick', 'src' => trailingslashit(CHERRY_URI) . 'assets/css/slick.css', 'version' => '1.5.0'), 'main' => array('handle' => $prefix . 'main', 'src' => cherry_file_uri('assets/css/main.css'), 'version' => $version), 'main-responsive' => $main_responsive, 'add-ons' => array('handle' => get_template() . '-add-ons', 'src' => trailingslashit(CHERRY_URI) . 'assets/css/add-ons.css', 'version' => CHERRY_VERSION)));
        foreach ($supports[0] as $s) {
            if (empty($defaults[$s])) {
                continue;
            }
            if (!is_array($defaults[$s])) {
                continue;
            }
            $styles[$s] = $defaults[$s];
        }
    }
    // Add the main stylesheet (this must be included).
    $styles['style'] = array('handle' => $prefix . 'style', 'src' => get_stylesheet_uri(), 'version' => $version);
    /**
     * Filters the array of styles.
     *
     * @since 4.0.0
     * @param array $styles Array of styles.
     */
    return apply_filters('cherry_get_styles', $styles);
}
Пример #3
0
/**
 * Returns an array of the core framework's available styles for use in themes.
 *
 * @since  4.0.0
 * @return array $styles All the available framework styles.
 */
function cherry_get_styles()
{
    // Get the theme prefix.
    $prefix = cherry_get_prefix();
    // Get the active theme stylesheet version.
    $version = wp_get_theme()->get('Version');
    // Prepare set of stylesheets.
    $styles = array();
    // Get the theme-supported stylesheets.
    $supports = get_theme_support('cherry-styles');
    // If the theme support for any styles.
    if (!empty($supports[0]) && is_array($supports[0])) {
        //		$drop_downs = array(
        //			'handle'  => get_template() . '-drop-downs',
        //			'src'     => trailingslashit( CHERRY_URI ) . 'assets/css/drop-downs.css',
        //			'version' => '1.0.0',
        //		);
        // Is responsive site?
        $responsive = cherry_get_option('grid-responsive');
        //		$grid_responsive = ( 'true' == $responsive ) ?
        //			array(
        //				'handle'  => $prefix . 'grid-responsive',
        //				'src'     => cherry_file_uri( 'assets/css/grid-responsive.css' ),
        //				'version' => $version,
        //			) : false;
        //
        //		$main_responsive = ( 'true' == $responsive ) ?
        //			array(
        //				'handle'  => $prefix . 'main-responsive',
        //				'src'     => cherry_file_uri( 'assets/css/main-responsive.css' ),
        //				'version' => $version,
        //			) : false;
        /**
         * Filter a set of default framework styles.
         *
         * @since 4.0.0
         * @param array $defaults Default styles.
         */
        $defaults = apply_filters('cherry_get_styles_defaults', array('bootstrap' => array('handle' => $prefix . 'bootstrap', 'src' => cherry_file_uri('assets/vendor/bootstrap/dist/css/bootstrap.min.css'), 'version' => $version), 'toast' => array('handle' => $prefix . 'toast', 'src' => cherry_file_uri('assets/vendor/toastr/toastr.min.css'), 'version' => $version), 'font-awesome' => array('handle' => $prefix . 'font-awesome', 'src' => cherry_file_uri('assets/vendor/font-awesome/css/font-awesome.min.css'), 'version' => $version), 'select2' => array('handle' => $prefix . 'select2', 'src' => cherry_file_uri('assets/vendor/select2/dist/css/select2.min.css'), 'version' => $version)));
        foreach ($supports[0] as $s) {
            if (empty($defaults[$s])) {
                continue;
            }
            if (!is_array($defaults[$s])) {
                continue;
            }
            $styles[$s] = $defaults[$s];
        }
    }
    // Add the main stylesheet (this must be included).
    $styles['style'] = array('handle' => $prefix . 'style', 'src' => get_stylesheet_uri(), 'version' => $version);
    /**
     * Filters the array of styles.
     *
     * @since 4.0.0
     * @param array $styles Array of styles.
     */
    return apply_filters('cherry_get_styles', $styles);
}
Пример #4
0
?>
">
        <link rel="apple-touch-icon" sizes="120x120" href="<?php 
cherry_file_uri('assets/img/favicons/apple-touch-icon-120x120.png');
?>
">
        <link rel="apple-touch-icon" sizes="144x144" href="<?php 
cherry_file_uri('assets/img/favicons/apple-touch-icon-144x144.png');
?>
">
        <link rel="apple-touch-icon" sizes="152x152" href="<?php 
cherry_file_uri('assets/img/favicons/apple-touch-icon-152x152.png');
?>
">
        <link rel="apple-touch-icon" sizes="180x180" href="<?php 
cherry_file_uri('assets/img/favicons/apple-touch-icon-180x180.png');
?>
">
        <?php 
wp_head();
?>
    </head>
<body <?php 
cherry_attr('body');
?>
>

<div id="page-container" class="header-navbar-fixed header-navbar-transparent header-navbar-scroll">
    <header id="header-navbar" class="content-mini content-mini-full">
        <div class="content-boxed">
            <ul class="js-nav-main-header nav-main-header pull-right">