comment_type || 'trackback' == $comment->comment_type ) : ?>
  • >
    ', '' ); ?>
  • >
    %s', get_comment_author_link() ); ?> comment_approved ) : ?>

    ', '' ); ?> 'div-comment', 'depth' => $depth, 'max_depth' => $args['max_depth'], 'before' => '', 'after' => '', ) ) ); ?>
    %2$s ', esc_url( get_permalink( get_the_ID() ) ), /* translators: %s: Name of current post */ sprintf( __( 'Continue reading "%s"', 'reviewer' ), esc_html( get_the_title( get_the_ID() ) ) ) ); return '… ' . $link; } add_filter( 'excerpt_more', 'reviewer_excerpt_more' ); endif; /** * Returns true if a blog has more than 1 category. * * @return bool */ function reviewer_categorized_blog() { if ( false === ( $all_the_cool_cats = get_transient( 'reviewer_categories' ) ) ) { // Create an array of all the categories that are attached to posts. $all_the_cool_cats = get_categories( array( 'fields' => 'ids', 'hide_empty' => 1, // We only need to know if there is more than one category. 'number' => 2, ) ); // Count the number of categories that are attached to the posts. $all_the_cool_cats = count( $all_the_cool_cats ); set_transient( 'reviewer_categories', $all_the_cool_cats ); } if ( $all_the_cool_cats > 1 ) { // This blog has more than 1 category so reviewer_categorized_blog should return true. return true; } else { // This blog has only 1 category so reviewer_categorized_blog should return false. return false; } } /** * Flush out the transients used in reviewer_categorized_blog. */ function reviewer_category_transient_flusher() { if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) { return; } // Like, beat it. Dig? delete_transient( 'reviewer_categories' ); } add_action( 'edit_category', 'reviewer_category_transient_flusher' ); add_action( 'save_post', 'reviewer_category_transient_flusher' ); if ( ! function_exists( 'reviewer_the_custom_logo' ) ) : /** * Displays the optional custom logo. * * Does nothing if the custom logo is not available. * * @since Reviewer 1.0.9 */ function reviewer_the_custom_logo() { if ( function_exists( 'the_custom_logo' ) ) { the_custom_logo(); } } endif; /** * Registers the custom meta fields using the Meta Box plugin. * * Does nothing if the plugin is not activated. * * @since Reviewer 1.1.0 */ add_filter( 'rwmb_meta_boxes', 'reviewer_register_meta_boxes' ); function reviewer_register_meta_boxes( $meta_boxes ) { $prefix = 'product-'; // 1st meta box $meta_boxes[] = array( 'id' => 'personal', 'title' => esc_html__( 'Custom Meta Fields', 'reviewer' ), 'post_types' => array( 'post' ), 'context' => 'normal', 'priority' => 'high', 'fields' => array( array( 'name' => esc_html__( 'Product Profile', 'reviewer' ), 'id' => $prefix . 'profile', 'type' => 'textarea', 'std' => '', 'class' => 'custom-class', 'clone' => true, ), array( 'name' => esc_html__( 'Product Rating', 'reviewer' ), 'desc' => esc_html__( 'Ex: 87 points', 'reviewer' ), 'id' => $prefix . 'rating', 'type' => 'text', 'std' => '', 'class' => 'custom-class', 'clone' => true, ), array( 'name' => esc_html__( 'Product Price', 'reviewer' ), 'desc' => esc_html__( 'Ex: $19.95', 'reviewer' ), 'id' => $prefix . 'price', 'type' => 'text', 'std' => '', 'class' => 'custom-class', 'clone' => true, ), ) ); return $meta_boxes; }