[wp-hackers] My Admin Footer plugin credits fails

Stephen Rider wp-hackers at striderweb.com
Sat Nov 8 19:03:28 GMT 2008


Try putting this bit:

	//this should print plugin info into admin footer
	add_action('in_admin_footer', 'plugin_admin_footer', 11 );

...inside the my_options_ui() function.  Stick it at the very end  
before the closing "}".

Also, I suggest a priority of 9 rather than 11.  Unless your footer  
info is appearing on all admin pages (rarely recommended) in which  
case 11 is indeed better.

Stephen

On Nov 8, 2008, at 10:36 AM, Daiv Mowbray wrote:

> Following the suggestion of Stephen Rider,
> I am trying to add plugin credits into the plugin options admin page.
> Using the following code, my footer is not modified. (no plugin info  
> printed.)
>
> Any suggestions welcome , and thanx.
>
> function setup_optionspage() {
> 	if( function_exists('add_options_page') ) {
> 		add_options_page(__('My Menu'),__('My Menu'), 8, 'my-menu', array(& 
> $this, 'my_options_ui'));
> 	}
> 	//this should print plugin info into admin footer
> 	add_action('in_admin_footer', 'plugin_admin_footer', 11 );
> }
> function plugin_admin_footer() {
> 	$plugin_data = get_plugin_data( __FILE__ );
> 	printf('%1$s plugin | Version %2$s | by %3$s<br />',  
> $plugin_data['Title'], $plugin_data['Version'],  
> $plugin_data['Author']);
> }



More information about the wp-hackers mailing list