Exemple #1
0
 function load_styles()
 {
     wp_register_style('normalize', RT_THEMEURI . '/css/normalize.css');
     wp_register_style('theme-framework', RT_THEMEURI . '/css/rt-css-framework.css');
     wp_register_style('theme-style-all', RT_THEMEURI . '/css/style.css');
     wp_register_style('fontello', rt_locate_media_file('/css/fontello/css/fontello.css'));
     wp_register_style('jackbox', RT_THEMEURI . '/js/lightbox/css/jackbox.min.css');
     wp_enqueue_style('normalize');
     wp_enqueue_style('theme-framework');
     wp_enqueue_style('fontello');
     wp_enqueue_style('jackbox');
     wp_enqueue_style('theme-style-all');
     wp_enqueue_style('jquery-owl-carousel', RT_THEMEURI . '/css/owl.carousel.css');
     wp_enqueue_style('flex-slider-css', RT_THEMEURI . '/css/flexslider.css');
     wp_enqueue_style('progression-player', RT_THEMEURI . '/js/video_player/progression-player.css');
     wp_enqueue_style('progression-skin-minimal-light', RT_THEMEURI . '/js/video_player/skin-minimal-light.css');
     wp_enqueue_style('isotope-css', RT_THEMEURI . '/css/isotope.css');
     wp_enqueue_style('jquery-colortip', RT_THEMEURI . '/css/colortip-1.0-jquery.css');
     wp_enqueue_style('animate', RT_THEMEURI . '/css/animate.css');
     /* ie fixes */
     wp_register_style('theme-ie7', RT_THEMEURI . '/css/ie7.css');
     $GLOBALS['wp_styles']->add_data('theme-ie7', 'conditional', 'IE 7');
     wp_enqueue_style('theme-ie7');
     wp_register_style('theme-ltie9', RT_THEMEURI . '/css/before_ie9.css');
     $GLOBALS['wp_styles']->add_data('theme-ltie9', 'conditional', 'lt IE 9');
     wp_enqueue_style('theme-ltie9');
 }
Exemple #2
0
    function icon_selection()
    {
        echo '
			<div class="rt_modal icon-selection">
				<div class="window_bar">
					<div class="title">' . __('Icons', 'rt_theme_admin') . '</div>
					<div class="left"><input type="text" name="icon_search" id="rt_icon_search" value="" placeholder="' . __('search', 'rt_theme_admin') . '"><span id="rt_icon_search_result"></span></div>
					<div class="icon_selection_close rt_modal_control" title="' . __('Close', 'rt_theme_admin') . '"><span class="icon-cancel"></span></div>
				</div>
			<div class="modal_content"><ul class="list-icons">
		';
        $json = "";
        //the json file of the fontello
        $fontello_json_file = "/css/fontello/config.json";
        //get json file of the fontello font url with locate media file check if a json file is exist in the child theme
        $fontello_json_url = rt_locate_media_file($fontello_json_file);
        //try with wp_remote_fopen first
        $json = wp_remote_fopen($fontello_json_url);
        //try to include if no json returned
        if (!json_decode($json)) {
            ob_start();
            if (file_exists(get_stylesheet_directory() . $fontello_json_file)) {
                include get_stylesheet_directory() . $fontello_json_file;
            } else {
                include get_template_directory() . $fontello_json_file;
            }
            $json = '' . ob_get_contents() . '';
            ob_end_clean();
        }
        //paste the list output
        if ($json) {
            $json_output = json_decode($json);
            if ($json_output) {
                $icon_prefix = $json_output->css_prefix_text;
                $format = '<li class="%2$s%1$s"><span>%2$s%1$s</span></li>';
                echo sprintf($format, "blank", "");
                foreach ($json_output->glyphs as $icon_name) {
                    echo sprintf($format, $icon_name->css, $icon_prefix);
                }
            }
        }
        echo '</ul></div>';
    }
Exemple #3
0
 function load_admin_styles()
 {
     wp_enqueue_style('admin-style', RT_THEMEADMINURI . '/css/admin.css');
     wp_enqueue_style('spectrum-style', RT_THEMEADMINURI . '/js/spectrum/spectrum.css');
     wp_enqueue_style('clue-tip-style', RT_THEMEADMINURI . '/css/jquery.cluetip.css');
     add_editor_style('editor-style.css');
     //editor style
     wp_register_style('fontello', rt_locate_media_file('/css/fontello/css/fontello.css'));
     wp_enqueue_style('fontello');
 }