function wpgrade_prepare_password_for_custom_post_types() { global $wpgrade_private_post; $wpgrade_private_post = rosa::is_password_protected(); }
?> <hr class="separator"/> <aside class="author" itemscope itemtype="http://schema.org/Person"> <div class="author__avatar"> <?php echo '<img src="' . util::get_avatar_url(get_the_author_meta('email'), '80') . '" itemprop="image" alt="avatar" />'; ?> </div> <div class="author__text"> <div class="author__title"> <h3 class="accessibility"><?php _e('Author', 'rosa_txtd'); ?> </h3> <h4><span itemprop="name"><?php rosa::the_author_posts_link(); ?> </span></h4> </div> <p class="author__bio" itemprop="description"><?php the_author_meta('description'); ?> </p> <ul class="author__social-links"> <?php if (get_the_author_meta('url')) { ?> <li class="author__social-links__list-item"> <a class="author__social-link" href="<?php echo get_the_author_meta('url'); ?>
function widget($args, $instance) { global $comments, $comment; $cache = wp_cache_get('widget_recent_comments', 'widget'); if (!is_array($cache)) { $cache = array(); } if (!isset($args['widget_id'])) { $args['widget_id'] = $this->id; } if (isset($cache[$args['widget_id']])) { echo $cache[$args['widget_id']]; return; } extract($args, EXTR_SKIP); $output = ''; $title = !empty($instance['title']) ? $instance['title'] : __('Recent Comments', 'rosa_txtd'); $title = apply_filters('widget_title', $title, $instance, $this->id_base); $number = !empty($instance['number']) ? absint($instance['number']) : 5; if (!$number) { $number = 5; } $comments = get_comments(apply_filters('widget_comments_args', array('number' => $number, 'status' => 'approve', 'post_status' => 'publish'))); $output .= $before_widget; if ($title) { $output .= $before_title . $title . $after_title; } if ($comments) { // Prime cache for associated posts. (Prime post term cache if we need it for permalinks.) $post_ids = array_unique(wp_list_pluck($comments, 'comment_post_ID')); _prime_post_caches($post_ids, strpos(get_option('permalink_structure'), '%category%'), false); foreach ((array) $comments as $comment) { if (isset($comment->post_password) && !empty($comment->post_password)) { continue; } ob_start(); ?> <article class="latest-comments__list"> <div class="media__body latest-comments__body"> <div class="comment__meta"> <a class="latest-comments__author" href="<?php echo get_comment_author_url(); ?> "><?php echo $comment->comment_author; ?> </a> <?php _e('on', 'rosa_txtd'); ?> <a class="latest-comments__title" href="<?php echo $comment->guid; ?> "><?php echo $comment->post_title; ?> </a> </div> <div class="latest-comments__content"> <a href="<?php echo $comment->guid; ?> "> <p><?php echo rosa::limit_words(strip_tags(get_comment_text($comment->comment_ID)), 25, ' […]'); ?> </p> </a> </div> </div> </article> <?php $output .= ob_get_clean(); } } $output .= $after_widget; echo $output; $cache[$args['widget_id']] = $output; wp_cache_set('widget_recent_comments', $cache, 'widget'); }
<?php /** * Loop Template Classic Full Width */ global $wp_query; ?> <section class="container container--archive"> <div class="page-content archive"> <?php rosa::the_archive_title(); ?> <?php if (!is_category() && !is_tag() && !is_search()) { get_template_part('templates/post/loop/categories-dropdown'); } ?> <?php //first the sticky posts // get current page we are on. If not set we can assume we are on page 1. $current_page = get_query_var('paged') ? get_query_var('paged') : 1; if (is_front_page() && $current_page == 1) { $sticky = get_option('sticky_posts'); // check if there are any if (!empty($sticky)) { // optional: sort the newest IDs first rsort($sticky); // override the query
<?php /* for PRO users! - * * The template for displaying the subpages. */ global $post, $wpgrade_private_post, $footer_needs_big_waves; //test if the current page has child pages if (rosa::page_has_children()) { //get only the next level pages $args = array('hierarchical' => 0, 'child_of' => $post->ID, 'parent' => $post->ID, 'sort_column' => 'menu_order, ID'); $pages = get_pages($args); foreach ($pages as $post) { setup_postdata($post); if (post_password_required() && !$wpgrade_private_post['allowed']) { // password protection get_template_part('templates/password-request-form'); } else { get_template_part('templates/page/header'); $classes = "article--page article--main article--subpage"; $style = ''; // $inverse_colors = get_post_meta( wpgrade::lang_page_id( get_the_ID() ), wpgrade::prefix() . 'inverse_section_colors', true ); // if ($inverse_colors == 'on') { // $classes .= ' inverse-colors'; // // $text_color = wpgrade::option('text_color'); // $background_color = wpgrade::option('content_background_color'); // // $style .= ' style="background-color: '.$text_color.'; color: '.$background_color.'" '; // } if (get_page_template_slug(get_the_ID()) == 'page-templates/contact.php') { //this is a gmap