. * * @package Cubricks * @subpackage Cubricks Theme Functions * @author Raphael Villanea * @copyright Copyright (c) 2011, BrickPress * @license http://www.gnu.org/licenses/gpl-3.0.html * @since 1.0.0 */ /** * Displays the current post's format. * @since 1.0.0 */ if( ! function_exists('bricks_post_format') ) : function bricks_post_format() { $post_format = ucwords( get_post_format() ); if ( is_sticky() ) { $post_format = __( 'Featured', 'cubricks' ); } elseif ( $post_format == '' ) { $post_format = __( 'Article', 'cubricks' ); } $format = apply_filters( 'bricks_post_format', '

' . $post_format . '

' ); echo $format; } endif; /** * Display an icon representing the current post's format. * @since 1.0.0 */ if( ! function_exists('bricks_post_format_icon') ) : function bricks_post_format_icon() { $post_format = strtolower( get_post_format() ); if ( is_sticky() ) { $post_format = __( 'featured', 'cubricks' ); } elseif ( $post_format == '' ) { $post_format = __( 'standard', 'cubricks' ); } $format = apply_filters( 'bricks_post_format_icon', '' ); echo $format; } endif; /** * Convert a chat post into a definition list based on "Name: What they said" content * * @since 1.0.0 */ function bricks_chat_content() { global $post; $output = '' . $line . '
    '; } endforeach; $output .= '
'; // Remove any empty definition lists $output = str_replace( '
    ', '', $output ); return apply_filters( 'the_content', $output ); } /** * Returns content for link post format. * * @since 1.0.0 */ function bricks_link_content() { $output = '
    '; $output .= esc_attr( $link['desc'] ); $output = str_replace( '', '', $output ); return apply_filters( 'the_content', $output ); } /** * Returns content for quote post format. * * @since 1.0.0 */ function bricks_quote_content() { global $post; if ( strpos( $post->post_content, ''; the_content(); if ( strpos( $post->post_content, ''; //if ( strpos( $post->post_content, '—' . get_the_title() . ''; } /** * Shows author avatar for status post format. * * @since 1.0.0 */ if( ! function_exists('bricks_status_content') ) : function bricks_status_content() { global $post; $post_format = get_post_format(); $current_author = (isset($_GET['author_name'])) ? get_user_by('slug', $author_name) : get_userdata(get_query_var('author')); if( ! is_author() && $post_format == 'status' ) { ?>
    $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC', 'numberposts' => 999 ) ); if ( $images ) : $total_images = count( $images ); $image = array_shift( $images ); $image_img_tag = wp_get_attachment_image( $image->ID, 'full' ); ?>

    %2$s photo.', 'This gallery contains %2$s photos.', $total_images, 'cubricks' ), 'href="' . esc_url( get_permalink() ) . '" title="' . sprintf( esc_attr__( 'Permalink to %s', 'cubricks' ), the_title_attribute( 'echo=0' ) ) . '" rel="bookmark"', number_format_i18n( $total_images ) ); ?>

    $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image' ) ); $image = array_shift( $images ); $image_img_tag = wp_get_attachment_image( $image->ID, 'full' ); ?>