Commit Graph

140 Commits

Author SHA1 Message Date
Andrew Nacin 774a12be83 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: https://develop.svn.wordpress.org/trunk@21996 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-25 05:26:19 +00:00
Andrew Nacin 2e6cb465b2 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: https://develop.svn.wordpress.org/trunk@21943 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-21 18:52:15 +00:00
Andrew Nacin 44cd6b7e85 Deprecate user_pass_ok() in favor of wp_authenticate(). see #21907.
git-svn-id: https://develop.svn.wordpress.org/trunk@21911 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-19 01:35:35 +00:00
Ryan Boren 31ec698423 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: https://develop.svn.wordpress.org/trunk@21735 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-04 16:29:28 +00:00
Ryan Boren 01527025c9 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: https://develop.svn.wordpress.org/trunk@21651 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-28 19:08:28 +00:00
Ryan Boren de06b81360 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: https://develop.svn.wordpress.org/trunk@21597 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-23 20:01:10 +00:00
Andrew Nacin 4a10a8eac2 Restore _get_post_ancestors() in deprecated.php to prevent fatal errors. see #21309.
git-svn-id: https://develop.svn.wordpress.org/trunk@21568 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-21 00:10:05 +00:00
Andrew Nacin e256a654ba Deprecate sticky_class() in favor of post_class(). props solarissmoke, fixes #16675.
git-svn-id: https://develop.svn.wordpress.org/trunk@21253 602fd350-edb4-49c9-b593-d223f7449a82
2012-07-09 21:10:59 +00:00
Andrew Nacin a2c8ec790d Update the version numbers for wp_explain_nonce() deprecation. see #21076.
git-svn-id: https://develop.svn.wordpress.org/trunk@21146 602fd350-edb4-49c9-b593-d223f7449a82
2012-06-26 21:26:42 +00:00
Andrew Nacin 5b9214124c Deprecate wp_explain_nonce(). fixes #21076.
git-svn-id: https://develop.svn.wordpress.org/trunk@21133 602fd350-edb4-49c9-b593-d223f7449a82
2012-06-26 06:10:07 +00:00
Peter Westwood 0ec0c40c0a 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: https://develop.svn.wordpress.org/trunk@21050 602fd350-edb4-49c9-b593-d223f7449a82
2012-06-11 17:30:57 +00:00
Ryan Boren 8c50f982ea Pinking shears
git-svn-id: https://develop.svn.wordpress.org/trunk@20715 602fd350-edb4-49c9-b593-d223f7449a82
2012-05-03 16:41:59 +00:00
Andrew Nacin bf5decbacf Require both wp-head-callback and admin-head-callback for custom header theme support. fixes #20603.
git-svn-id: https://develop.svn.wordpress.org/trunk@20684 602fd350-edb4-49c9-b593-d223f7449a82
2012-05-02 15:16:48 +00:00
Andrew Nacin e55d1f54e2 Undeprecate require_if_theme_supports() for themes using it for legitimate reasons. see [20610]. props scribu, jkudish. fixes #20556.
git-svn-id: https://develop.svn.wordpress.org/trunk@20642 602fd350-edb4-49c9-b593-d223f7449a82
2012-04-30 02:02:11 +00:00
Andrew Nacin 98f553c3b2 Deprecate require_if_theme_supports(). Always require post-thumbnail-template.php. fixes #20556. fixes #20409.
git-svn-id: https://develop.svn.wordpress.org/trunk@20610 602fd350-edb4-49c9-b593-d223f7449a82
2012-04-27 04:54:36 +00:00
Jon Cave 83a3cc73df 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: https://develop.svn.wordpress.org/trunk@20569 602fd350-edb4-49c9-b593-d223f7449a82
2012-04-23 22:04:35 +00:00
Ryan Boren 27592057cd 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: https://develop.svn.wordpress.org/trunk@20423 602fd350-edb4-49c9-b593-d223f7449a82
2012-04-10 16:09:44 +00:00
Mark Jaquith 5d73d82fc2 Replace <br/> and <br> in addition to <br /> in clean_pre(). fixes #20400
git-svn-id: https://develop.svn.wordpress.org/trunk@20409 602fd350-edb4-49c9-b593-d223f7449a82
2012-04-09 20:05:47 +00:00
Andrew Ozz f9c3a352a0 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: https://develop.svn.wordpress.org/trunk@20307 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-28 15:43:31 +00:00
Jon Cave 4507ff0b4a Fix typo: remove extraneous "@". See r20269.
git-svn-id: https://develop.svn.wordpress.org/trunk@20281 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-24 13:37:16 +00:00
Andrew Nacin f9d787fae1 Deprecate get_theme_data(). Use wp_get_theme() instead. see #20103.
git-svn-id: https://develop.svn.wordpress.org/trunk@20269 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-23 10:21:24 +00:00
Ryan Boren 570cf18255 s/background/header/ in add_custom_image_header() deprecated function. see #20249
git-svn-id: https://develop.svn.wordpress.org/trunk@20265 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-22 19:31:03 +00:00
Andrew Nacin c885e3530a Only pass arguments from the deprecated add_custom_background() or add_custom_image_header() to add_theme_support() if the argument was actually supplied. With [20212], default argument values (like wp-head-callback=_custom_background_cb) only work for arguments that were not explicitly set, so don't set empty values. see #20249.
git-svn-id: https://develop.svn.wordpress.org/trunk@20246 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-21 22:21:22 +00:00
Andrew Nacin 67f21026b9 Callbacks for custom headers and custom backgrounds registered through add_theme_support() are now wp-head-callback, admin-head-callback, and admin-preview-callback. see #19910.
git-svn-id: https://develop.svn.wordpress.org/trunk@20231 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-21 03:36:17 +00:00
Andrew Nacin 388dacf0e2 Don't suggest only add_theme_support('custom-background') -- suggest it with $args even if it wasn't called with any arguments. In particular, default-color should be used by themes as a good user experience improvement. see #20249.
git-svn-id: https://develop.svn.wordpress.org/trunk@20220 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-20 19:06:43 +00:00
Andrew Nacin 4642f9d093 Deprecate add_custom_image_header(), remove_custom_image_header(), add_custom_background(), remove_custom_background(). Replacements are add_theme_support() and remove_theme_support(). see #20249.
git-svn-id: https://develop.svn.wordpress.org/trunk@20218 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-19 21:14:41 +00:00
Andrew Nacin e71167bbee 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: https://develop.svn.wordpress.org/trunk@20193 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-15 15:39:21 +00:00
Andrew Nacin f4b7756402 Can haz recursion? get_current_theme() is deprecated in favor of wp_get_theme(), not itself. props duck_. see #20138.
git-svn-id: https://develop.svn.wordpress.org/trunk@20042 602fd350-edb4-49c9-b593-d223f7449a82
2012-02-29 20:22:16 +00:00
Andrew Nacin 6a4a8df204 Deprecate get_current_theme(). Use (string) wp_get_theme() to get the translated name of the theme. Keep the current_theme option for now. see #20103, see #20138.
git-svn-id: https://develop.svn.wordpress.org/trunk@20040 602fd350-edb4-49c9-b593-d223f7449a82
2012-02-29 20:07:22 +00:00
Andrew Nacin 53a209a4ee Introduce WP_Theme, wp_get_themes(), and wp_get_theme() to replace get_themes(), get_theme(), get_theme_data(), current_theme_info(), and others.
* Getters and Helpers: Introduces a series of methods to allow for easy generation of headers for display, and other theme metadata, including page templates.
 * Screenshots: Handles support for multiple screenshots. (see # Additional screenshots must be PNG and start with screenshot-2.png, and be sequential to be counted. see #19816.
 * Error Handling: Broken themes have a WP_Error object attached to them.
 * Caching: Introduces a wp_cache_themes_persistently filter (also in [20020]) to enable persistent caching of all filesystem and sanitization operations normally handled by WP_Theme (and formerly get_file_data() and get_themes()). Themes are cached individually and across five different cache keys for different data pieces.
 * Compatibility: A WP_Theme object is backwards compatible with a theme's array formerly returned by get_themes() and get_theme(), and an stdClass object formerly returned by current_theme_info().
 * i18n/L10n: Theme headers are now localizable with proper Text Domain and Domain Path headers, like plugins. (Language packs may remove the requirement for headers.) For page templates, see #6007 (not fixed yet, but will be easy now). For headers, fixes #15858.
 * PHP and CSS files: New methods that fetch a list of theme files (for the theme editor) only on demand, rather than only loading them into memory. fixes #11214.

Functions deprecated:
 * get_themes(), get_allowed_themes() and get_broken_themes() -- use wp_get_themes()
 * get_theme() and current_theme_info() -- use wp_get_theme()
 * get_site_allowed_themes() -- use WP_Theme::get_allowed_on_network()
 * wpmu_get_blog_allowedthemes() -- use WP_theme::get_allowed_on_site()

see also [20016], [20018], [20019], [20020], [20021], [20022], [20025], [20026], [20027]. also fixes #19244.

see #20103.



git-svn-id: https://develop.svn.wordpress.org/trunk@20029 602fd350-edb4-49c9-b593-d223f7449a82
2012-02-28 21:24:44 +00:00
Ryan Boren 89e9bcc1d6 Pinking shears 6-20000
git-svn-id: https://develop.svn.wordpress.org/trunk@20000 602fd350-edb4-49c9-b593-d223f7449a82
2012-02-27 19:46:52 +00:00
Andrew Nacin ee01523b96 Deprecate ancient "debugging" tools.
* logIO() and the global $xmlrpc_logging in XML-RPC.
 * log_app() and the global $app_logging in APP.
 * debug_fwrite(), debug_fopen(), debug_fclose(), and $debug.
see #20051.



git-svn-id: https://develop.svn.wordpress.org/trunk@19935 602fd350-edb4-49c9-b593-d223f7449a82
2012-02-17 00:02:42 +00:00
Ryan Boren 5e76729992 One newline is enough.
git-svn-id: https://develop.svn.wordpress.org/trunk@19684 602fd350-edb4-49c9-b593-d223f7449a82
2012-01-05 20:10:39 +00:00
Andrew Nacin fc9bd67e14 Move WP_Editor to a _WP_Editors encapsulation.
* WP_Editor will return in 3.4 as a one true API for editor instances. Stick to wp_editor() for now.
 * TinyMCE can now be forced on with tinymce = true. It defaults to the value for user_can_richedit().
 * Restores wp_default_editor(), wp_link_query(), wp_link_dialog(), wp_fullscreen_html().
fixes #19320.


git-svn-id: https://develop.svn.wordpress.org/trunk@19420 602fd350-edb4-49c9-b593-d223f7449a82
2011-11-23 19:06:52 +00:00
Ryan Boren 2c83b5728f Turn is_blog_user() into a wrapper around is_user_member_of_blog() and deprecate. Make user_id optional for is_user_member_of_blog(). Props SergeyBiryukov. fixes #16702
git-svn-id: https://develop.svn.wordpress.org/trunk@19016 602fd350-edb4-49c9-b593-d223f7449a82
2011-10-19 22:35:15 +00:00
Mark Jaquith a08a12b46a Always pass the post ID as the second argument to the the_title filter. props GaryJ. fixes #16688
git-svn-id: https://develop.svn.wordpress.org/trunk@18907 602fd350-edb4-49c9-b593-d223f7449a82
2011-10-06 21:09:37 +00:00
Ryan Boren 4e081d3171 phpdoc typo and readability fixes. Props SergeyBiryukov. fixes #18560
git-svn-id: https://develop.svn.wordpress.org/trunk@18827 602fd350-edb4-49c9-b593-d223f7449a82
2011-09-29 22:57:43 +00:00
Daryl Koopersmith e1038932b9 Admin bar UX improvements. First pass, see #18197
git-svn-id: https://develop.svn.wordpress.org/trunk@18683 602fd350-edb4-49c9-b593-d223f7449a82
2011-09-16 05:01:54 +00:00
Andrew Nacin b4b2a1847b Remove support for <link rel=start>, end, up, and index. These rel="" values have been dropped by the HTML Working Group. props Elpie, kawauso, fixes #18128.
git-svn-id: https://develop.svn.wordpress.org/trunk@18680 602fd350-edb4-49c9-b593-d223f7449a82
2011-09-15 16:54:59 +00:00
Jon Cave 205aa5ba5c Fix typos in documentation (wp-includes/[a-h]). See #18560.
git-svn-id: https://develop.svn.wordpress.org/trunk@18633 602fd350-edb4-49c9-b593-d223f7449a82
2011-09-03 16:02:41 +00:00
Ryan Boren 1d3e616495 Introduce metadata_exists(), WP_User::get_data_by(), WP_User::get(), WP_User::has_prop(). Don't fill user objects with meta. Eliminate data duplication in cache and memory. Props scribu. see #15458
git-svn-id: https://develop.svn.wordpress.org/trunk@18597 602fd350-edb4-49c9-b593-d223f7449a82
2011-08-24 19:32:59 +00:00
Andrew Ozz 461ceba60d Editor API enhancement, first run (still needs some work), see #17144
git-svn-id: https://develop.svn.wordpress.org/trunk@18498 602fd350-edb4-49c9-b593-d223f7449a82
2011-08-03 10:19:00 +00:00
Andrew Ozz c641a1d27a Bring back wp_localize_script(), see #11520
git-svn-id: https://develop.svn.wordpress.org/trunk@18490 602fd350-edb4-49c9-b593-d223f7449a82
2011-07-31 09:11:24 +00:00
Andrew Ozz 06f33f29ba Use json_encode() for adding script data (formerly l10n). Add the same functionality to WP_Styles for adding inline css after a stylesheet has been outputted. See #11520
git-svn-id: https://develop.svn.wordpress.org/trunk@18464 602fd350-edb4-49c9-b593-d223f7449a82
2011-07-25 00:36:06 +00:00
Ryan Boren 46d96c7704 Bring out the pinking shears.
git-svn-id: https://develop.svn.wordpress.org/trunk@18254 602fd350-edb4-49c9-b593-d223f7449a82
2011-06-10 23:01:45 +00:00
Ryan Boren d48d7451c6 Move wp_clone() back to load.php. Props technosailor. fixes #17206
git-svn-id: https://develop.svn.wordpress.org/trunk@17681 602fd350-edb4-49c9-b593-d223f7449a82
2011-04-22 17:46:02 +00:00
Ryan Boren 95d1619373 Remove PHP4 timezone support. Props hakre. fixes #16970
git-svn-id: https://develop.svn.wordpress.org/trunk@17637 602fd350-edb4-49c9-b593-d223f7449a82
2011-04-13 17:30:02 +00:00
Ryan Boren 259c415b7b Deprecate wp_clone(). Call clone directly. Props hakre. fixes #16813
git-svn-id: https://develop.svn.wordpress.org/trunk@17613 602fd350-edb4-49c9-b593-d223f7449a82
2011-04-06 17:44:29 +00:00
Andrew Nacin 04f55d16ff Reference proper function equivalents in deprecated.php. props pross, fixes #15253.
git-svn-id: https://develop.svn.wordpress.org/trunk@17541 602fd350-edb4-49c9-b593-d223f7449a82
2011-03-23 18:44:07 +00:00
Ryan Boren 76e77b1790 Revert get_users_of_blog() to 3.0 behavior and deprecate. Use get_users() in core. Props scribu. fixes #15854
git-svn-id: https://develop.svn.wordpress.org/trunk@17084 602fd350-edb4-49c9-b593-d223f7449a82
2010-12-20 16:25:35 +00:00