Пример #1
0
<?php

/**
 *
 * content*.php
 *
 * The post format template. You can change the structure of your posts or add/remove post elements here.
 * 
 * 'id' - post id
 * 'class' - post class
 * 'thumbnail' - post icon
 * 'title' - post title
 * 'before' - post header metadata
 * 'content' - post content
 * 'after' - post footer metadata
 * 
 * To create a new custom post format template you must create a file "content-YourTemplateName.php"
 * Then copy the contents of the existing content.php into your file and edit it the way you want.
 * 
 * Change an existing get_template_part() function as follows:
 * get_template_part('content', 'YourTemplateName');
 *
 */
global $post;
theme_post_wrapper(array('id' => theme_get_post_id(), 'class' => theme_get_post_class(), 'title' => theme_get_meta_option($post->ID, 'theme_show_page_title') ? get_the_title() : '', 'heading' => theme_get_option('theme_single_article_title_tag'), 'before' => theme_get_metadata_icons('edit', 'header'), 'content' => theme_get_content()));
?>

    // filterable image width with, essentially, no limit for image height.
    ?>
		</a>
	</p>
	<?php 
} else {
    ?>
	<p class="attachment center">
		<a href="<?php 
    echo wp_get_attachment_url();
    ?>
" title="<?php 
    echo esc_attr(strip_tags(get_the_title()));
    ?>
" rel="attachment">
			<?php 
    echo basename(get_permalink());
    ?>
		</a>
	</p>
	<?php 
}
echo theme_get_content();
if (wp_attachment_is_image()) {
    $metadata = wp_get_attachment_metadata();
    echo '<p class="center">' . sprintf(__('Full size is %s pixels', THEME_NS), sprintf('<a href="%1$s" title="%2$s">%3$s &times; %4$s</a>', wp_get_attachment_url(), esc_attr(__('Link to full-size image', THEME_NS)), $metadata['width'], $metadata['height'])) . '</p>';
}
/* Display navigation to next/previous pages when applicable */
theme_post_navigation(array('wrap' => false, 'prev_link' => theme_get_next_image_link(false), 'next_link' => theme_get_previous_image_link(false)));
theme_post_wrapper(array('id' => theme_get_post_id(), 'class' => theme_get_post_class(), 'title' => '<a href="' . get_permalink($post->ID) . '" rel="bookmark" title="' . strip_tags(get_the_title()) . '">' . get_the_title() . '</a>', 'heading' => theme_get_option('theme_' . (is_home() ? 'posts' : 'single') . '_article_title_tag'), 'before' => theme_get_metadata_icons('date,author,edit', 'header'), 'content' => theme_ob_get_clean()));
<?php

/**
 *
 * content*.php
 *
 * The post format template. You can change the structure of your posts or add/remove post elements here.
 * 
 * 'id' - post id
 * 'class' - post class
 * 'thumbnail' - post icon
 * 'title' - post title
 * 'before' - post header metadata
 * 'content' - post content
 * 'after' - post footer metadata
 * 
 * To create a new custom post format template you must create a file "content-YourTemplateName.php"
 * Then copy the contents of the existing content.php into your file and edit it the way you want.
 * 
 * Change an existing get_template_part() function as follows:
 * get_template_part('content', 'YourTemplateName');
 *
 */
global $post;
theme_post_wrapper(array('id' => theme_get_post_id(), 'class' => theme_get_post_class(), 'title' => theme_get_meta_option($post->ID, 'theme_show_post_title') ? '<a href="' . get_permalink($post->ID) . '" rel="bookmark" title="' . strip_tags(get_the_title()) . '">' . get_the_title() . '</a>' : '', 'heading' => theme_get_option('theme_posts_article_title_tag'), 'before' => theme_get_metadata_icons('date,author,edit', 'header'), 'content' => theme_highlight_excerpt(get_search_query(), theme_get_content()), 'after' => theme_get_metadata_icons('category,tag', 'footer')));
Пример #4
0
<?php

/**
 *
 * content*.php
 *
 * The post format template. You can change the structure of your posts or add/remove post elements here.
 * 
 * 'id' - post id
 * 'class' - post class
 * 'thumbnail' - post icon
 * 'title' - post title
 * 'before' - post header metadata
 * 'content' - post content
 * 'after' - post footer metadata
 * 
 * To create a new custom post format template you must create a file "content-YourTemplateName.php"
 * Then copy the contents of the existing content.php into your file and edit it the way you want.
 * 
 * Change an existing get_template_part() function as follows:
 * get_template_part('content', 'YourTemplateName');
 *
 */
global $post;
theme_post_wrapper(array('id' => theme_get_post_id(), 'class' => theme_get_post_class(), 'title' => theme_get_meta_option($post->ID, 'theme_show_post_title') ? get_the_title() : '', 'heading' => theme_get_option('theme_single_article_title_tag'), 'before' => theme_get_metadata_icons('date,author,edit', 'header'), 'content' => theme_get_content(), 'after' => theme_get_metadata_icons('category,tag', 'footer')));
Пример #5
0
<?php

/**
 *
 * content*.php
 *
 * The post format template. You can change the structure of your posts or add/remove post elements here.
 * 
 * 'id' - post id
 * 'class' - post class
 * 'thumbnail' - post icon
 * 'title' - post title
 * 'before' - post header metadata
 * 'content' - post content
 * 'after' - post footer metadata
 * 
 * To create a new custom post format template you must create a file "content-YourTemplateName.php"
 * Then copy the contents of the existing content.php into your file and edit it the way you want.
 * 
 * Change an existing get_template_part() function as follows:
 * get_template_part('content', 'YourTemplateName');
 *
 */
global $post;
theme_post_wrapper(array('id' => theme_get_post_id(), 'class' => theme_get_post_class(), 'content' => theme_get_excerpt(), 'after' => theme_get_metadata_icons('', 'footer')));
Пример #6
0
<?php

global $post;
theme_post_wrapper(array('id' => theme_get_post_id(), 'class' => theme_get_post_class(), 'thumbnail' => theme_get_post_thumbnail(), 'title' => '<a href="' . get_permalink($post->ID) . '" rel="bookmark" title="' . get_the_title() . '">' . get_the_title() . '</a>', 'before' => theme_get_metadata_icons('date,author,edit', 'header'), 'content' => theme_get_excerpt(), 'after' => theme_get_metadata_icons('category,tag,comments', 'footer')));
Пример #7
0
<?php

/**
 *
 * content*.php
 *
 * The post format template. You can change the structure of your posts or add/remove post elements here.
 * 
 * 'id' - post id
 * 'class' - post class
 * 'thumbnail' - post icon
 * 'title' - post title
 * 'before' - post header metadata
 * 'content' - post content
 * 'after' - post footer metadata
 * 
 * To create a new custom post format template you must create a file "content-YourTemplateName.php"
 * Then copy the contents of the existing content.php into your file and edit it the way you want.
 * 
 * Change an existing get_template_part() function as follows:
 * get_template_part('content', 'YourTemplateName');
 *
 */
global $post;
theme_post_wrapper(array('id' => theme_get_post_id(), 'class' => theme_get_post_class(), 'content' => theme_get_excerpt(), 'after' => theme_get_metadata_icons('date,author,comments,edit', 'footer')));
Пример #8
0
    // filterable image width with, essentially, no limit for image height.
    ?>
				</a>
			</p>
			<?php 
} else {
    ?>
				<p class="attachment center">
					<a href="<?php 
    echo wp_get_attachment_url();
    ?>
" title="<?php 
    echo esc_attr(get_the_title());
    ?>
" rel="attachment">
						<?php 
    echo basename(get_permalink());
    ?>
					</a>
				</p>
			<?php 
}
echo theme_get_content();
if (wp_attachment_is_image()) {
    $metadata = wp_get_attachment_metadata();
    echo '<p class="center">' . sprintf(__('Full size is %s pixels', THEME_NS), sprintf('<a href="%1$s" title="%2$s">%3$s &times; %4$s</a>', wp_get_attachment_url(), esc_attr(__('Link to full-size image', THEME_NS)), $metadata['width'], $metadata['height'])) . '</p>';
}
/* Display navigation to next/previous pages when applicable */
theme_page_navigation(array('wrap' => false, 'prev_link' => theme_get_next_image_link(false), 'next_link' => theme_get_previous_image_link(false)));
theme_post_wrapper(array('id' => theme_get_post_id(), 'class' => theme_get_post_class(), 'title' => '<a href="' . get_permalink($post->ID) . '" rel="bookmark" title="' . get_the_title() . '">' . get_the_title() . '</a>', 'before' => theme_get_metadata_icons('date,author,edit', 'header'), 'content' => ob_get_clean()));
Пример #9
0
<?php

/**
 *
 * content*.php
 *
 * The post format template. You can change the structure of your posts or add/remove post elements here.
 * 
 * 'id' - post id
 * 'class' - post class
 * 'thumbnail' - post icon
 * 'title' - post title
 * 'before' - post header metadata
 * 'content' - post content
 * 'after' - post footer metadata
 * 
 * To create a new custom post format template you must create a file "content-YourTemplateName.php"
 * Then copy the contents of the existing content.php into your file and edit it the way you want.
 * 
 * Change an existing get_template_part() function as follows:
 * get_template_part('content', 'YourTemplateName');
 *
 */
global $post;
theme_post_wrapper(array('id' => theme_get_post_id(), 'class' => theme_get_post_class(), 'thumbnail' => theme_get_post_thumbnail(), 'title' => '<a href="' . get_permalink($post->ID) . '" rel="bookmark" title="' . strip_tags(get_the_title()) . '">' . get_the_title() . '</a>', 'heading' => theme_get_option('theme_' . (is_single() ? 'single' : 'posts') . '_article_title_tag'), 'before' => theme_get_metadata_icons('date,author,edit', 'header'), 'content' => theme_get_excerpt(), 'after' => theme_get_metadata_icons('category,tag,comments', 'footer')));