Sergey Biryukov
60c8e272f5
Docs: Improve DocBlock formatting for add_menu_page()
and add_submenu_page()
wrappers.
...
See #34360 .
Built from https://develop.svn.wordpress.org/trunk@35731
git-svn-id: http://core.svn.wordpress.org/trunk@35695 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-23 17:56:26 +00:00
Drew Jaynes
283b7d0a66
Plugins: Rename the delete_plugin
action hook (introduced in [35094]) to deleted_plugin
as it fires ''following'' a plugin deletion attempt.
...
Further, introduce a new `delete_plugin` action hook, to be fired ''before'' a plugin deletion attempt. Both changes bring parity with other such transactional hooks in core that fire before and after certain actions, including on plugin activation/deactivation and install/uninstall, among others.
Props johnjamesjacoby.
Fixes #26904 .
Built from https://develop.svn.wordpress.org/trunk@35669
git-svn-id: http://core.svn.wordpress.org/trunk@35633 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-18 17:58:26 +00:00
Drew Jaynes
6b14ca9407
Docs: Fix two notations for the $_wp_real_parent_file
global, which is an array.
...
Props NExt-Season.
Fixes #34443 .
Built from https://develop.svn.wordpress.org/trunk@35495
git-svn-id: http://core.svn.wordpress.org/trunk@35459 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-03 20:13:26 +00:00
Scott Taylor
35dd8003b0
Admin Menu: allow more than one menu item to be added at the same priority/position.
...
Props chriscct7.
Fixes #23316 .
Built from https://develop.svn.wordpress.org/trunk@35477
git-svn-id: http://core.svn.wordpress.org/trunk@35441 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-31 20:31:24 +00:00
Sergey Biryukov
dcf2676b16
Docs: Use consistent naming and capitalization of menu names in add_submenu_page()
wrappers.
...
Props atomicjack, Mckilem.
Fixes #34360 .
Built from https://develop.svn.wordpress.org/trunk@35373
git-svn-id: http://core.svn.wordpress.org/trunk@35337 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-23 12:02:24 +00:00
Drew Jaynes
bcc7f8d079
Plugins: Introduce the delete_plugin
transactional hook, which fires immediately after a plugin deletion attempt occurs.
...
Props Veraxus for the initial patch.
Fixes #26904 .
Built from https://develop.svn.wordpress.org/trunk@35094
git-svn-id: http://core.svn.wordpress.org/trunk@35059 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-13 00:57:25 +00:00
Jeremy Felt
9926983b66
Revert [34778], continue using _site_option()
for the current network.
...
The `_network_option()` parameter order will be changing to accept `$network_id` first. The `_site_option()` functions will remain in use throughout core as our way of retrieving a network option for the current network.
See #28290 .
Built from https://develop.svn.wordpress.org/trunk@34912
git-svn-id: http://core.svn.wordpress.org/trunk@34877 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-07 17:11:25 +00:00
Drew Jaynes
0b332f6d7a
Docs: Add missing DocBlock summaries to three functions in wp-admin/includes/plugin.php.
...
See #32246 .
Built from https://develop.svn.wordpress.org/trunk@34825
git-svn-id: http://core.svn.wordpress.org/trunk@34790 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-05 02:55:24 +00:00
Drew Jaynes
6650dfea4f
Docs: Document the plugin data array returned by get_plugin_data()
with a hash-notation.
...
See #32246 .
Built from https://develop.svn.wordpress.org/trunk@34818
git-svn-id: http://core.svn.wordpress.org/trunk@34783 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-04 19:06:27 +00:00
Jeremy Felt
54512d64cb
MS: Use *_network_option()
functions throughout core.
...
Replaces all uses of `*_site_option()` with the corresponding "network" function.
This excludes one usage in `wp-admin/admin-footer.php` that needs more investigation.
Props spacedmonkey.
See #28290 .
Built from https://develop.svn.wordpress.org/trunk@34778
git-svn-id: http://core.svn.wordpress.org/trunk@34743 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-02 19:08:26 +00:00
John Blackbourn
aa35e473f7
callback
is not a valid type in PHP, PSR-5, or phpDocumentor. callable
should be used instead.
...
Fixes #34032
Built from https://develop.svn.wordpress.org/trunk@34566
git-svn-id: http://core.svn.wordpress.org/trunk@34530 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-25 23:58:25 +00:00
Dominik Schilling
d1bdd59183
Don't use <code>
in translation strings in wp-admin/includes/plugin.php
.
...
Props ramiy.
Fixes #31856 .
Built from https://develop.svn.wordpress.org/trunk@34314
git-svn-id: http://core.svn.wordpress.org/trunk@34278 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-18 20:29:26 +00:00
Scott Taylor
a1d949f361
Move plugin_sandbox_scrape()
from wp-admin/plugins.php
to wp-admin/includes/plugin.php
.
...
See #33813 .
Built from https://develop.svn.wordpress.org/trunk@34018
git-svn-id: http://core.svn.wordpress.org/trunk@33987 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-10 21:24:24 +00:00
Scott Taylor
ef87172270
foreach
is a statement, not a function.
...
See #33491 .
Built from https://develop.svn.wordpress.org/trunk@33734
git-svn-id: http://core.svn.wordpress.org/trunk@33702 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-25 20:28:22 +00:00
Scott Taylor
8b1286417e
ob_get_contents()
followed by ob_end_clean()
can be replaced by ob_get_clean()
.
...
See #32444 .
Built from https://develop.svn.wordpress.org/trunk@32965
git-svn-id: http://core.svn.wordpress.org/trunk@32936 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-27 01:12:24 +00:00
Drew Jaynes
e9758d4e48
Fix a typo in the DocBlock for get_plugins()
.
...
Props onnimonni, swissspidy.
Fixes #32758 .
Built from https://develop.svn.wordpress.org/trunk@32927
git-svn-id: http://core.svn.wordpress.org/trunk@32898 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-24 12:22:27 +00:00
Scott Taylor
00de0e6341
In unregister_setting()
, search for $option_name
in a segment of $new_whitelist_options
keyed by $option_group
.
...
Props nofearinc.
Fixes #26479 .
Built from https://develop.svn.wordpress.org/trunk@32905
git-svn-id: http://core.svn.wordpress.org/trunk@32876 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-22 20:51:26 +00:00
Scott Taylor
42d51a4f89
Add doc blocks to functions that are missing them.
...
If the function has no need for `@param` or `@return`, do an archeaological dig to find `@since`.
See #32444 .
Built from https://develop.svn.wordpress.org/trunk@32672
git-svn-id: http://core.svn.wordpress.org/trunk@32642 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-31 03:18:25 +00:00
Scott Taylor
a51dfa3971
In the style of #30947 and default-filters.php
, add 2 new files to wp-admin/includes
:
...
`admin-filters.php`
`ms-admin-filters.php`
There are random actions and filters littered among files like `misc.php`. These files contain functions that won't work outside of admin context and are typically only loaded in files that have already loaded the admin bootstrap.
See #32529 .
Built from https://develop.svn.wordpress.org/trunk@32653
git-svn-id: http://core.svn.wordpress.org/trunk@32623 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-29 17:04:26 +00:00
Scott Taylor
282e28ad81
Add @global
annotations to (the rest of the?) wp-admin/*
files.
...
Does not include list table file changes.
See #32444 .
Built from https://develop.svn.wordpress.org/trunk@32643
git-svn-id: http://core.svn.wordpress.org/trunk@32613 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-29 02:06:31 +00:00
Scott Taylor
b56b9b3e5c
Add @global
annotations for wp-admin/*
.
...
See #32444 .
Built from https://develop.svn.wordpress.org/trunk@32642
git-svn-id: http://core.svn.wordpress.org/trunk@32612 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-28 21:41:30 +00:00
Dion Hulse
2ba7f3da75
Allow plugins to activate other plugins within their Activation hook. Fixes #32368
...
Built from https://develop.svn.wordpress.org/trunk@32504
git-svn-id: http://core.svn.wordpress.org/trunk@32474 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-14 06:58:27 +00:00
Drew Jaynes
e7e93f50cf
Add a missing @return
tag to the DocBlock for `uninstall_plugin().
...
See #32246 .
Built from https://develop.svn.wordpress.org/trunk@32340
git-svn-id: http://core.svn.wordpress.org/trunk@32311 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-04 01:08:27 +00:00
Scott Taylor
0f6d0b84d1
Remove unused local vars in delete_plugins()
, delete_theme()
, WP_Date_Query->validate_date_values()
, global_terms()
, and WP_Text_Diff_Renderer_Table->_changed()
.
...
This will clear out the "Unused Code" label in the next Scrutinizer report.
See #30799 .
Built from https://develop.svn.wordpress.org/trunk@31217
git-svn-id: http://core.svn.wordpress.org/trunk@31198 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-16 21:19:22 +00:00
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