File Manager / wp-content Search Upload New Item Settings File "db5.php" Full path: /home1/epichome/public_html/wp-content/db5.php File size: 60.67 B (60.67 KB bytes) MIME-type: text/x-php Charset: utf-8 Download Open Edit Advanced Editor Back
<?php
/*
Plugin Name: Page Excerpt
Plugin URI: http://masseltech.com/plugins/page-excerpt/
Description: Adds support for page excerpts - uses WordPress code
Author: Jeremy Massel
Version: 1.3
Author URI: http://www.masseltech.com/
*/
add_action( 'edit_page_form', 'pe_add_box');
add_action('init', 'pe_init');
function pe_init() {
if(function_exists("add_post_type_support")) //support 3.1 and greater
{
add_post_type_support( 'page', 'excerpt' );
}
}
function pe_page_excerpt_meta_box($post) {
?>
<label class="hidden" for="excerpt"><?php _e('Excerpt') ?></label><textarea rows="1" cols="40" name="excerpt" tabindex="6" id="excerpt"><?php echo $post->post_excerpt ?></textarea>
<p><?php _e('Excerpts are optional hand-crafted summaries of your content. You can <a href="http://codex.wordpress.org/Template_Tags/the_excerpt" target="_blank">use them in your template</a>'); ?></p>
<?php
}
function pe_add_box()
{
if(!function_exists("add_post_type_support")) //legacy
{ add_meta_box('postexcerpt', __('Page Excerpt'), 'pe_page_excerpt_meta_box', 'page', 'advanced', 'core');
}
}
?>