Commit Graph

268 Commits

Author SHA1 Message Date
Drew Jaynes
d48cd1cb28 Docs: Add missing documentation for the $wp_admin_bar parameter in the DocBlock for the deprecated wp_admin_bar_dashboard_view_site_menu().
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36721 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-28 18:18:28 +00:00
Drew Jaynes
268d09070e Docs: Add missing documentation for the $title parameter in the DocBlock for the deprecated parent_post_rel_link().
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36720 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-28 18:16:26 +00:00
Drew Jaynes
b64819d3a0 Docs: Remove a duplicate parameter notation in the DocBlock for the deprecated the_editor() function.
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36715 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-27 21:41:26 +00:00
Andrew Ozz
2d94e025a2 Replace wp_upload_dir() with the new wp_get_upload_dir() in all cases where a file is not being uploaded. Deprecate _wp_upload_dir_baseurl(), and replace it with wp_get_upload_dir().
See #34359.
Built from https://develop.svn.wordpress.org/trunk@36569


git-svn-id: http://core.svn.wordpress.org/trunk@36536 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-18 00:24:27 +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
John Blackbourn
d84621cc19 Docs: Correct a funky docblock in funky_javascript_fix().
See #32246

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


git-svn-id: http://core.svn.wordpress.org/trunk@36076 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-28 17:18:30 +00:00
John Blackbourn
0003a004db Docs: Miscellaneous docblock code quality tweaks.
See #32246

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


git-svn-id: http://core.svn.wordpress.org/trunk@36039 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-23 07:53:26 +00:00
Drew Jaynes
a28bfe8ba6 Docs: Add missing notations for the optional $tab_index and $extended parameters in the DocBlock for the deprecated the_editor() function.
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35998 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-20 21:21:27 +00:00
Drew Jaynes
5399b2137f Docs: Add missing parameter and return notations to the DocBlock for the deprecated get_usernumposts() function.
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35995 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-19 19:41:30 +00:00
Drew Jaynes
013d1178e5 Docs: Add missing parameter and return notations in the DocBlock for get_profile().
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35993 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-19 09:04:26 +00:00
Drew Jaynes
543420158f Docs: Properly mark the $classname parameter as optional.
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35992 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-19 09:00:26 +00:00
Drew Jaynes
eb158d65c7 Docs: Add missing parameter and return notations to the DocBlock for the deprecated wp_specialchars() function.
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35991 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-19 08:58:25 +00:00
Drew Jaynes
57878dd1b9 Docs: Add missing parameter notations and descriptions in the DocBlock for get_link().
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35990 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-19 08:54:26 +00:00
Drew Jaynes
932c91b766 Docs: Add missing parameter and return notations in the DocBlock for the deprecated _nc() function.
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35989 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-19 08:48:27 +00:00
Drew Jaynes
7b1ac33dee Docs: Add a missing summary, parameter, and return descriptiosn to the DocBlock for the deprecated function, get_linkrating().
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35988 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-19 08:23:26 +00:00
Pascal Birchler
54b8c3e53b Docs: Fix some minor DocBlock alignment issues.
See #32246.
Built from https://develop.svn.wordpress.org/trunk@35885


git-svn-id: http://core.svn.wordpress.org/trunk@35849 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-12 15:37:28 +00:00
John Blackbourn
a027edc277 Comments: The year is 2003. Permalinks are a new thing and everyone's using Blogger. It's a time when opening a modal window in JavaScript to view a section of a website is not a completely weird thing, although many users get annoyed by it. b2 has recently become WordPress, and with it comes a bunch of functionality that will become stale over the next decade, remnants of simpler times.
Twelve years later, after no fewer than three themes have intentionally implemented popup comments in their functionality, before being abandoned for at least the last six years, we've reached a time where we can put this era behind us. A time when we can remove comment popup functionality from WordPress.

If this breaks the internet, I'll eat my hat.

Fixes #28617

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


git-svn-id: http://core.svn.wordpress.org/trunk@35812 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-10 03:06:30 +00:00
Konstantin Obenland
e1901c38c1 Template: Un-deprecate wp_title().
Before it can be deprecated we should identify alternative usages and define
a path forward for them.

See [35294], #31078.


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


git-svn-id: http://core.svn.wordpress.org/trunk@35588 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-11 23:50:25 +00:00
Drew Jaynes
81524f3bfc Filesystem: Following the introduction of the KB|MB|GB|TB_IN_BYTES constants in [35286], use them in various places in core.
Props sudar.
Fixes #22405.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35291 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-21 14:03:25 +00:00
Drew Jaynes
08f3a3b226 Docs: Fix up DocBlock syntax for the now-deprecated wp_title().
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35262 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-20 17:53:24 +00:00
Konstantin Obenland
c69e96422b Themes: Improve document title output.
Introduces more flexibility in filtering all parts of the document title,the
separator, and a way to short-circuit title generation. Plugins can now also
check for theme support and reliably filter the entire output. See #18548.
Deprecates `wp_title()`.

Fixes #31078.


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


git-svn-id: http://core.svn.wordpress.org/trunk@35260 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-20 16:21:25 +00:00
Drew Jaynes
471a507dfd Docs: Add an @see reference for the "use-instead-of" function in the DocBlock for force_ssl_login(), deprecated in [34700].
See #34011. See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34670 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-29 22:46:25 +00:00
John Blackbourn
a8728b987f Deprecate force_ssl_login(), which is simply a wrapper for force_ssl_admin() and is not used in core.
Fixes #34011

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


git-svn-id: http://core.svn.wordpress.org/trunk@34664 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-29 21:28:50 +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
Scott Taylor
62ec4a3bfd Deprecate wp_get_http() - function isn't used anywhere (apart from itself).
Props swissspidy.
Fixes #33709.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33938 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-09 04:26:25 +00:00
Drew Jaynes
e9f1e69b23 Docs: Standardize @deprecated tag formatting and add missing DocBlock summaries to deprecated functions in wp-includes/deprecated.php.
Props Alphawolf for the initial patch.
Props DrewAPicture.

See #28806.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33640 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-20 22:11:26 +00:00
Scott Taylor
45fc6a3def Deprecate post_permalink() (Introduced in 1.0, already had a deprecated argument in 1.3), which just wraps get_permalink() and was only used by XML-RPC in 4 places.
Props solarissmoke.
Fixes #16982.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33626 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-20 06:24:26 +00:00
Dominik Schilling
8679a93f16 Themes: Remove legacy theme preview.
The pre-3.4 theme previewer doesn't work when using a static front page.
We kept the old theme preview for no-JS and some browsers that were less capable. But since browsers are doing a better job today we don't need to continue fixing/shipping this legacy code. Bye!

fixes #33178.
Built from https://develop.svn.wordpress.org/trunk@33492


git-svn-id: http://core.svn.wordpress.org/trunk@33459 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-29 18:36:26 +00:00
Scott Taylor
a0e373ef80 For doc block types, favor bool over the few remaining booleans
See #32444.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32935 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-27 01:03:25 +00:00
Andrew Ozz
e4758f42e5 Update the TinyMCE initialization:
- Replace `wp_htmledit_pre()` and `wp_richedit_pre()` with `format_for_editor()`.
- Replace the `'htmledit_pre'` and `'richedit_pre'` filters with `'format_for_editor'`.
- Do not run the post content through `wpautop()` in PHP when the visual editor is default. Run the textarea content through the JS wpautop on initializing TinyMCE.
- Simplify both editors initialization.
- Improve setting of `wpActiveEditor` in Quicktags.
- Improve editor.js, use `tinymce.$` when possible.
See #32425.
Built from https://develop.svn.wordpress.org/trunk@32899


git-svn-id: http://core.svn.wordpress.org/trunk@32870 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-21 22:01:28 +00:00
Dominik Schilling
64fc7294b6 Use HTTPS URLs for codex.wordpress.org.
see #27115.
Built from https://develop.svn.wordpress.org/trunk@32116


git-svn-id: http://core.svn.wordpress.org/trunk@32095 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-12 21:29:32 +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
Scott Taylor
7cb45f2402 Don't call the size function count() as part of a test condition in loops. Compute the size beforehand, and not on each iteration.
Scrutinizer added a Performance label: these are the only violations.

See #30799.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31535 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-26 05:48:24 +00:00
Scott Taylor
bc55996a0b @param cleanup:
* `get_metadata()` will return literally anything, needs to be `mixed`
* `wp()` and `WP_Query::__construct()` no longer just take a query string
* Clarify a few others

See #30799.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31193 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-16 19:03:23 +00:00
Scott Taylor
fe6b5983df In PHP 5.0.0, is_a() became deprecated in favour of the instanceof operator. Calling is_a() would result in an E_STRICT warning.
In PHP 5.3.0, `is_a()` is no longer deprecated, and will therefore no longer throw `E_STRICT` warnings.

To avoid warnings in PHP < 5.3.0, convert all `is_a()` calls to `$var instanceof WP_Class` calls.

`instanceof` does not throw any error if the variable being tested is not an object, it simply returns `false`.

Props markoheijnen, wonderboymusic.
Fixes #25672.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31169 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-16 01:06:24 +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
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
Drew Jaynes
23707b1ada Convert various uses of (optional) in core parameter descriptions to use the style prescribed in the inline documentation standards for PHP.
The style for marking parameters optional in inline PHP docs is: `@param type $var Optional. Description. Accepts. Default.`, where Accepts can be omitted on a case-by-case basis.

Props coffee2code.
Fixes #30591.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30743 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-06 21:24:45 +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
e619abda6e Improve various @param docs for src/wp-includes/*.
See #30224.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30671 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-01 01:34:24 +00:00
Drew Jaynes
de809a5a86 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:
* Remove HTML tag from parameter description in `comment_form()`
* Remove HTML tag from a summary for the `comment_form_top` hook
* Markdown-indent a code snippet in the description for `get_linkobjectsbyname()`
* Markdown-indent a code snippet and format an unordered list in the description for `get_linkobjects()`
* Backtick-escape some inline code in the description for `clean_pre()`
* Remove HTML tag from the summary for the `rss_tag_pre` hook
* Various formatting fixes in the descriptions for `get_filesystem_method()` and `request_filesystem_credentials()`

Props rarst for the initial patch.
See #30473.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30527 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-24 05:19:23 +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
Drew Jaynes
66c47f29bb Correct references of @uses $wpdb in core documentation to use @global.
See #30191, [30105].
Fixes #30217.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30122 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-31 17:56:22 +00:00
Drew Jaynes
f8657d5890 Remove redundant and erroneous @uses tag from most core inline documentation.
Per our inline documentation standards, no further use of the `@uses` tag is recommended as used and used-by relationships can be derived through other means. This removes most uses of the tag in core documentation, with remaining tags to be converted to `@global` or `@see` as they apply.

Fixes #30191.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30105 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-30 01:05:24 +00:00
Scott Taylor
82bdc78500 LIKE escape sanity:
* Deprecate `like_escape()`
* Add a method to `$wpdb`, `->esc_like()`, and add unit tests

`$wpdb::esc_like()` is not used yet. As such, many unit tests will throw `Unexpected deprecated notice for like_escape`. Subsequent commits will alleviate this.

Props miqrogroove.
See #10041.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28527 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-10 00:30:15 +00:00
John Blackbourn
df7be9cd80 Correct the deprecated function parameter in url_is_accessable_via_ssl(). See #19555.
Built from https://develop.svn.wordpress.org/trunk@28710


git-svn-id: http://core.svn.wordpress.org/trunk@28526 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-09 22:27:14 +00:00
John Blackbourn
d00b196084 Deprecate url_is_accessable_via_ssl(). Fixes #19555. Props jgadbois.
Built from https://develop.svn.wordpress.org/trunk@28709


git-svn-id: http://core.svn.wordpress.org/trunk@28525 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-09 22:03:18 +00:00
Sergey Biryukov
6d5b7ea58f Deprecate get_all_category_ids(). Suggest get_terms() as a replacement.
props winterDev, MikeHansenMe.
fixes #21200.
Built from https://develop.svn.wordpress.org/trunk@28679


git-svn-id: http://core.svn.wordpress.org/trunk@28497 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-05 16:25:14 +00:00
Scott Taylor
09046cb2a3 In get_attachment_icon_src(), $class is set in 2 conditions but never used.
See #27882.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28374 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-22 19:08:14 +00:00
Andrew Nacin
68298460d4 Clean up deprecated format_to_post() docs. see #27700.
Built from https://develop.svn.wordpress.org/trunk@28021


git-svn-id: http://core.svn.wordpress.org/trunk@27851 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-07 22:23:14 +00:00
Drew Jaynes
4f818f51a9 More formatting for functions deprecated in 3.9.
Props kpdesign.
Fixes #27700.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27850 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-07 22:17:15 +00:00
Drew Jaynes
960a45a9cb Even deprecated functions can use a little PHPDoc formatting, time to time.
See #27700.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27848 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-07 22:12:16 +00:00
Andrew Nacin
20948e27e8 Revert [27203], restore JIT color scheme stylesheets. Restores [27111].
fixes #27175. see #20729.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27358 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-12 16:12:15 +00:00
John Blackbourn
8d7f96c459 Deprecate format_to_post() and remove its filter. Fixes #25526. Props simonwheatley
Built from https://develop.svn.wordpress.org/trunk@27424


git-svn-id: http://core.svn.wordpress.org/trunk@27271 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-05 22:48:15 +00:00
Andrew Nacin
cfc20a5f64 Accept nooped plurals in wp_generate_tag_cloud() / wp_tag_cloud().
Renders topic_count_text_callback more or less obsolete. It can still be used, but passing a plural is easier.

fixes #27262. see #7989, #14424.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27225 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-03 17:29:15 +00:00
Drew Jaynes
cb8951b0b3 Remove all @package and @subpackage PHPDoc tags not at the file- or class-levels in core.
See #27200.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27119 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-25 17:14:14 +00:00
Andrew Nacin
0c47e9b732 Simplify how admin color schemes are enqueued.
Removes a piece of [27111].

fixes #20729.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27060 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-20 06:59:13 +00:00
Andrew Ozz
90403aed4b Deprecate rich_edit_exists(). It doesn't make sense to support deleting the TinyMCE directory when we have auto-updates. Fixes #26786.
Built from https://develop.svn.wordpress.org/trunk@26933


git-svn-id: http://core.svn.wordpress.org/trunk@26814 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-01-13 00:00:12 +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
Andrew Nacin
5111c26a01 Mark _search_terms_tidy() as deprecated in 3.7. see #7394.
Built from https://develop.svn.wordpress.org/trunk@25640


git-svn-id: http://core.svn.wordpress.org/trunk@25557 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-28 08:25:09 +00:00
Andrew Nacin
d7fc6d5d49 Order search results by relevance, rather than by date.
The ordering logic is as follows:
 * Full sentence matches in post titles.
 * All search terms in post titles.
 * Any search terms in post titles.
 * Full sentence matches in post content.

Each section and any remaining posts are then sorted by date.

Introduces some filters:
 * wp_search_stopwords, to filter stop words ignored in WHERE.
 * posts_search_orderby, to filter the ORDER BY when ordering search results.

props azaozz, wonderboymusic.
fixes #7394.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25549 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-27 17:34:09 +00:00
Andrew Nacin
0cf7acf4a9 Fix context for get_post() in the deprecated wp_get_single_post(). fixes #24602.
git-svn-id: http://core.svn.wordpress.org/trunk@24436 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-06-19 07:58:28 +00:00
Andrew Nacin
72d6ee62e0 Remove the body of the deprecated links_popup_script() as currently it issues a fatal error. see #24210.
git-svn-id: http://core.svn.wordpress.org/trunk@24186 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-05-07 15:35:34 +00:00
Andrew Nacin
83faec0a8f Remove an extra argument passed to get_the_content() in the deprecated the_content_rss().
props rlerdorf.
see #24210.



git-svn-id: http://core.svn.wordpress.org/trunk@24128 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-04-29 13:42:56 +00:00
Andrew Nacin
92b4636e17 Required arguments can't follow optional arguments.
Make required arguments optional in confirm_blog_signup().

Mark arguments as required in _future_post_hook(), the walker method display_element(), get_author_link() (deprecated), and the WP_Widget constructor.

props rlerdorf.
see #24210.



git-svn-id: http://core.svn.wordpress.org/trunk@24126 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-04-29 13:26:31 +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
e3148fb526 Make wp_convert_bytes_to_hr() return consistent results on 32-bit and 64-bit systems. fixes #23626.
git-svn-id: http://core.svn.wordpress.org/trunk@23551 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-01 15:59:10 +00:00
Sergey Biryukov
0cff4a5ea9 Avoid an undefined offset notice in wp_convert_bytes_to_hr(). props soulseekah. fixes #23626.
git-svn-id: http://core.svn.wordpress.org/trunk@23502 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-02-28 05:25:15 +00:00
Sergey Biryukov
7863062678 Restore the original wp_convert_bytes_to_hr() code. fixes #19067.
git-svn-id: http://core.svn.wordpress.org/trunk@23440 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-02-16 03:59:37 +00:00
Sergey Biryukov
bc2ff9d342 Deprecate wp_convert_bytes_to_hr() in favor of size_format(). props F J Kaiser. fixes #19067.
git-svn-id: http://core.svn.wordpress.org/trunk@23439 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-02-16 03:07:56 +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
Helen Hou-Sandí
b4c58e41aa Add missing @ to phpdoc for gd_edit_image_support(). props tw2113. fixes #23046.
git-svn-id: http://core.svn.wordpress.org/trunk@23197 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-12-23 16:22:22 +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
9120cf3375 WP_Image_Editor: the last stand.
* Have wp_get_image_editor() rather than WP_Image_Editor::get_instance(). Having static factory methods would be less confusing if there weren't also static methods tied to individual editor implementations.
 * Lazy-load the WP_Image_Editor base class and editor implementations.
 * Have WP_Image_Editor_GD::supports_mime_type() actually check which types it supports.
 * Deprecate gd_edit_image_support() in favor of wp_image_editor_supports().

props DH-Shredder, scribu, markoheijnen. fixes #22356. see #6821.



git-svn-id: http://core.svn.wordpress.org/trunk@22817 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-22 09:52:16 +00:00
Andrew Nacin
4a6d2bbc00 In WP_Image_Editor / wp_load_image(), use is_file() rather than file_exists() so we do not accidentally load a directory.
props benkulbertis, DH-Shredder, scribu.
fixes #17814.



git-svn-id: http://core.svn.wordpress.org/trunk@22463 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-08 02:02:03 +00:00
Andrew Nacin
30d048a1e7 Don't return encoded ampersands from get_post_comments_feed_link() to avoid canonical redirect issues. Apply esc_url() when appropriate.
props markjaquith, SergeyBiryukov. fixes #21841.



git-svn-id: http://core.svn.wordpress.org/trunk@22431 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-07 19:56:10 +00:00
Ryan Boren
b4d0be2d1a Introduce WP_Image_Editor, WP_Image_Editor_Imagick, and WP_Image_Editor_GD. Abstracts image editing API and adds support for ImageMagick.
Props DH-Shredder, kurtpayne, markoheijnen
see #6821


git-svn-id: http://core.svn.wordpress.org/trunk@22094 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-01 20:59:06 +00:00
Andrew Nacin
557d9313a7 Introduce constants to allow for easier expression of time periods in seconds. Adds MINUTE_IN_SECONDS, HOUR_IN_SECONDS, DAY_IN_SECONDS, WEEK_IN_SECONDS, YEAR_IN_SECONDS. props nbachiyski, SergeyBiryukov. fixes #20987.
git-svn-id: http://core.svn.wordpress.org/trunk@21996 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-25 05:26:19 +00:00
Andrew Nacin
5a362d3ace Call clean_post_cache() in wp_insert_post() after the manual query to change GUID. Remove the second call to clean_post_cache() previously done on the save_post hook. see #11399.
git-svn-id: http://core.svn.wordpress.org/trunk@21943 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-21 18:52:15 +00:00
Andrew Nacin
1f9ce958f7 Deprecate user_pass_ok() in favor of wp_authenticate(). see #21907.
git-svn-id: http://core.svn.wordpress.org/trunk@21911 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-19 01:35:35 +00:00
Ryan Boren
cfb35a9d85 Use get_post() instead of global $post.
Make the $post argument to get_post() optional, defaulting to the current post in The Loop.

Props nacin
see #21309


git-svn-id: http://core.svn.wordpress.org/trunk@21735 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-04 16:29:28 +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
Ryan Boren
f56d8278bb Remove return ref from all calls to get_post()
Return WP_Post from get_default_post_to_edit()
Replace all calls to get_page() with get_post()
see #21309


git-svn-id: http://core.svn.wordpress.org/trunk@21597 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-08-23 20:01:10 +00:00
Andrew Nacin
80159bda68 Restore _get_post_ancestors() in deprecated.php to prevent fatal errors. see #21309.
git-svn-id: http://core.svn.wordpress.org/trunk@21568 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-08-21 00:10:05 +00:00
nacin
70791f60b9 Deprecate sticky_class() in favor of post_class(). props solarissmoke, fixes #16675.
git-svn-id: http://core.svn.wordpress.org/trunk@21253 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-07-09 21:10:59 +00:00
nacin
f11989da24 Update the version numbers for wp_explain_nonce() deprecation. see #21076.
git-svn-id: http://core.svn.wordpress.org/trunk@21146 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-06-26 21:26:42 +00:00
nacin
066794f548 Deprecate wp_explain_nonce(). fixes #21076.
git-svn-id: http://core.svn.wordpress.org/trunk@21133 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-06-26 06:10:07 +00:00
westi
cd8c0e74ab Restore the 'extra_theme_headers' filter in the deprecated get_theme_data function so that plugins/themes using this function can still access their extra headers.
Fixes #20897 props nacin, georgestephanis, SergeyBiryukov.


git-svn-id: http://core.svn.wordpress.org/trunk@21050 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-06-11 17:30:57 +00:00
ryan
8c114f0c54 Pinking shears
git-svn-id: http://core.svn.wordpress.org/trunk@20715 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-05-03 16:41:59 +00:00
nacin
a5a40528c2 Require both wp-head-callback and admin-head-callback for custom header theme support. fixes #20603.
git-svn-id: http://core.svn.wordpress.org/trunk@20684 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-05-02 15:16:48 +00:00
nacin
7ae297b910 Undeprecate require_if_theme_supports() for themes using it for legitimate reasons. see [20610]. props scribu, jkudish. fixes #20556.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20642 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-04-30 02:02:11 +00:00
nacin
ace51e5f6d Deprecate require_if_theme_supports(). Always require post-thumbnail-template.php. fixes #20556. fixes #20409.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20610 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-04-27 04:54:36 +00:00
duck_
1e76fdfb4b Accept a post object in clean_post_cache(). Fixes #20486.
The post_type can then be accessed to properly clean the taxonomy relationships cache.
The full object is useful in situations when an ID might reference a post that has been
removed from the database (e.g. wp_delete_post()).


git-svn-id: http://svn.automattic.com/wordpress/trunk@20569 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-04-23 22:04:35 +00:00
ryan
baf681233f Pass post_type to clean_post_cache() instead of attempting to fetch a post object since the post may have been deleted.
Props leewillis77
see #19690


git-svn-id: http://svn.automattic.com/wordpress/trunk@20423 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-04-10 16:09:44 +00:00
markjaquith
29f50a637a Replace <br/> and <br> in addition to <br /> in clean_pre(). fixes #20400
git-svn-id: http://svn.automattic.com/wordpress/trunk@20409 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-04-09 20:05:47 +00:00
azaozz
b358b4accc Do not process <pre> tags with wpautop, replace them with placeholders, process the rest of the content and then put them back. Part props kurtpayne, see #19855
git-svn-id: http://svn.automattic.com/wordpress/trunk@20307 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-28 15:43:31 +00:00
duck_
89c3b58589 Fix typo: remove extraneous "@". See r20269.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20281 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-24 13:37:16 +00:00
nacin
2c016a5a1c Deprecate get_theme_data(). Use wp_get_theme() instead. see #20103.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20269 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-23 10:21:24 +00:00
ryan
b2d6004f17 s/background/header/ in add_custom_image_header() deprecated function. see #20249
git-svn-id: http://svn.automattic.com/wordpress/trunk@20265 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-22 19:31:03 +00:00