Plugin Directory

Changeset 389793


Ignore:
Timestamp:
05/27/2011 03:30:09 PM (15 years ago)
Author:
linkstrasse
Message:
  • Make the postexcerpt field visible again (for WP 3.1.x)
  • Enlarge the postexcerpt field to 15 lines
Location:
seo-content-control/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • seo-content-control/trunk/readme.txt

    r368690 r389793  
    44Tags: SEO, bing, google, search engine optimization, content, description, category description, tag description, meta description,
    55Requires at least: 2.7
    6 Tested up to: 3.0.4
     6Tested up to: 3.1.3
    77Stable tag: trunk
    88
     
    5656== Changelog ==
    5757
     58= 1.1.0 =
     59* WP 3.1 hides the post excerpts by default, SCC changes this back to visible.
     60* The postexcerpt edit area is enlarged to about 15 lines (with JavaScript)
     61
    5862= 1.0.7 =
    5963* Support for the plugin Platinum SEO Pack
  • seo-content-control/trunk/seo_content_control.php

    r368690 r389793  
    25612561add_action( 'admin_menu', 'seo_content_control_add_menu' );
    25622562
     2563
     2564/*
     2565 * With WP 3.1 the postexcerpt field is hidden in the editor by default.
     2566 * We definitely need to show it...
     2567 */
     2568function seo_content_control_default_hidden_meta_boxes( $hidden, &$screen ) {
     2569    if ( $hidden && is_array($hidden) ) {
     2570        $key = array_search('postexcerpt', $hidden);
     2571        if ( $key !== FALSE ) {
     2572            unset( $hidden[$key] );
     2573        }
     2574    }
     2575    return $hidden;
     2576}
     2577
     2578add_filter( 'default_hidden_meta_boxes', 'seo_content_control_default_hidden_meta_boxes', 10, 2 );
     2579
     2580/*
     2581 * The WP postexcerpt field is so very tiny, enlarge it (using .js):
     2582 */
     2583add_action("admin_print_scripts-post.php", 'seo_content_control_edit_post_scripts');
     2584function seo_content_control_edit_post_scripts() {
     2585    wp_enqueue_script(
     2586        "seocc-editposts",
     2587        seo_content_control_simple_path_join (
     2588            WP_PLUGIN_URL, basename( dirname( __FILE__ ) )."/js/editposts.js"
     2589        ),
     2590        array( 'jquery' )
     2591    );
     2592}
     2593
     2594
    25632595/*
    25642596 * _PHP4_COMPAT_
Note: See TracChangeset for help on using the changeset viewer.