| 7 | | $default_headers = array( 'Name' => 'Hello Dolly', |
| 8 | | 'Title' => '<a href="http://wordpress.org/#" title="Visit plugin homepage">Hello Dolly</a>', |
| 9 | | 'PluginURI' => 'http://wordpress.org/#', |
| 10 | | 'Description' => 'This is not just a plugin, it symbolizes the hope and enthusiasm of an entire generation summed up in two words sung most famously by Louis Armstrong: Hello, Dolly. When activated you will randomly see a lyric from Hello, Dolly in the upper right of your admin screen on every page. By <a href="http://ma.tt/" title="Visit author homepage">Matt Mullenweg</a>.', |
| 11 | | 'Author' => '<a href="http://ma.tt/" title="Visit author homepage">Matt Mullenweg</a>', |
| 12 | | 'AuthorURI' => 'http://ma.tt/', |
| 13 | | 'Version' => '1.5.1', |
| 14 | | 'TextDomain' => 'hello-dolly', |
| 15 | | 'DomainPath' => '' |
| 16 | | ); |
| 17 | | |
| 18 | | $this->assertTrue(is_array($data)); |
| 19 | | |
| | 7 | $default_headers = array( |
| | 8 | 'Name' => 'Hello Dolly', |
| | 9 | 'Title' => '<a href="http://wordpress.org/#" title="Visit plugin homepage">Hello Dolly</a>', |
| | 10 | 'PluginURI' => 'http://wordpress.org/#', |
| | 11 | 'Description' => 'This is not just a plugin, it symbolizes the hope and enthusiasm of an entire generation summed up in two words sung most famously by Louis Armstrong: Hello, Dolly. When activated you will randomly see a lyric from Hello, Dolly in the upper right of your admin screen on every page. By <a href="http://ma.tt/" title="Visit author homepage">Matt Mullenweg</a>.', |
| | 12 | 'Author' => '<a href="http://ma.tt/" title="Visit author homepage">Matt Mullenweg</a>', |
| | 13 | 'AuthorURI' => 'http://ma.tt/', |
| | 14 | 'Version' => '1.5.1', |
| | 15 | 'TextDomain' => 'hello-dolly', |
| | 16 | 'DomainPath' => '' |
| | 17 | ); |
| | 18 | |
| | 19 | $this->assertTrue( is_array($data) ); |
| | 20 | |
| 34 | | add_options_page('Test Settings', 'Test Settings', 'manage_options', 'testsettings', 'mt_settings_page'); |
| 35 | | add_management_page('Test Tools', 'Test Tools', 'manage_options', 'testtools', 'mt_tools_page'); |
| 36 | | add_menu_page('Test Toplevel', 'Test Toplevel', 'manage_options', 'mt-top-level-handle', 'mt_toplevel_page' ); |
| 37 | | add_submenu_page('mt-top-level-handle', 'Test Sublevel', 'Test Sublevel', 'manage_options', 'sub-page', 'mt_sublevel_page'); |
| 38 | | add_submenu_page('mt-top-level-handle', 'Test Sublevel 2', 'Test Sublevel 2', 'manage_options', 'sub-page2', 'mt_sublevel_page2'); |
| 39 | | add_theme_page('With Spaces', 'With Spaces', 'manage_options', 'With Spaces', 'mt_tools_page'); |
| 40 | | add_pages_page('Appending Query Arg', 'Test Pages', 'edit_pages', 'testpages', 'mt_pages_page' ); |
| 41 | | |
| 42 | | //TODO: review the http://null.host/ here and work out if this is portable enough for testing on other hosts |
| 43 | | $expected['testsettings'] = 'http://null.host/wp-admin/options-general.php?page=testsettings'; |
| 44 | | $expected['testtools'] = 'http://null.host/wp-admin/tools.php?page=testtools'; |
| 45 | | $expected['mt-top-level-handle'] = 'http://null.host/wp-admin/admin.php?page=mt-top-level-handle'; |
| 46 | | $expected['sub-page'] = 'http://null.host/wp-admin/mt-top-level-handle?page=sub-page'; |
| 47 | | $expected['sub-page2'] = 'http://null.host/wp-admin/mt-top-level-handle?page=sub-page2'; |
| 48 | | $expected['not_registered'] = ''; |
| 49 | | $expected['With Spaces'] = 'http://null.host/wp-admin/themes.php?page=WithSpaces'; |
| 50 | | $expected['testpages'] = 'http://null.host/wp-admin/edit.php?post_type=page&page=testpages'; |
| | 34 | add_options_page( 'Test Settings', 'Test Settings', 'manage_options', 'testsettings', 'mt_settings_page' ); |
| | 35 | add_management_page( 'Test Tools', 'Test Tools', 'manage_options', 'testtools', 'mt_tools_page' ); |
| | 36 | add_menu_page( 'Test Toplevel', 'Test Toplevel', 'manage_options', 'mt-top-level-handle', 'mt_toplevel_page' ); |
| | 37 | add_submenu_page( 'mt-top-level-handle', 'Test Sublevel', 'Test Sublevel', 'manage_options', 'sub-page', 'mt_sublevel_page' ); |
| | 38 | add_submenu_page( 'mt-top-level-handle', 'Test Sublevel 2', 'Test Sublevel 2', 'manage_options', 'sub-page2', 'mt_sublevel_page2' ); |
| | 39 | add_theme_page( 'With Spaces', 'With Spaces', 'manage_options', 'With Spaces', 'mt_tools_page' ); |
| | 40 | add_pages_page( 'Appending Query Arg', 'Test Pages', 'edit_pages', 'testpages', 'mt_pages_page' ); |