Пример #1
0
/**
 * Filter the_content for post formats, and add extra presentational markup as needed.
 *
 * @param string the_content
 * @return string Updated content with extra markup.
 */
function next_saturday_the_content($content)
{
    global $post;
    $format = get_post_format();
    if (!$format) {
        return $content;
    }
    switch ($format) {
        case 'image':
            $first_image = wpcom_themes_image_grabber($post->ID, $content, '<div class="image-wrapper">', '</div>');
            if ($first_image) {
                $content = preg_replace(WPCOM_THEMES_IMAGE_REPLACE_REGEX, $first_image, $content, 1);
            }
            break;
        default:
            break;
    }
    return $content;
}
Пример #2
0
/**
 * Filter the_content for post formats, and add extra presentational markup as needed.
 *
 * @param string the_content
 * @return string Updated content with extra markup.
 */
function esquire_the_content( $content ) {
	global $post;
	$format = get_post_format();
	if ( ! $format )
		return $content;

	switch ( $format ) {
		case 'image':
			$first_image = wpcom_themes_image_grabber( $post->ID, $content, '<div class="frame"><div class="wrapper">', '</div></div>' );
			if ( $first_image )
				$content = preg_replace( WPCOM_THEMES_IMAGE_REPLACE_REGEX, $first_image, $content, 1 );
			break;
		default:
			break;
	}

	return $content;
}