WordPress.org

Plugin Directory

Changeset 533038


Ignore:
Timestamp:
04/18/12 18:39:53 (2 years ago)
Author:
dimadin
Message:

Use new API for help for post-3.3 versions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gravatar-signup-encouragement/trunk/gravatar-signup-encouragment.php

    r533032 r533038  
    182182 */ 
    183183function add_gravatar_signup_encouragement_contextual_help() { 
    184     /* Hook in the contextual help filter */ 
    185     add_filter( 'contextual_help','gravatar_signup_encouragement_contextual_help' ); 
     184    global $wp_version; 
     185    /* For post-3.3, use new API */ 
     186    if ( version_compare( $wp_version, 3.3, '>=' ) ) { 
     187        $screen = get_current_screen(); 
     188        $screen->add_help_tab( array( 
     189            'id'      => 'gravatar-signup-encouragement-help', 
     190            'title'   => __( "Gravatar Signup Encouragement", "gse_textdomain" ), 
     191            'content' => "<p>" . __( "<a href='http://blog.milandinic.com/wordpress/plugins/gravatar-signup-encouragement/' target='_blank'>Gravatar Signup Encouragement Settings Documentation</a>", "gse_textdomain" ) . "</p>" . 
     192                "<p>" . __( '<a href="http://wordpress.org/tags/gravatar-signup-encouragement" target="_blank">Gravatar Signup Encouragement Support Forums</a>', 'gse_textdomain' ) . "</p>" 
     193        ) ); 
     194    /* Otherwise, hook in the contextual help filter */ 
     195    } else { 
     196        add_filter( 'contextual_help', 'gravatar_signup_encouragement_contextual_help' ); 
     197    } 
    186198} 
    187199add_action( 'load-options-discussion.php','add_gravatar_signup_encouragement_contextual_help' ); 
Note: See TracChangeset for help on using the changeset viewer.