<?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 × %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')));
<?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')));
<?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')));
<?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')));
<?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')));
/** * Alternative to get_current_screen() * @link http://wordpress.stackexchange.com/a/174596/22728 * * @param string $base * @param string $post_type * @return bool */ function theme_is_current_screen($base = null, $post_type = null) { if (!$base && !$post_type) { return false; } $screen = function_exists('get_current_screen') ? get_current_screen() : null; if (!$screen) { // Fake it. $screen = new StdClass(); $screen->post_type = $screen->base = ''; global $pagenow; if ($pagenow == 'admin-ajax.php') { if (isset($_REQUEST['action'])) { $screen->base = $_REQUEST['action']; } } else { $screen->post_type = isset($_REQUEST['post_type']) ? $_REQUEST['post_type'] : ''; if ($pagenow == 'post.php' || $pagenow == 'post-new.php' || $pagenow == 'edit.php') { $screen->base = preg_replace('/[^a-z].+$/', '', $pagenow); if (!$screen->post_type) { $screen->post_type = get_post_type(theme_get_post_id()); } } else { $page_hook = ''; global $plugin_page; if (!empty($plugin_page)) { if ($screen->post_type) { $the_parent = $pagenow . '?post_type=' . $screen->post_type; } else { $the_parent = $pagenow; } if (!($page_hook = get_plugin_page_hook($plugin_page, $the_parent))) { $page_hook = get_plugin_page_hook($plugin_page, $plugin_page); } } $screen->base = $page_hook ? $page_hook : pathinfo($pagenow, PATHINFO_FILENAME); } } } // The base type of the screen. This is typically the same as $id but with any post types and taxonomies stripped. if ($base) { if (!is_array($base)) { $base = array($base); } if (!in_array($screen->base, $base)) { return false; } } if ($post_type) { if (!is_array($post_type)) { $post_type = array($post_type); } if (!in_array($screen->post_type, $post_type)) { return false; } } return true; }
// 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 × %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()));
<?php 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() : '', 'content' => theme_get_content()));
<?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')));