[theme-reviewers] Are themes restricted from adding top levelmenus in WP 3.1 rc-4
Chip Bennett
chip at chipbennett.net
Thu Feb 17 16:48:31 UTC 2011
Check your arguments for add_theme_page().
Here are the valid arguments:
add_theme_page( $page_title, $menu_title, $capability, $menu_slug, $function
);
And here's your code:
add_theme_page('Swift Theme Options', 'Swift Options', 'edit_theme_options',
'swift-options',* 'swiftOptions',$favicon,62*);
You are calling invalid arguments; namely, the last two: *$icon_url*, and *
$position*.
Codex Ref: Administration Menus<http://codex.wordpress.org/Administration_Menus>
Chip
On Thu, Feb 17, 2011 at 10:35 AM, Satish Gandham <satish.iitg at gmail.com>wrote:
> Yes, I was this folder as eclipse project directory.
>
> I created a new folder and installed a fresh copy, still the same error.
>
> here is my code
>
> //Adding adminstrative menus
> add_action('admin_menu', 'swift_themes_menu');
> function swift_themes_menu() {
> $favicon=get_bloginfo('template_url').'/images/favicon.ico';
> add_menu_page('Swift Theme Options', 'Swift Options',
> 'edit_theme_options', 'swift-options', 'swiftOptions',$favicon,62);
> add_submenu_page( 'swift-options', 'Design Options', 'Design Options',
> 'edit_theme_options', 'swift-design-options', 'swiftDesignOptions');
> add_submenu_page( 'swift-options', 'Import and Export SWIFT
> options','Import / Export', 'edit_theme_options', 'swift-import-export',
> 'swiftImportExportMenu');
> }
>
>
> /* No error when i use this*/
> function swift_themes_menu() {
> $favicon=get_bloginfo('template_url').'/images/favicon.ico';
> add_theme_page('Swift Theme Options', 'Swift Options',
> 'edit_theme_options', 'swift-options', 'swiftOptions',$favicon,62);
> add_theme_page('Design Options', 'Design Options',
> 'edit_theme_options', 'swift-design-options', 'swiftDesignOptions');
> add_theme_page('Import and Export SWIFT options','Import / Export',
> 'edit_theme_options', 'swift-import-export', 'swiftImportExportMenu');
> }
>
>
> _______________________________________________
> theme-reviewers mailing list
> theme-reviewers at lists.wordpress.org
> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wordpress.org/pipermail/theme-reviewers/attachments/20110217/4e486039/attachment.htm>
More information about the theme-reviewers
mailing list