[wp-hackers] contextual_help - understand i this correctly?

Frank Bueltge frank at bueltge.de
Tue Nov 18 20:20:56 GMT 2008


thanks, works great
Best regards



On Tue, Nov 18, 2008 at 8:59 PM, Ryan Boren <ryan at boren.nu> wrote:
> On Tue, Nov 18, 2008 at 11:31 AM, Frank Bueltge <frank at bueltge.de> wrote:
>> I play with the new help in 2.7
>> Is my code correctly, i have write my appreciation on the syntax
>>
>> THX for your time and help!
>>
>> // filter for help over all pages in admin?
>> add_filter( 'contextual_help_link', array($this, 'contextual_help_link') );
>>
>>                function contextual_help() {
>>                        $contextual_help .= __('test', 'my_plugin');
>>
>>                        echo $contextual_help;
>>                }
>>
>> // help-content for the different pages?
>> add_filter( 'contextual_help', array($this, 'contextual_help') );
>>
>>                function contextual_help() {
>>                        $contextual_help .= '<div class="metabox-prefs">'; // is this important?
>>                        $contextual_help .= __('test', 'my_plugin');
>>                        $contextual_help .= "</div>\n";
>>
>>                        echo $contextual_help;
>>                }
>
> http://trac.wordpress.org/changeset/9761
>
> Changeset 9761 introduces add_contextual_help().  Use it like so:
>
> $hook = add_object_page('Test Object', 'Test Object', 8, 'mt_object',
> 'mt_object_page');
>    add_contextual_help($hook, 'Testing Help');
>
> That adds your custom help text to the contextual part of the menu
> slide down.  If you want to replace the entire content of the slider,
> use the contextual_help filter.
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


More information about the wp-hackers mailing list