Scott Taylor
8ee598169f
After [31105], don't ditch the isset()
calls for BC. Declare $page_hook
as null
so it is initialized for all execution paths but will still fail isset()
checks.
...
Fixes #30958 .
Built from https://develop.svn.wordpress.org/trunk@31106
git-svn-id: http://core.svn.wordpress.org/trunk@31087 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-08 22:52:22 +00:00
Scott Taylor
60e1dd409b
Properly declare $hook_suffix
, $plugin_page
, $typenow
, and $taxnow
as globals in wp-admin/admin.php
.
...
Fixes #30958 .
Built from https://develop.svn.wordpress.org/trunk@31105
git-svn-id: http://core.svn.wordpress.org/trunk@31086 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-08 22:15:24 +00:00
Scott Taylor
383a5c6c24
In wp-includes/plugin.php
, collapse 3 else-newline-tab-if
statements.
...
See #30799 .
Built from https://develop.svn.wordpress.org/trunk@31091
git-svn-id: http://core.svn.wordpress.org/trunk@31072 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-08 07:13:24 +00:00
Scott Taylor
60b0cd7943
The keyword elseif
should be used instead of else if
so that all control keywords look like single words.
...
This was a mess, is now standardized across the codebase, except for a few 3rd-party libs.
See #30799 .
Built from https://develop.svn.wordpress.org/trunk@31090
git-svn-id: http://core.svn.wordpress.org/trunk@31071 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-08 07:05:25 +00:00
Andrew Nacin
bc60e63518
Use correct function name in docs for get_plugin_data().
...
props eliorivero.
fixes #30699 .
Built from https://develop.svn.wordpress.org/trunk@31008
git-svn-id: http://core.svn.wordpress.org/trunk@30989 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-31 08:08:22 +00:00
Boone Gorges
95dba4c8c0
When no plugins are active, return an empty array from validate_active_plugins()
.
...
This creates parity with the behavior of the function when plugins *are* active,
but none are invalid. It also makes it possible to write unit tests for the
function.
Props sgrant.
Fixes #30860 .
Built from https://develop.svn.wordpress.org/trunk@31003
git-svn-id: http://core.svn.wordpress.org/trunk@30984 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-30 19:31:22 +00:00
Scott Taylor
67417897ec
Improve the @param
docs for src/wp-admin/includes/plugin.php
.
...
See #30224 .
Built from https://develop.svn.wordpress.org/trunk@30668
git-svn-id: http://core.svn.wordpress.org/trunk@30658 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-30 22:23:23 +00:00
Drew Jaynes
78bb3e5ff5
Docs Formatting: Backtick-escape inline code for all dynamic hook docs in wp-admin/includes/*.
...
Also adds a few inline `@see` cross-references as they apply.
Affects DocBlocks for the following hooks:
* `views_{$this->screen->id}`
* `bulk_actions-{$this->screen->id}`
* `manage_{$this->screen->id}_sortable_columns`
* `theme_action_links_$stylesheet`
* `after_theme_row_$stylesheet`
* `install_plugins_table_api_args_$tab`
* `$prefix . plugin_action_links`
* `after_plugin_row_$plugin_file`
* `manage_taxonomies_for_{$post_type}_columns`
* `manage_{$post_type}_posts_columns`
* `manage_{$post->post_type}_posts_custom_column`
* `{$taxonomy}_row_actions`
* `manage_{$this->screen->taxonomy}_custom_column`
* `install_themes_table_api_args_' . $tab`
* `auto_update_ . $type`
* `{$action}_prefilter`
* `admin_head_{$content_func}`
* `nav_menu_items_{$post_type_name}`
* `activate_ . $plugin`
* `deactivate_ . $plugin`
* `edit_{$post_type}_per_page`
* `postbox_classes_{$page}_{$id}`
* `_wp_post_revision_field_$field`
* `manage_{$screen->id}_columns`
* `in_plugin_update_message-{$file}`
* `in_theme_update_message-{$theme_key}`
See #30552 .
Built from https://develop.svn.wordpress.org/trunk@30648
git-svn-id: http://core.svn.wordpress.org/trunk@30638 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-30 11:28:24 +00:00
Drew Jaynes
188e47869f
Ensure inline code is markdown-escaped as such, HTML tags are removed from summaries, and that code snippets in descriptions are properly indented.
...
Affects DocBlocks for the following core elements:
* Markdown-indent a code snippet in the description for `wp_salt()`
* Backtick-escape inline code in the return description for `get_avatar()`
* Various markdown formatting in the description for `add_filter()`
* Markdown-indent a code snippet in the description for `apply_filters()`
* Backtick-escape inline code in the `@see` description for `apply_filters_ref_array()`
* Backtick-escape inline code in the description for `do_action()`
* Backtick-escape variables in the parameter and return descriptions for `do_action_ref_array()`
* Various markdown formatting in the description for `get_plugin_data()`
Props rarst.
See #30473 .
Built from https://develop.svn.wordpress.org/trunk@30544
git-svn-id: http://core.svn.wordpress.org/trunk@30533 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-24 06:05:23 +00:00
Scott Taylor
37f94bdfd0
Fill in the @param
types for the args for functions missing them in wp-admin/includes/plugin.php
.
...
See #30224 .
Built from https://develop.svn.wordpress.org/trunk@30199
git-svn-id: http://core.svn.wordpress.org/trunk@30199 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-03 05:59:22 +00:00
Sergey Biryukov
2c8e435aa5
Fix copy/paste errors in [27769].
...
props Corphi.
fixes #30054 .
Built from https://develop.svn.wordpress.org/trunk@29977
git-svn-id: http://core.svn.wordpress.org/trunk@29723 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-20 21:35:18 +00:00
Dominik Schilling
57c41263d7
Language packs: Remove translations when deleting a theme or a plugin.
...
This is for translation files in WP_LANG_DIR which are installed through a language pack.
Change `wp_get_installed_translations()` to only return a translation if the .mo file also exists.
fixes #29860 .
Built from https://develop.svn.wordpress.org/trunk@29856
git-svn-id: http://core.svn.wordpress.org/trunk@29619 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-08 19:05:20 +00:00
Scott Taylor
59ef20d458
In activate_plugin()
, do not re-run the activation routine for already-active network-wide plugins.
...
Adds unit test.
Props jbrinley.
Fixes #28651 .
Built from https://develop.svn.wordpress.org/trunk@29818
git-svn-id: http://core.svn.wordpress.org/trunk@29584 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-02 15:56:14 +00:00
Mark Jaquith
e1f2b3b9e2
Use HTTPS URLs for trac.wordpress.org (and use core.trac.wordpress.org)
...
see #27115
Built from https://develop.svn.wordpress.org/trunk@29789
git-svn-id: http://core.svn.wordpress.org/trunk@29561 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-09-29 13:37:16 +00:00
Sergey Biryukov
ab3ce81661
In add_submenu_page(), avoid inadvertently copying classes of a menu item to the first submenu item.
...
fixes #28936 .
Built from https://develop.svn.wordpress.org/trunk@29326
git-svn-id: http://core.svn.wordpress.org/trunk@29107 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-29 16:08:16 +00:00
Drew Jaynes
097dc8ee15
Fix syntax for single- and multi-line comments in wp-admin-directory files.
...
See #28931 .
Built from https://develop.svn.wordpress.org/trunk@29206
git-svn-id: http://core.svn.wordpress.org/trunk@28990 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-17 09:14:16 +00:00
Sergey Biryukov
26d0ad5e12
Remove redundant 'Visit author homepage' title attributes for plugins and themes.
...
props joedolson.
fixes #26554 .
Built from https://develop.svn.wordpress.org/trunk@28673
git-svn-id: http://core.svn.wordpress.org/trunk@28491 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-05 04:52:16 +00:00
Sergey Biryukov
ee9d9133ac
Avoid stomping of the $plugin variable in activate_plugin().
...
fixes #28102 .
Built from https://develop.svn.wordpress.org/trunk@28644
git-svn-id: http://core.svn.wordpress.org/trunk@28462 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-30 22:08:14 +00:00
Scott Taylor
b9afafffe3
hackificator
complains if you call include 'file.php'
without the parens, needs to be include( 'file.php' )
...
See #27881 .
Built from https://develop.svn.wordpress.org/trunk@28479
git-svn-id: http://core.svn.wordpress.org/trunk@28306 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-18 20:52:15 +00:00
Sergey Biryukov
751e624ff7
Deprecate unused argument of delete_plugins(). Clarify @return value.
...
props jdgrimes for initial patch.
fixes #28111 .
Built from https://develop.svn.wordpress.org/trunk@28256
git-svn-id: http://core.svn.wordpress.org/trunk@28084 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-05 10:24:15 +00:00
Andrew Nacin
f9964e361c
Fix docs for hooks in deactivate_plugins() and activate_plugin(). see #27189 , #27188 .
...
Built from https://develop.svn.wordpress.org/trunk@27769
git-svn-id: http://core.svn.wordpress.org/trunk@27606 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-27 02:02:14 +00:00
Drew Jaynes
a271ca696b
Fix docs for the deactivate_$plugin
and deactivated_plugin
hooks.
...
Props wpsmith for the original patch.
Fixes #27189
Built from https://develop.svn.wordpress.org/trunk@27491
git-svn-id: http://core.svn.wordpress.org/trunk@27335 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-10 21:34:17 +00:00
Dominik Schilling
3e356d7bdf
Admin Menu: Set default value of $icon_url
in add_menu_page()
to dashicons-admin-generic
, fixes #26630 .
...
Built from https://develop.svn.wordpress.org/trunk@27482
git-svn-id: http://core.svn.wordpress.org/trunk@27326 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-09 11:13:13 +00:00
Andrew Nacin
5f0981788d
Detect and handle symlinking of plugins in plugin_basename().
...
props rmccue, MikeSchinkel, jdgrimes.
see #16953 .
Built from https://develop.svn.wordpress.org/trunk@27158
git-svn-id: http://core.svn.wordpress.org/trunk@27024 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-10 23:00:15 +00:00
Dominik Schilling
496c05f1e9
Remove unused code. props nofearinc. fixes #26205 .
...
Built from https://develop.svn.wordpress.org/trunk@27033
git-svn-id: http://core.svn.wordpress.org/trunk@26909 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-01-26 00:12:11 +00:00
Sergey Biryukov
0ddaa76f3e
Use correct example of a Dashicons helper class in add_menu_page() and register_post_type() docs.
...
props Rarst.
fixes #26617 for trunk.
Built from https://develop.svn.wordpress.org/trunk@26884
git-svn-id: http://core.svn.wordpress.org/trunk@26767 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-31 10:33:11 +00:00
Drew Jaynes
cd8cedc40d
First there were two, and now there are three -- in the @since versions that came before and that shall be. And so it will be, says nacin.
...
Props JustinSainton, SergeyBiryukov, DrewAPicture.
Fixes #26713 .
Built from https://develop.svn.wordpress.org/trunk@26868
git-svn-id: http://core.svn.wordpress.org/trunk@26754 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-24 18:57:12 +00:00
Ryan Boren
07c16fd23c
The Pinking Shears stir from their slumber, awakened by what may seem, to those
...
innocent in the ways of The Shears, a triviality, a nothing-of-consequence. But there are consequences indeed for recklessly trailing your whitespace. Naturally, they a dire!
One, two! One, two! And through and through
The Pinking Shears went snicker-snack!
They plucked your tail and with your space
They went sniksnuking back.
Let me tell you, that can be uncomfortable, so always pre-sniksnuk your trailing whites. May The Shears be with you.
Built from https://develop.svn.wordpress.org/trunk@26851
git-svn-id: http://core.svn.wordpress.org/trunk@26738 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-11 19:49:11 +00:00
Andrew Nacin
9b29ad0529
Allow for Dashicons and base64-encoded data:image/svg+xml URIs when specifying menu icons.
...
Both of these icons can be colored to match the color scheme, including hover states.
Both are accepted for register_post_type()'s menu_icon argument, and also add_menu_page()'s $icon_url argument.
To use a Dashicon, pass the name of the helper class, e.g. 'dashicons-piechart'.
To use an SVG, pass a valid data URI string starting with 'data:image/svg+xml;base64,'.
props helen.
fixes #25147 .
Built from https://develop.svn.wordpress.org/trunk@26664
git-svn-id: http://core.svn.wordpress.org/trunk@26554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-05 06:38:09 +00:00
Andrew Nacin
c4f7821a16
Use current_user_can('manage_network_plugins') in validate_active_plugins() instead of is_super_admin().
...
props jdgrimes.
fixes #26068 .
Built from https://develop.svn.wordpress.org/trunk@26590
git-svn-id: http://core.svn.wordpress.org/trunk@26480 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-03 21:12:10 +00:00
Dion Hulse
578469fb12
Add braces around a conditional hook. This wasn't causing an issue as if ( conditional ) /* multiline comment */ command();
is perfectly OK, but left open doubt and potential future bugs. See #25229
...
Built from https://develop.svn.wordpress.org/trunk@26509
git-svn-id: http://core.svn.wordpress.org/trunk@26403 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-01 23:13:09 +00:00
Dion Hulse
f29b2e02ac
Plugin Deletion: Properly clear the cache when multiple plugins are deleted. Props jdgrimes. Fixes #26065
...
Built from https://develop.svn.wordpress.org/trunk@26262
git-svn-id: http://core.svn.wordpress.org/trunk@26168 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-19 04:08:09 +00:00
Andrew Nacin
70fd806759
Revert r25824:25875 from the core.svn.wordpress.org repository.
...
These commits were accidentally re-synced commits from develop.svn.wordpress.org due to a race condition. Thankfully, the history of this repository matters fairly little. It also happened only for trunk.
git-svn-id: http://core.svn.wordpress.org/trunk@25876 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-25 02:29:52 +00:00
Andrew Nacin
8ae8e01b67
Remove the old wp_auto_updates_maybe_update cron event. Schedule the new wp_maybe_auto_update event at 7 a.m. and 7 p.m. in the site's timezone.
...
see #27704 .
Built from https://develop.svn.wordpress.org/trunk@25825
git-svn-id: http://core.svn.wordpress.org/trunk@25825 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-24 22:53:14 +00:00
Ryan Boren
b87d4b77e5
Pinking shears
...
Built from https://develop.svn.wordpress.org/trunk@25880
git-svn-id: http://core.svn.wordpress.org/trunk@25792 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-23 14:38:10 +00:00
Sergey Biryukov
e6cef58106
Clean up the documentation for hooks in wp-admin/includes/plugin.php.
...
props DrewAPicture.
see #25229 .
Built from https://develop.svn.wordpress.org/trunk@25482
git-svn-id: http://core.svn.wordpress.org/trunk@25403 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-18 19:36:09 +00:00
Sergey Biryukov
31ddfcca58
Correct @since for hooks in wp-admin/includes/plugin.php. see #25229 .
...
Built from https://develop.svn.wordpress.org/trunk@25477
git-svn-id: http://core.svn.wordpress.org/trunk@25398 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-18 11:58:10 +00:00
Peter Westwood
8f621ffc78
Inline documentation for hooks in wp-admin/includes/plugin.php
...
See #25229 props dllh
Built from https://develop.svn.wordpress.org/trunk@25474
git-svn-id: http://core.svn.wordpress.org/trunk@25395 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-18 07:38:12 +00:00
Dion Hulse
443aa35cfc
Upgrader: Make clearing the Plugin and Theme update caches optional during install and upgrade proceedures. See #22704
...
Built from https://develop.svn.wordpress.org/trunk@25272
git-svn-id: http://core.svn.wordpress.org/trunk@25238 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-06 01:33:09 +00:00
Dion Hulse
46daa240b9
Sanitize the plugin path in _get_plugin_data_markup_translate()
to a WP_PLUGIN_DIR-relative path. The function is designed in mind for receiving relative paths, but may be used with a absolute path.
...
This change makes the function path-agnostic, and can accept either relative or absolute (converting to relative internally). Fixes #20813
Built from https://develop.svn.wordpress.org/trunk@25081
git-svn-id: http://core.svn.wordpress.org/trunk@25066 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-22 04:03:09 +00:00
Andrew Nacin
55b3c67413
Revert [23394] until there is a consensus on target="_blank" (or not) for these external links. see #20839 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@24583 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-08 13:04:07 +00:00
Helen Hou-Sandí
1c816c795b
Open external links to plugin homepages, plugin author homepages, and theme author homepages in a new window/tab. props SergeyBiryukov. fixes #20839 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@23394 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-02-08 16:20:01 +00:00
Helen Hou-Sandí
b1f1579604
its <=> it's in documentation, along with a rogue the, The, and looses. props trepmal. fixes #22665 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@23191 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-12-20 15:55:32 +00:00
Andrew Nacin
9fadd65859
HiDPI versions of the generic menu page icon. props empireoflight, lessbloat. see #21019 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@22393 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-06 00:25:18 +00:00
Andrew Ozz
b443373e8e
Admin menu: add phpdoc/inline comments describing the usage of the param $icon_url in add_menu_page(), add string 'none' to be used when a menu icon is added from CSS, switch core items in the admin menu to use 'none', fixes #21349
...
git-svn-id: http://core.svn.wordpress.org/trunk@21877 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-16 22:51:44 +00:00
Andrew Nacin
7fd32ab9fc
Fold Privacy Settings into Reading Settings, moving blog_public (search engine/robots) to options-reading and removing options-privacy.
...
When blog_public only has two values (as judged by whether the blog_privacy_selector action is used), convert from radio buttons to a checkbox, and rename from 'Site Visibility' to a more specific 'Search Engine Visibility'.
The text and implementation may change a bit. see #16416 .
git-svn-id: http://core.svn.wordpress.org/trunk@21838 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-13 17:28:57 +00:00
Andrew Nacin
1080c1e4ee
Use the key we found using array_search() to unset it from the array. props hakre. fixes #16562 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@21812 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-11 02:12:34 +00:00
Ryan Boren
c55cf716da
Use set_url_scheme(). Props johnbillion, MarcusPope. see #19037 #20759
...
git-svn-id: http://core.svn.wordpress.org/trunk@21664 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-08-30 13:33:00 +00:00
nacin
dcb200efc9
Fix order of @param's for deactivate_plugins(). props Viper007Bond, fixes #21269 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@21291 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-07-20 15:09:40 +00:00
nacin
efb07c689e
Back compat for plugins looking for networkwide=1 during a plugin activation hook.
...
Proper way to detect this: An activation hook callback receives (bool) $network_wide as the first argument.
see #20995 for trunk.
git-svn-id: http://core.svn.wordpress.org/trunk@21104 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-06-25 19:32:34 +00:00