Commit Graph

90 Commits

Author SHA1 Message Date
Andrew Ozz
82ee5ca020 Editor: ensure the page is refreshed when the users navigate to it with the Back or Forward buttons. In these cases the browsers usually load the page from (memory) cache and it contains the old editor content.
Fixes #35852.
Built from https://develop.svn.wordpress.org/trunk@37619


git-svn-id: http://core.svn.wordpress.org/trunk@37587 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-02 01:30:27 +00:00
Sergey Biryukov
21bdbc204e Docs: Fix typo in wp_update_theme() description.
Props yoavf.
See #36349.
Built from https://develop.svn.wordpress.org/trunk@37193


git-svn-id: http://core.svn.wordpress.org/trunk@37159 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-13 07:27:28 +00:00
Eric Lewis
22467e840f Networks and sites: Replace "blog" usage with "site" in docs.
Multisite functions use the term "blog" to refer to what we now call a "site," e.g. `get_current_blog_id()`. These functions are here to stay because of our commitment to backwards compatibility. What we can do is set the documentation straight.

See #35417.

Built from https://develop.svn.wordpress.org/trunk@36416


git-svn-id: http://core.svn.wordpress.org/trunk@36383 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-28 03:35:27 +00:00
Drew Jaynes
0a314eed32 Docs: Add missing @since and properly mark the optional $type parameter as such in the DocBlock for the deprecated get_others_unpublished_posts() function.
Introduced in [5707].

See #32246.

Built from https://develop.svn.wordpress.org/trunk@36071


git-svn-id: http://core.svn.wordpress.org/trunk@36036 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-23 06:58:25 +00:00
Drew Jaynes
ad64c0f2d7 Docs: Properly mark the $exclude_zeros parameter in the DocBlock for get_editable_user_ids() as optional.
Also fixes a couple of typos.

See #32246.

Built from https://develop.svn.wordpress.org/trunk@36070


git-svn-id: http://core.svn.wordpress.org/trunk@36035 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-23 06:53:26 +00:00
Pascal Birchler
1294c2bc3a Admin Menu: Deprecate add_object_page() and add_utility_page().
These functions are not used in core and are just wrappers for `add_menu_page()`.

Fixes #23108.
Built from https://develop.svn.wordpress.org/trunk@35874


git-svn-id: http://core.svn.wordpress.org/trunk@35838 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-11 22:12:26 +00:00
Drew Jaynes
3866a8cf58 Docs: Add missing method summaries for the deprecated WP_User_Search class, including prepare_query(), query(), prepare_vars_for_template_usage(), do_paging(), and get_results().
See #32246.

Built from https://develop.svn.wordpress.org/trunk@34822


git-svn-id: http://core.svn.wordpress.org/trunk@34787 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-05 02:35:25 +00:00
Drew Jaynes
1f1c2335ad Docs: Add missing summaries for three deprecated admin functions: dropdown_categories(), dropdown_link_categories(), and wp_dropdown_cats().
See #32246.

Built from https://develop.svn.wordpress.org/trunk@34821


git-svn-id: http://core.svn.wordpress.org/trunk@34786 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-05 02:29:26 +00:00
Scott Taylor
84da11d918 Pass false as the 2nd argument to class_exists() to disable autoloading and to not cause problems for those who define __autoload().
Fixes #20523.

Built from https://develop.svn.wordpress.org/trunk@34348


git-svn-id: http://core.svn.wordpress.org/trunk@34312 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-20 03:52:25 +00:00
Drew Jaynes
bac6e69b3c Docs: Standardize @deprecated tag formatting and add missing DocBlocks to deprecated functions in wp-admin/includes/deprecated.php.
Opted not to use the multi-function DocBlock syntax in the name of not taking shortcuts in documentation for the sake of brevity.

Props Alphawolf for the initial patch.
See #28806

Built from https://develop.svn.wordpress.org/trunk@33671


git-svn-id: http://core.svn.wordpress.org/trunk@33638 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-20 21:23:25 +00:00
Aaron Jorbin
1525010f74 Deprecate php4 style constructors
PHP7 is deprecating PHP4 style constructors, so we need to modify our code to have _construct methods that fire before the named PHP4 style constructors.  The PHP4 style constructors will call the PHP5 style constructor in case it is being called directly (usually via parent::METHOD).

This modifies external libraries to add PHP5 style constructors, but doesn't add a notice for when they are used.  In WordPress core code, PHP4 style constructors are being given a call to _deprecated_constructor. To the PHP4 style constructor I say "I know that I can't take no more | It ain't no lie | I wanna see you out that door | Baby, bye, bye, bye..."

Upstream: https://wiki.php.net/rfc/remove_php4_constructors

Props jdgrimes, netweb, jorbin
See #31982


Built from https://develop.svn.wordpress.org/trunk@32990


git-svn-id: http://core.svn.wordpress.org/trunk@32961 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-28 15:27:24 +00:00
Scott Taylor
5c6b63d3a6 if is a statment, not a function.
See #32444.

Built from https://develop.svn.wordpress.org/trunk@32800


git-svn-id: http://core.svn.wordpress.org/trunk@32771 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-16 20:01:25 +00:00
Scott Taylor
19a3aacc94 Add @static* annotations where they are missing.
Initialize all static vars that are not, most to `null`.

See #32444.

Built from https://develop.svn.wordpress.org/trunk@32650


git-svn-id: http://core.svn.wordpress.org/trunk@32620 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-29 15:43:29 +00:00
Dominik Schilling
50c2cee32d Merge three similar strings.
props pavelevap.
see #31013.
Built from https://develop.svn.wordpress.org/trunk@31717


git-svn-id: http://core.svn.wordpress.org/trunk@31698 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-11 15:25:28 +00:00
Scott Taylor
dccf5ceb90 Empty return statements are unnecessary at the end of functions.
See #30799.

Built from https://develop.svn.wordpress.org/trunk@31679


git-svn-id: http://core.svn.wordpress.org/trunk@31660 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-08 23:09:27 +00:00
Drew Jaynes
ad297dab6d Correctly capitalize JavaScript throughout core docs.
Fixes #30569.

Built from https://develop.svn.wordpress.org/trunk@30695


git-svn-id: http://core.svn.wordpress.org/trunk@30685 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-02 00:31:22 +00:00
Scott Taylor
7d7a8aa0eb Correct all @return unknown instances.
See #30224.

Built from https://develop.svn.wordpress.org/trunk@30202


git-svn-id: http://core.svn.wordpress.org/trunk@30202 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-03 06:17:22 +00:00
Scott Taylor
bd2521d5ee Fill in the @param types for the args for functions missing them in wp-admin/includes/deprecated.php (pour one out).
See #30224.

Built from https://develop.svn.wordpress.org/trunk@30201


git-svn-id: http://core.svn.wordpress.org/trunk@30201 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-03 06:08:22 +00:00
Sergey Biryukov
45d5e5d32f Use correct function name.
props ericlewis.
fixes #28329.
Built from https://develop.svn.wordpress.org/trunk@28535


git-svn-id: http://core.svn.wordpress.org/trunk@28361 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-22 07:59:16 +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
Andrew Nacin
bf028ce1e3 Remove _relocate_children(), which has had no purpose for some time.
props SergeyBiryukov, scribu.
fixes #19367.

Built from https://develop.svn.wordpress.org/trunk@27261


git-svn-id: http://core.svn.wordpress.org/trunk@27118 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-25 17:10:14 +00:00
Andrew Nacin
1788d5840f Dashboard backwards compatibility updates.
* Restore missing wp_dashboard_rss_control() helper.
 * Restore all original 3.7 functions, deprecating many, reusing others. 
 * Rename and remove functions so as not to clash with the original dash plugin.
 * Filter cleanup/restoration.

see #25824, #26334.

Built from https://develop.svn.wordpress.org/trunk@26690


git-svn-id: http://core.svn.wordpress.org/trunk@26580 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-05 21:23:10 +00:00
Andrew Nacin
3fe7726bd4 Remove @uses from get_screen_icon() / screen_icon(). see #26119.
Built from https://develop.svn.wordpress.org/trunk@26541


git-svn-id: http://core.svn.wordpress.org/trunk@26433 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-02 21:59:10 +00:00
Andrew Nacin
4728680f8f Only informally deprecate get_screen_icon() and screen_icon(). fixes #26119.
Built from https://develop.svn.wordpress.org/trunk@26537


git-svn-id: http://core.svn.wordpress.org/trunk@26429 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-02 20:00:11 +00:00
Andrew Ozz
8d6059b383 Remove all screen_icon() calls and deprecate the functions, props TobiasBg, fixes #26119
Built from https://develop.svn.wordpress.org/trunk@26518


git-svn-id: http://core.svn.wordpress.org/trunk@26411 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-02 03:53:11 +00:00
Andrew Nacin
2cc8ed1594 Dash cleanup.
* Use wp_add_dashboard_widget() rather than add_meta_box().
 * Use original functions like wp_dashboard_primary(), wp_dashboard_right_now(), wp_dashboard_quick_press() (where possible).
 * Only include plugins section of the news widget when appropriate, which necessitates the set_current_screen() via the ajax action.
 * Remove some debug cruft that was preventing caching and invalidation.
 * Simplify lots of things where possible.
see #25824.

Built from https://develop.svn.wordpress.org/trunk@26220


git-svn-id: http://core.svn.wordpress.org/trunk@26128 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-15 20:15:10 +00:00
Andrew Nacin
809b335f7a Merge the new dashboard design into core.
Merges https://github.com/growthdesigner/wp-dash.

props lessbloat, joen, helen, dbernar1, kraftbj, ryelle, tillkruess, grapplerulrich, markjaquith.
see #25824.

Built from https://develop.svn.wordpress.org/trunk@26144


git-svn-id: http://core.svn.wordpress.org/trunk@26055 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-13 22:09:10 +00:00
Andrew Nacin
d0cfa40983 Add jshintrc to qunit.
props jorbin.
see #25187.

Built from https://develop.svn.wordpress.org/trunk@25992


git-svn-id: http://core.svn.wordpress.org/trunk@25925 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-30 14:39:10 +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
14db24911f Deprecate the_attachment_links(), unused since [6910]. props vinod dalvi. fixes #25340.
Built from https://develop.svn.wordpress.org/trunk@25472


git-svn-id: http://core.svn.wordpress.org/trunk@25393 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-17 09:08:08 +00:00
Dion Hulse
2caf5fe381 Upgrader: Deprecate a few mostly unused functions, wp_update_plugin(), wp_update_theme(), and, wp_update_core().
wp_update_core() was still used, as it was never updated to make use of the newer Skins. Fixes #21874

Built from https://develop.svn.wordpress.org/trunk@25307


git-svn-id: http://core.svn.wordpress.org/trunk@25269 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-09 06:45:08 +00:00
Sergey Biryukov
eccd3e42df Deprecate wp_nav_menu_locations_meta_box(), unused since [23441]. props DrewAPicture. fixes #24942.
Built from https://develop.svn.wordpress.org/trunk@25209


git-svn-id: http://core.svn.wordpress.org/trunk@25181 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-02 11:26:09 +00:00
Sergey Biryukov
0d0c87041c Move get_real_file_to_edit() upper in the file for consistency with the existing order of functions. Some phpdoc fixes and additions. see #23680.
Built from https://develop.svn.wordpress.org/trunk@25208


git-svn-id: http://core.svn.wordpress.org/trunk@25180 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-02 11:19:10 +00:00
Sergey Biryukov
00c9232a19 Move get_real_file_to_edit() to wp-admin/includes/deprecated.php. props iamfriendly. fixes #23680.
Built from https://develop.svn.wordpress.org/trunk@25201


git-svn-id: http://core.svn.wordpress.org/trunk@25173 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-01 12:37:12 +00:00
Andrew Nacin
76c03073d9 Remove an unslash in the deprecated WP_User_Search, as search_term is already unslashed in the constructor. see #21767.
git-svn-id: http://core.svn.wordpress.org/trunk@23577 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-01 17:57:49 +00:00
Ryan Boren
5f809d1d22 Use wp_unslash() instead of stripslashes() and stripslashes_deep(). Use wp_slash() instead of add_magic_quotes().
see #21767


git-svn-id: http://core.svn.wordpress.org/trunk@23563 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-01 17:00:25 +00:00
Ryan Boren
43a7e695e9 Revert 23416, 23419, 23445 except for wp_reset_vars() changes. We are going a different direction with the slashing cleanup, so resetting to a clean slate. see #21767
git-svn-id: http://core.svn.wordpress.org/trunk@23554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-01 16:28:40 +00:00
Sergey Biryukov
6bcd1665eb Add missing inline descriptions. see #19067.
git-svn-id: http://core.svn.wordpress.org/trunk@23437 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-02-16 02:52:57 +00:00
Ryan Boren
cc5ed3a485 Change all core API to expect unslashed rather than slashed arguments.
The exceptions to this are update_post_meta() and add_post_meta() which are often used by plugins in POST handlers and will continue accepting slashed data for now.

Introduce wp_upate_post_meta() and wp_add_post_meta() as unslashed alternatives to update_post_meta() and add_post_meta(). These functions could become methods in WP_Post so don't use them too heavily yet.

Remove all escape() calls from wp_xmlrpc_server. Now that core expects unslashed data this is no longer needed.

Remove addslashes(), addslashes_gpc(), add_magic_quotes() calls on data being prepared for handoff to core functions that until now expected slashed data. Adding slashes in no longer necessary.

Introduce wp_unslash() and use to it remove slashes from GPCS data before using it in core API. Almost every instance of stripslashes() in core should now be wp_unslash(). In the future (a release or three) when GPCS is no longer slashed, wp_unslash() will stop stripping slashes and simply return what is passed. At this point wp_unslash() calls can be removed from core.

Introduce wp_slash() for slashing GPCS data. This will also turn into a noop once GPCS is no longer slashed. wp_slash() should almost never be used. It is mainly of use in unit tests.

Plugins should use wp_unslash() on data being passed to core API.

Plugins should no longer slash data being passed to core. So when you get_post() and then wp_insert_post() the post data from get_post() no longer needs addslashes(). Most plugins were not bothering with this. They will magically start doing the right thing. Unfortunately, those few souls who did it properly will now have to avoid calling addslashes() for 3.6 and newer.

Use wp_kses_post() and wp_kses_data(), which expect unslashed data, instead of wp_filter_post_kses() and wp_filter_kses(), which expect slashed data. Filters are no longer passed slashed data.

Remove many no longer necessary calls to $wpdb->escape() and esc_sql().

In wp_get_referer() and wp_get_original_referer(), return unslashed data.

Remove old stripslashes() calls from WP_Widget::update() handlers. These haven't been necessary since WP_Widget.

Switch several queries over to prepare().

Expect something to break.

Props alexkingorg
see #21767


git-svn-id: http://core.svn.wordpress.org/trunk@23416 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-02-14 22:51:06 +00:00
Andrew Nacin
70ad7496a6 Deprecate wp_create_thumbnail(). props obenland. fixes #21555.
git-svn-id: http://core.svn.wordpress.org/trunk@21956 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-23 17:48:24 +00:00
Andrew Nacin
285660c2a1 Correct return values for two deprecated media admin functions. props SergeyBiryukov. fixes #21518.
git-svn-id: http://core.svn.wordpress.org/trunk@21835 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-13 17:09:41 +00:00
Andrew Nacin
670105e1fb Remove 'hwstring_small' from attachment metadata and deprecate get_udims(). props SergeyBiryukov. fixes #21518.
git-svn-id: http://core.svn.wordpress.org/trunk@21808 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-11 01:38:26 +00:00
Ryan Boren
d8013dfc0a Deprecate get_default_post_to_edit(). Props SergeyBiryukov. fixes #21677
git-svn-id: http://core.svn.wordpress.org/trunk@21800 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-10 20:39:45 +00:00
Ryan Boren
52b3f498e6 Add tags_input, page_template, and post_category get magic to WP_Post.
Deprecate get_post_to_edit() and wp_get_single_post().
Props scribu
see #21309


git-svn-id: http://core.svn.wordpress.org/trunk@21651 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-08-28 19:08:28 +00:00
nacin
7127ed1197 Move most instances of new WP_User to get_userdata(). see #21120.
git-svn-id: http://core.svn.wordpress.org/trunk@21413 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-08-03 01:06:05 +00:00
ryan
44ef6d8e80 Deprecate and stub _media_button. fixes #21317
git-svn-id: http://core.svn.wordpress.org/trunk@21353 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-07-26 21:33:01 +00:00
ryan
1c175f829e Deprecate and stub _insert_into_post_button(). fixes #20427
git-svn-id: http://core.svn.wordpress.org/trunk@21352 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-07-26 21:30:06 +00:00
nacin
962fae26f4 Updates to WP_Theme, wp_get_themes(), and related deprecated functions, after [UT570] [UT578] [UT579]. see #20103.
* ['Template Files'] and ['Stylesheet Files'] need to return files from the parent theme as well.
 * Don't strip links from the Author header. Some themes rely on the previous behavior, such as to link multiple authors (Sandbox, for example.) Don't restore links to the Name, that's just a bad idea.
 * Ensure we are always passing around arrays in get_files/scandir.
 * Better inline doc for wp_get_themes() arguments.
 * Introduce a 'force' flag for search_theme_directories() to re-scan, rather than return the cache. We will use this to re-build the theme_roots transient in get_theme_roots(), but it is more helpful for unit tests. Since search_theme_directories() is cached, don't cache again in wp_get_themes(). (Again benefits testing.)
 * Handle duplicate theme names in the old get_themes() when two themes match (and neither are a default theme, which is already handled). wp_get_themes() will consider both names to be the same; this is just for back compat since get_themes() is keyed by name.
 * Include an old array key in wp_broken_themes().



git-svn-id: http://svn.automattic.com/wordpress/trunk@20193 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-15 15:39:21 +00:00