示例#1
0
function wpgrade_callback_enqueue_dynamic_css()
{
    $style_query = array();
    //		if (wpgrade::option('main_color')) {
    //			$main_color = wpgrade::option('main_color');
    //			$main_color = str_replace('#', '', $main_color);
    //			$style_query['color'] = $main_color;
    //		}
    if (wpgrade::option('use_google_fonts')) {
        add_action('wp_head', 'wpgrade_callback_load_google_fonts');
        $fonts_array = array('google_titles_font', 'google_second_font', 'google_nav_font', 'google_body_font');
        foreach ($fonts_array as $font) {
            $the_font = wpgrade::get_the_typo($font);
            //				var_dump($the_font);
            if (!empty($the_font)) {
                $style_query['fonts'][$font] = $the_font;
            }
        }
    }
    //		if (wpgrade::option('portfolio_text_color')) {
    //			$port_color = wpgrade::option('portfolio_text_color');
    //			$port_color = str_replace('#', '', $port_color);
    //			$style_query['port_color'] = $port_color;
    //		}
    if (wpgrade::option('inject_custom_css') == 'file') {
        wp_enqueue_style('wpgrade-custom-style', get_template_directory_uri() . '/theme-content/css/custom.css');
    }
}
示例#2
0
 /**
  * A custom render for sliders in customizer panel
  */
 public function render_content()
 {
     $field = search_multi($this->ReduxFramework->sections, 'id', $this->option_key);
     // the key is always unique so there will be only one
     $field = $field[0];
     if (!isset($field['name_suffix'])) {
         $field['name_suffix'] = "";
     }
     if (!isset($field['default'])) {
         $field['default'] = array();
     }
     $field['custom_data'] = $this->get_link();
     $field_class = 'ReduxFramework_customizer_background';
     if (!class_exists($field_class)) {
         $class_file = apply_filters('redux-typeclass-load', '/inc/fields/background/field_background.php', $field_class);
         if ($class_file === '/inc/fields/background/field_background.php') {
             /** @noinspection PhpIncludeInspection */
             require_once wpgrade::corepath() . 'vendor/redux3/' . $class_file;
         }
     }
     $value = wpgrade::option($field['id'], $field['default']);
     // get wordpress default labels
     $this->json['button_labels'] = array('select' => __('Select Image'), 'change' => __('Change Image'), 'remove' => __('Remove'), 'default' => __('Default'), 'placeholder' => __('No image selected'), 'frame_title' => __('Select Image'), 'frame_button' => __('Choose Image'));
     if (class_exists($field_class) && method_exists($field_class, 'render')) {
         $field_object = new $field_class($field, $value, $this->ReduxFramework);
         //				$enqueue->enqueue();
         echo "<label>" . "<span class=\"customize-control-title\">" . $field['title'] . "</span>" . "</label>";
         //				echo '<div class="redux-container-'. $this->type . '" >';
         echo $field_object->render();
         //				echo '<div>';
     }
 }
示例#3
0
/**
 * Get the remote XML file contents and return its data (Version
 * and Changelog). Uses the cached version if available and inside the time
 * interval defined
 */
function wpgrade_update_notifier_latest_theme_version($interval)
{
    $notifier_file_url = wpgrade::updade_notifier_xml();
    $db_cache_field = 'notifier-cache-' . wpgrade::shortname();
    $db_cache_field_last_updated = 'notifier-cache-last-updated-' . wpgrade::shortname();
    $last = get_option($db_cache_field_last_updated);
    $now = time();
    // check the cache
    if (!$last || $now - $last > $interval) {
        // cache doesn't exist, or is old, so refresh it
        $res = wp_remote_get($notifier_file_url);
        $cache = wp_remote_retrieve_body($res);
        if ($cache) {
            // we got good results
            update_option($db_cache_field, $cache);
            update_option($db_cache_field_last_updated, time());
        }
        // read from the cache file
        $notifier_data = get_option($db_cache_field);
    } else {
        // cache file is fresh enough, so read from it
        $notifier_data = get_option($db_cache_field);
    }
    // Let's see if the $xml data was returned as we expected it to.
    // If it didn't, use the default 1.0 as the latest version so that we don't have problems when the remote server hosting the XML file is down
    if (strpos((string) $notifier_data, '<notifier>') === false) {
        $notifier_data = '<?xml version="1.0" encoding="UTF-8"?><notifier><latest>1.0</latest><changelog></changelog></notifier>';
    }
    // Load the remote XML data into a variable and return it
    $xml = simplexml_load_string($notifier_data);
    return $xml;
}
示例#4
0
 public function render_content()
 {
     $field = search_multi($this->ReduxFramework->sections, 'id', $this->option_key);
     // the key is always unique so there will be only one
     $field = $field[0];
     if (!isset($field['name_suffix'])) {
         $field['name_suffix'] = "";
     }
     if (!isset($field['default'])) {
         $field['default'] = array();
     }
     $field['custom_data'] = $this->get_link();
     $field_class = 'ReduxFramework_customizer_checkbox';
     if (!class_exists($field_class)) {
         $class_file = apply_filters('redux-typeclass-load', '/inc/fields/checkbox/field_checkbox.php', $field_class);
         if ($class_file === 'inc/fields/checkbox/field_checkbox.php') {
             /*  for PRO users! - * @noinspection PhpIncludeInspection */
             require_once wpgrade::corepath() . 'vendor/redux3/' . $class_file;
         }
     }
     $value = wpgrade::option($field['id'], 0);
     if (class_exists($field_class) && method_exists($field_class, 'render')) {
         $enqueue = new $field_class($field, $value, $this->ReduxFramework);
         //				$enqueue->enqueue();
         echo "<label>" . "<span class=\"customize-control-title\">" . $field['title'] . "</span>" . "</label>";
         echo '<div class="redux-container-' . $this->type . '">';
         echo $enqueue->render();
         echo '<div>';
     }
 }
示例#5
0
/**
 * Theme activation hook
 */
function wpgrade_callback_geting_active()
{
    /**
     * Get the config from /config/activation.php
     */
    $activation_settings = array();
    if (file_exists(wpgrade::themepath() . 'config/activation' . EXT)) {
        $activation_settings = (include wpgrade::themepath() . 'config/activation' . EXT);
    }
    /**
     * Make sure pixlikes has the right settings
     */
    if (isset($activation_settings['pixlikes-settings'])) {
        $pixlikes_settings = $activation_settings['pixlikes-settings'];
        update_option('pixlikes_settings', $pixlikes_settings);
    }
    /**
     * Create custom post types, taxonomies and metaboxes
     * These will be taken by pixtypes plugin and converted in their own options
     */
    if (isset($activation_settings['pixtypes-settings'])) {
        $pixtypes_conf_settings = $activation_settings['pixtypes-settings'];
        $types_options = get_option('pixtypes_themes_settings');
        if (empty($types_options)) {
            $types_options = array();
        }
        $theme_key = wpgrade::shortname() . '_pixtypes_theme';
        $types_options[$theme_key] = $pixtypes_conf_settings;
        update_option('pixtypes_themes_settings', $types_options);
    }
    /**
     * http://wordpress.stackexchange.com/questions/36152/flush-rewrite-rules-not-working-on-plugin-deactivation-invalid-urls-not-showing
     */
    delete_option('rewrite_rules');
}
 protected function setup()
 {
     // the boring defaults that are ommited in the wpgrade-config.php
     // configuration for clarity and bravity, and also because some require
     // extensive logic handling
     $defaults = array('base' => str_replace(999999999, '%#%', esc_url(get_pagenum_link(999999999))), 'format' => $this->pager_format($this->pager), 'current' => max(1, get_query_var($this->pager)), 'total' => $this->query->max_num_pages, 'formatter' => null, 'prev_next' => true, 'sorted_paging' => false, 'order' => 'desc', 'show_all' => false, 'end_size' => 1, 'mid_size' => 2, 'add_args' => false, 'add_fragment' => null);
     $conf = wpgrade::merge($defaults, $this->conf);
     # we're filling in prev_text and next_text seperatly to avoid
     # requesting the translation when not required
     if (empty($conf['prev_text'])) {
         $conf['prev_text'] = __('&laquo; Previous', 'rosa_txtd');
     } else {
         // exists; translate
         $conf['prev_text'] = __($conf['prev_text'], 'rosa_txtd');
     }
     if (empty($conf['next_text'])) {
         $conf['next_text'] = __('Next &raquo;', 'rosa_txtd');
     } else {
         // exists; translate
         $conf['next_text'] = __($conf['next_text'], 'rosa_txtd');
     }
     // is the pager sorted?
     if ($conf['sorted_paging'] && $conf['order'] == 'asc') {
         $temp = $conf['prev_text'];
         $conf['prev_text'] = $conf['next_text'];
         $conf['next_text'] = $temp;
     }
     return $conf;
 }
示例#7
0
function wpgrade_register_custom_menus()
{
    add_theme_support('menus');
    $menus = wpgrade::confoption('import_nav_menu');
    foreach ($menus as $key => $value) {
        register_nav_menu($key, $value);
    }
}
示例#8
0
 static function instance($reinitialize = false)
 {
     if (self::$instance == null || $reinitialize) {
         $config = wpgrade::config();
         self::$instance = new WPGradeOptions($config['theme-options']);
     }
     return self::$instance;
 }
function wpgrade_clean_static_files()
{
    if (wpgrade::option('remove_parameters_from_static_res')) {
        add_filter('the_generator', 'wpgrade_remove_version_info');
        add_filter('script_loader_src', 'wpgrade_remove_script_version', 15, 1);
        add_filter('style_loader_src', 'wpgrade_remove_script_version', 15, 1);
    }
}
示例#10
0
function wpgrade_callback_load_woocommerce_assets()
{
    global $woocommerce;
    if (!wpgrade::option('enable_woocommerce_support', '0')) {
        return;
    }
    wp_enqueue_style('wpgrade-woocommerce', get_template_directory_uri() . '/assets/css/woocommerce.css', array('woocommerce-general'), wpgrade::cachebust_string(wpgrade::themefilepath('assets/css/woocommerce.css')));
}
示例#11
0
function wpgrade_callback_inlined_custom_style()
{
    ob_start();
    include wpgrade::corepartial('inline-custom-css' . EXT);
    $custom_css = ob_get_clean();
    $style = 'wpgrade-main-style';
    wp_add_inline_style($style, $custom_css);
}
示例#12
0
 function __construct()
 {
     $widget_ops = array('classname' => 'widget--latest-comments', 'description' => __('The latest comments', 'rosa_txtd'));
     parent::__construct('recent-comments', wpgrade::themename() . ' ' . __('Latest Comments', 'rosa_txtd'), $widget_ops);
     $this->alt_option_name = 'widget_recent_comments';
     add_action('comment_post', array($this, 'flush_widget_cache'));
     add_action('transition_comment_status', array($this, 'flush_widget_cache'));
 }
示例#13
0
function remove_customizer_controls($wp_customize)
{
    $sections = wpgrade::get_redux_arg('remove_customizer_sections');
    if (!empty($sections) && is_array($sections)) {
        foreach ($sections as $key => $section) {
            $wp_customize->remove_section($section);
        }
    }
}
示例#14
0
 function wpGrade_ajax_import_widgets()
 {
     $response = array('what' => 'import_widgets', 'action' => 'import_submit', 'id' => 'true');
     // check if user is allowed to save and if its his intention with
     // a nonce check
     if (function_exists('check_ajax_referer')) {
         check_ajax_referer('wpGrade_nonce_import_demo_widgets');
     }
     require_once wpgrade::themefilepath('inc/import/import-demo-widgets' . EXT);
     $response = new WP_Ajax_Response($response);
     $response->send();
 }
示例#15
0
 /**
  * Get the gallery of the global post
  * @required global $post this should be called inside a loop
  * @return array $ids
  */
 function get_gallery_ids($key = '')
 {
     global $post;
     $prefix = '';
     if (class_exists('wpgrade')) {
         $prefix = wpgrade::prefix();
     }
     $ids = get_post_meta($post->ID, $prefix . $key, true);
     if (!empty($ids)) {
         $ids = explode(',', $ids);
     }
     return $ids;
 }
示例#16
0
function wpgrade_callback_load_custom_js_footer()
{
    $custom_js = wpgrade::option('custom_js_footer');
    if (!empty($custom_js)) {
        //first lets test is the js code is clean or has <script> tags and such
        //if we have <script> tags than we will not enclose it in anything - raw output
        if (strpos($custom_js, '</script>') !== false) {
            echo $custom_js . "\n";
        } else {
            echo "<script type=\"text/javascript\">\n;(function(\$){\n" . $custom_js . "\n})(jQuery);\n</script>\n";
        }
    }
}
    function widget($args, $instance)
    {
        extract($args);
        $title = apply_filters('widget_title', $instance['title']);
        $social_links = wpgrade::option('social_icons');
        $target = '';
        if (wpgrade::option('social_icons_target_blank')) {
            $target = 'target="_blank"';
        }
        // Reset Post Data
        wp_reset_postdata();
        echo $before_widget;
        if (!empty($social_links)) {
            ?>
			<?php 
            if ($title) {
                echo $before_title . $title . $after_title;
            }
            ?>
			<div class="btn-list">
				<?php 
            foreach ($social_links as $domain => $icon) {
                if (isset($icon['value']) && isset($icon['checkboxes']['widget'])) {
                    $value = $icon['value'];
                    ?>
						<a href="<?php 
                    echo $value;
                    ?>
" <?php 
                    echo $target;
                    ?>
>
							<i class="pixcode  pixcode--icon  icon-e-<?php 
                    echo $domain;
                    ?>
"></i>
						</a>
					<?php 
                }
            }
            ?>
			</div>
		<?php 
        }
        echo $after_widget;
    }
示例#18
0
function wpgrade_callback_the_password_form($form)
{
    global $post;
    $post = get_post($post);
    $postID = wpgrade::lang_post_id($post->ID);
    $label = 'pwbox-' . (empty($postID) ? rand() : $postID);
    $form = '<form action="' . esc_url(site_url('wp-login.php?action=postpass', 'login_post')) . '" method="post">
		<p>' . __("This post is password protected. To view it please enter your password below:", 'rosa_txtd') . '</p>
		<div class="row">
			<div class="column  span-12  hand-span-10">
				<input name="post_password" id="' . $label . '" type="password" size="20" placeholder="' . __("Password", 'rosa_txtd') . '"/>
			</div>
			<div class="column  span-12  hand-span-2">
				<input type="submit" name="Access" value="' . esc_attr__("Access", 'rosa_txtd') . '" class="btn post-password-submit"/>
			</div>
		</div>
	</form>';
    // on form submit put a wrong passwordp msg.
    if (get_permalink() != wp_get_referer()) {
        return $form;
    }
    // No cookie, the user has not sent anything until now.
    if (!isset($_COOKIE['wp-postpass_' . COOKIEHASH])) {
        return $form;
    }
    require_once ABSPATH . 'wp-includes/class-phpass.php';
    $hasher = new PasswordHash(8, true);
    $hash = wp_unslash($_COOKIE['wp-postpass_' . COOKIEHASH]);
    if (0 !== strpos($hash, '$P$B')) {
        return $form;
    }
    if (!$hasher->CheckPassword($post->post_password, $hash)) {
        // We have a cookie, but it does not match the password.
        $msg = '<span class="wrong-password-message">' . __('Sorry, your password did not match', 'rosa_txtd') . '</span>';
        $form = $msg . $form;
    }
    return $form;
}
示例#19
0
function wpgrade_custom_thumbnails()
{
    // Add theme support for Featured Images
    add_theme_support('post-thumbnails');
    $sizes = wpgrade::confoption('thumbnails_sizes');
    if (!empty($sizes)) {
        foreach ($sizes as $size_key => $values) {
            $width = 0;
            if (isset($values['width'])) {
                $width = $values['width'];
            }
            $height = 0;
            if (isset($values['height'])) {
                $height = $values['height'];
            }
            $hard_crop = false;
            if (isset($values['hard_crop'])) {
                $hard_crop = $values['hard_crop'];
            }
            add_image_size($size_key, $width, $height, $hard_crop);
        }
    }
}
示例#20
0
文件: rosa.php 项目: qhuit/Tournesol
 static function gallery_slideshow($current_post, $template = null, $size = 'medium-size')
 {
     if ($template === null) {
         $image_scale_mode = get_post_meta($current_post->ID, wpgrade::prefix() . 'post_image_scale_mode', true);
         $slider_visiblenearby = get_post_meta($current_post->ID, wpgrade::prefix() . 'post_slider_visiblenearby', true);
         $slider_transition = get_post_meta($current_post->ID, wpgrade::prefix() . 'post_slider_transition', true);
         $slider_autoplay = get_post_meta($current_post->ID, wpgrade::prefix() . 'post_slider_autoplay', true);
         if ($slider_autoplay) {
             $slider_delay = get_post_meta($current_post->ID, wpgrade::prefix() . 'post_slider_delay', true);
         }
         $template = '<div class="wp-gallery" data-royalslider data-autoHeight data-customarrows data-sliderpauseonhover data-slidertransition="' . $slider_transition . '" ';
         $template .= ' data-imagescale="' . $image_scale_mode . '" ';
         if ($slider_visiblenearby) {
             $template .= ' data-visiblenearby ';
         }
         if ($slider_autoplay) {
             $template .= ' data-sliderautoplay="" ';
             $template .= ' data-sliderdelay="' . $slider_delay . '" ';
         }
         if ($image_scale_mode != 'fill') {
             $template .= ' data-imagealigncenter ';
         }
         if (wpgrade::option('show_title_caption_popup') == 1) {
             $template .= ' data-enable_caption=""';
         }
         $template .= '>:gallery</div>';
     }
     // first check if we have a meta with a gallery
     $gallery_ids = get_post_meta($current_post->ID, wpgrade::prefix() . 'main_gallery', true);
     if (!empty($gallery_ids)) {
         //recreate the gallery shortcode
         $gallery = '[gallery ids="' . $gallery_ids . '"]';
         if (strpos($gallery, 'style') === false) {
             $gallery = str_replace("]", " style='big_thumb' size='" . $size . "' link='file']", $gallery);
         }
         $shrtcode = do_shortcode($gallery);
         //var_dump( $template, $shrtcode );
         //			$shrtcode = preg_replace('/(<dd class="wp-caption-text gallery-caption">.+?)+(<\/dd>)/i', '', $shrtcode);
         if (!empty($shrtcode)) {
             return strtr($template, array(':gallery' => $shrtcode));
         } else {
             return null;
         }
     } else {
         // empty gallery_ids
         // search for the first gallery shortcode
         $gallery_matches = null;
         preg_match("!\\[gallery.+?\\]!", $current_post->post_content, $gallery_matches);
         if (!empty($gallery_matches)) {
             $gallery = $gallery_matches[0];
             if (strpos($gallery, 'style') === false) {
                 $gallery = str_replace("]", " style='big_thumb' size='" . $size . "' link='file']", $gallery);
             }
             $shrtcode = do_shortcode($gallery);
             if (!empty($shrtcode)) {
                 return strtr($template, array(':gallery' => $shrtcode));
             } else {
                 return null;
             }
         } else {
             // gallery_matches is empty
             return null;
         }
     }
 }
示例#21
0
}
//check if the wp import class is available, this class handles the wordpress XML files. If not, include it
if (!class_exists('WPGrade_WP_Import')) {
    $class_wp_import = wpgrade::themefilepath('inc/import/wordpress-importer/wordpress-importer.php');
    if (file_exists($class_wp_import)) {
        require_once $class_wp_import;
    } else {
        $wpGrade_importerError = true;
    }
}
if ($wpGrade_importerError !== false) {
    $response['id'] = new WP_Error('import_posts_pages_noscript', 'The Auto importing script could not be loaded. Please use the <a href="' . admin_url('import.php') . '">WordPress default import</a> and import the .XML file provided in the archive you\'ve received on purchase manually.');
} else {
    if (class_exists('WPGrade_WP_Import')) {
        include_once 'wordpress-importer/wpgrade-import-class.php';
    }
    if (!is_file($import_filepath . '.xml')) {
        $response['id'] = new WP_Error('import_posts_pages_nofile', 'The XML file containing the demo data could not be found or could not be read in <pre>' . wpgrade::themefilepath('inc/import/demo-data') . '</pre><br/> You might want to try to set the file permission to 777.<br/>If this doesn\'t work please use the <a href="' . admin_url('import.php') . '">WordPress default import</a> and import the .XML file provided in the archive you\'ve received on purchase manually.');
    } else {
        ob_start();
        $wp_import = new wpGrade_import();
        $wp_import->fetch_attachments = true;
        $response['id'] = $wp_import->import_posts_pages($import_filepath . '.xml', $response['supplemental']['stepNumber'], $response['supplemental']['numberOfSteps']);
        //after the last step we assign the menus to the proper locations
        if ($response['supplemental']['stepNumber'] == $response['supplemental']['numberOfSteps']) {
            $wp_import->set_menus();
        }
        $response['data'] = ob_get_contents();
        ob_end_clean();
    }
}
    								<li>
    
    <div id="TA_socialButtonBubbles510" class="TA_socialButtonBubbles">
    <ul id="5GQ0kz6aX" class="TA_links jyenlcHRwzA3">
    <li id="JQ5ark8" class="4GNQIwz">
    <a target="_blank" href="http://www.tripadvisor.com/Restaurant_Review-g304060-d7162518-Reviews-Jassyro_Coffee_Shop-Iasi_Iasi_County_Northeast_Romania.html">
    	<img src="http://www.tripadvisor.com/img/cdsi/img2/branding/socialWidget/20x28_white-21693-2.png"/></a>
    </li>
    </ul>
    </div>
    <script src="http://www.jscache.com/wejs?wtype=socialButtonBubbles&amp;uniq=510&amp;locationId=7162518&amp;color=white&amp;size=rect&amp;lang=en_US&amp;display_version=2"></script>
    
    								</li>
    								<?php */
}
if (in_array('woocommerce/woocommerce.php', apply_filters('active_plugins', get_option('active_plugins'))) && wpgrade::option('show_cart_menu')) {
    global $woocommerce;
    ?>

								<li class="shop-menu-item  menu-item-has-children">
									<div class="widget_shopping_cart_content">
										<a class="cart-icon-link" href="<?php 
    echo $woocommerce->cart->get_cart_url();
    ?>
">
											<i class="icon-shopping-cart"></i>
											<span class="shop-items-number"><?php 
    echo sprintf(_n('%d', $woocommerce->cart->cart_contents_count, 'woocommerce'), $woocommerce->cart->cart_contents_count);
    ?>
</span>
										</a>
示例#23
0
#
# All relevant configuration information (args, sections, tabs) have been
# moved to redux-* files located in the same section as this file.
#
# The setup function, ie. setup_framework_options has been renamed to
# wpgrade_call_redux_options_setup since this is the only place it's used
# and god knows "framework" is what everyone and their monther calls
# anything they make these days.
#
# The use of the global has been removed in favor of using a proper Options
# object at the theme level, which accepts more then just redux as a
# source and may have multiple sources. This is both more flexible
# and a cleaner implementation.
#
# The file has also been purged of code that had no effect, with the
# exception of configuration file commented out entries, since those are
# generally helpful.
#
wpgrade::require_coremodule('redux3');
$currentpath = dirname(__FILE__) . DIRECTORY_SEPARATOR;
global $redux_sections;
$wpgrade_redux_coremodule = 'redux3';
# used inside configuration files
$redux_args = (include $currentpath . 'redux-args' . EXT);
$redux_sections = (include $currentpath . 'redux-sections' . EXT);
$redux_tabs = (include $currentpath . 'redux-tabs' . EXT);
$redux_sections = apply_filters(wpgrade::$shortname . '_theme_options_config', $redux_sections);
$redux = new ReduxFramework($redux_sections, $redux_args, $redux_tabs);
wpgrade::resolve('redux-instance', $redux);
// register callbacks
require $currentpath . 'callbacks' . EXT;
示例#24
0
<?php

/**
 * The main template file.
 * This is the most generic template file in a WordPress theme and one of the
 * two required files for a theme (the other being style.css).
 * It is used to display a page when nothing more specific matches a query.
 * For example, it puts together the home page when no home.php file exists.
 * Learn more: http://codex.wordpress.org/Template_Hierarchy
 * @package Rosa
 * @since   Rosa 1.0
 */
get_header();
$blog_style = wpgrade::option('blog_layout', 'classic');
get_template_part('templates/post/loop/' . $blog_style);
get_footer();
示例#25
0
            <svg class="blurp--bottom" width="192" height="61" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 160.7 61.5" enable-background="new 0 0 160.7 61.5" xml:space="preserve"><path fill="#FFFFFF" d="M80.3,61.5c0,0,22.1-2.7,43.1-5.4s41-5.4,36.6-5.4c-21.7,0-34.1-12.7-44.9-25.4S95.3,0,80.3,0c-15,0-24.1,12.7-34.9,25.4S22.3,50.8,0.6,50.8c-4.3,0-6.5,0,3.5,1.3S36.2,56.1,80.3,61.5z"/></svg>
            <div class="btn--top">
                <a href="#" class="btn--top_text">
                    <span class="btn__arrow btn__arrow--top"></span>
                    <span class="btn__arrow btn__arrow--bottom"></span>
                </a>
            </div>
			<div class="container">
				<div class="footer-container">
					<?php 
    $copyright_text = wpgrade::option('copyright_text');
    if (!empty($copyright_text)) {
        ?>
						<div class="copyright-text">
							<?php 
        echo wpgrade::option('copyright_text');
        ?>
						</div>
					<?php 
    }
    wpgrade_footer_nav('<nav class="navigation  navigation--footer">', '</nav>');
    ?>

				</div>
			</div>
		</div>
		<!-- .copyright-area -->
	</footer><!-- .site--footer -->

<?php 
}
示例#26
0
function rosa_post_classes($classes)
{
    //only add this class for regular pages
    if (get_page_template_slug(get_the_ID()) == '') {
        $subtitle = trim(get_post_meta(wpgrade::lang_page_id(get_the_ID()), wpgrade::prefix() . 'page_cover_subtitle', true));
        $title = get_post_meta(wpgrade::lang_page_id(get_the_ID()), wpgrade::prefix() . 'page_cover_title', true);
        $description = get_post_meta(wpgrade::lang_page_id(get_the_ID()), wpgrade::prefix() . 'page_cover_description', true);
        if (!(has_post_thumbnail() || !empty($subtitle) || $title !== ' ' || !empty($description))) {
            $classes[] = 'no-page-header';
        }
    }
    return $classes;
}
							</div>
						<?php 
                }
            }
            ?>
				</div>
				<?php 
            display_header_down_arrow($page_section_idx, $header_height);
            ?>
			</header>
		<?php 
        } else {
            ?>
			<div class="empty-slideshow">
				<?php 
            _e('Currently there are no images assigned to this slideshow', wpgrade::textdomain());
            ?>
			</div>
		<?php 
        }
    } else {
        /* OR REGULAR PAGE */
        if (has_post_thumbnail() || !empty($subtitle) || !empty($title) && $title !== ' ' || !empty($description)) {
            ?>
			<header id="post-<?php 
            the_ID();
            ?>
-title" class="<?php 
            echo $classes;
            ?>
" data-type="image">
示例#28
0
defined('ABSPATH') or die;
/*  for PRO users! -  @var array $families */
/*  for PRO users! - *
 * Overwrite families with those served by redux ... they can give us fonts with all-styles included
 */
if (class_exists('ReduxFramework_customizer_typography')) {
    global $redux;
    $typography = new ReduxFramework_customizer_typography(null, null, $redux);
    // on customizer overwrite options
    // @TODO Refactor this somewhere else
    if (isset($_POST['customized'])) {
        $typography2 = false;
        foreach ($fonts_array as $font) {
            if (wpgrade::customizer_option_exists($font)) {
                $this_font = wpgrade::get_customizer_option($font);
                // Regenerate the font-list on customizer page
                $typography2 = new ReduxFramework_customizer_typography(array('google' => 1), $this_font, $redux);
                ob_start();
                $typography2->output();
                $to_be_deleted = ob_get_clean();
                unset($to_be_deleted);
                // we actually don't need this variable
            }
        }
    }
    if (!empty($typography->parent->typography)) {
        $families = $typography->makeGoogleWebfontString($typography->parent->typography);
        if (!empty($families)) {
            ?>
			<script type="text/javascript">
示例#29
0
<?php

// add theme support for post formats
$post_formats = wpgrade::confoption('post-formats', array());
if (!empty($post_formats)) {
    add_theme_support('post-formats', $post_formats);
}
//add theme support for RSS feed links automatically generated in the head section
add_theme_support('automatic-feed-links');
//tell galleries and captions to behave nicely and use HTML5 markup
add_theme_support('html5', array('gallery', 'caption'));
/*  for PRO users! - *
 * http://codex.wordpress.org/Content_Width
 */
if (!isset($content_width)) {
    $content_width = 960;
}
示例#30
0
?>
>
    <?php 
get_template_part('templates/post/loop-content/featured-classic/image');
?>
	<div class="article__body">
		<?php 
get_template_part('templates/post/loop-content/header-classic');
?>
		<section class="article__content">
			<?php 
echo wpgrade_better_excerpt();
?>
		</section>
		<?php 
$read_more = wpgrade::option('blog_read_more_text');
if (!empty($read_more)) {
    ?>
			<a href="<?php 
    the_permalink();
    ?>
" class="read-more-button"><?php 
    echo $read_more;
    ?>
</a>
		<?php 
}
?>
	</div>
	<!-- .article__body -->
</article>