Commit Graph

11457 Commits

Author SHA1 Message Date
Andrew Nacin 34a00ae277 Move admin bar initialization from init to template_redirect, so conditional tags may be used in the show_admin_bar filter. props scribu. fixes #20101.
git-svn-id: https://develop.svn.wordpress.org/trunk@23512 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-28 16:56:35 +00:00
Andrew Nacin 5114e85747 In insert_blog(), make sure we retrieve the insertion ID from wpdb before calling a function that could invoke queries. props feedmeastraycat. fixes #23400.
git-svn-id: https://develop.svn.wordpress.org/trunk@23511 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-28 16:53:48 +00:00
Andrew Nacin 11ab449a89 Ensure we strictly compare 'alloptions' and 'notoptions' when protecting these special options.
Trim and check for emptiness of $option in delete_option(), as done for get, update, and add.

fixes #23289.



git-svn-id: https://develop.svn.wordpress.org/trunk@23510 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-28 16:49:20 +00:00
Helen Hou-Sandi 7f7f9a805c Merge revisions.css into wp-admin.css. Move misplaced block of revisions CSS in wp-admin.css into appropriate section. Some standards clean up and selector merging. see #23497.
git-svn-id: https://develop.svn.wordpress.org/trunk@23507 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-28 15:40:44 +00:00
Peter Westwood 554627a0d5 Revisions: First pass an implementing a new UI/UX for reviewing the revisions of posts. See #23497 props adamsilverstein for the initial patch.
This implements a new revisions ui using Backbone and preserves all the old methods of "integration" so the change should be transparent to plugins using revisi
ons with CPTs.

This is the first pass and so there are a number of things still to be resolved, more details in the ticket. Feedback welcomed.


git-svn-id: https://develop.svn.wordpress.org/trunk@23506 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-28 15:14:34 +00:00
Andrew Ozz 1ad1ce8db9 Logged out warnings: remove debug leftovers, see #23295
git-svn-id: https://develop.svn.wordpress.org/trunk@23505 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-28 09:03:10 +00:00
Andrew Ozz 780ee565aa Improved logged out warnings, first run, props mintindeed, see #23295
git-svn-id: https://develop.svn.wordpress.org/trunk@23504 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-28 08:57:17 +00:00
Sergey Biryukov 9430601021 Avoid an undefined offset notice in wp_convert_bytes_to_hr(). props soulseekah. fixes #23626.
git-svn-id: https://develop.svn.wordpress.org/trunk@23502 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-28 05:25:15 +00:00
Helen Hou-Sandi 6ef89f92c7 Revert [23407], thereby restoring gradients and shadows. see #23415.
git-svn-id: https://develop.svn.wordpress.org/trunk@23500 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-28 00:58:26 +00:00
Helen Hou-Sandi 8b26ed504c Remove default content from post format compat output. We shouldn't magically create content for display not specified by the user, especially given that the current compat is handling the case of new data, old theme. see #23347.
git-svn-id: https://develop.svn.wordpress.org/trunk@23499 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-27 22:10:08 +00:00
bumpbot ffce5ab757 Compress scripts/styles: 3.6-alpha-23495.
git-svn-id: https://develop.svn.wordpress.org/trunk@23495 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-26 22:58:42 +00:00
Andrew Ozz 756c28bf5c Post locks: use heartbeat to dynamically update locked posts on the Posts screen, first run, see #23312
git-svn-id: https://develop.svn.wordpress.org/trunk@23487 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-25 23:17:10 +00:00
bumpbot 12a8779a74 Compress scripts/styles: 3.6-alpha-23486.
git-svn-id: https://develop.svn.wordpress.org/trunk@23486 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-25 22:58:42 +00:00
Sergey Biryukov 6a59a28f12 Rename 'no_tagcloud' taxonomy label to 'not_found', for consistency with the post type label of the same key. fixes #23597.
git-svn-id: https://develop.svn.wordpress.org/trunk@23484 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-25 19:39:38 +00:00
Sergey Biryukov 41919e97fb Move 'no_tagcloud' argument to the taxonomy labels object. props DrewAPicture for initial patch. fixes #23597.
git-svn-id: https://develop.svn.wordpress.org/trunk@23483 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-25 18:35:05 +00:00
Andrew Ozz d5719ec648 Fix typo in wp_heartbeat_settings, see #23216
git-svn-id: https://develop.svn.wordpress.org/trunk@23482 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-25 04:19:51 +00:00
Andrew Ozz 9b691a21b0 Heartbeat API: add nopriv actions, add JS 'heartbeat-send' event, see #23216
git-svn-id: https://develop.svn.wordpress.org/trunk@23481 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-25 02:32:22 +00:00
Helen Hou-Sandi a3afd6e989 Post formats compat output:
* Check for theme support of `structured-post-formats` rather than `post-formats`.
* Use \n instead of PHP_EOL constant.
* Add new lines after opening compat wrapper tag for some `wpautop()` treatment.

props SergeyBiryukov. see #23347.


git-svn-id: https://develop.svn.wordpress.org/trunk@23468 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-21 23:02:00 +00:00
Helen Hou-Sandi e599566ce4 Implement theme support for structured-post-formats, which will supercede theme support for post-formats. Usage is the same as declaring support for post-formats: `add_theme_support( 'structured-post-formats', array( 'quote', 'video' ) )`. Adding `structured-post-formats` support also adds `post-formats` support for the given format(s) underneath.
Declaring support for a given format indicates that the theme handles format-specific metadata; admin UI will not change based on theme-declared support of either variety as it did previously. If no `structured-post-formats` support is explicitly declared for a format, a post in that format will have fallback output utilizing that metadata applied. In this way, a theme can style core-provided output for a full post format experience without having to handle metadata in any way.

props nacin. see #23347.


git-svn-id: https://develop.svn.wordpress.org/trunk@23467 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-21 22:48:09 +00:00
Andrew Nacin e1b603bbc3 Move revisions/autosave and post format functions from wp-includes/post.php into revision.php and post-formats.php.
git-svn-id: https://develop.svn.wordpress.org/trunk@23466 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-21 21:24:34 +00:00
Sergey Biryukov 74825282e5 Remove unused global reference. props aaroncampbell. fixes #23541.
git-svn-id: https://develop.svn.wordpress.org/trunk@23458 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-20 00:18:15 +00:00
Sergey Biryukov f474e9da60 Add a missing closing tag. fixes #23510. see #14358.
git-svn-id: https://develop.svn.wordpress.org/trunk@23454 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-19 02:06:21 +00:00
bumpbot f18f7d7b2d Compress scripts/styles: 3.6-alpha-23451.
git-svn-id: https://develop.svn.wordpress.org/trunk@23451 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-18 22:26:00 +00:00
Helen Hou-Sandi 351438ebe1 Output fallbacks / theme compat for post format metadata.
* Currently handles link, quote, image, gallery, audio, and video formats.
* `add_theme_support()` for a given post format is now an indicator that the theme handles format-specific metadata.
* If no support for a given format is defined, fallback output will be generated and hooked onto the_content if a post has metadata for that format.
* Fallbacks attempt to be smart about not duplicating data already appearing in the post content itself. Gallery is particularly liberal, looking for any instance of the gallery shortcode in the content, not just an exact match to the gallery shortcode defined in the format-specific meta.
* Compat output defaults to being wrapped in a `div` with a class of `post-format-content`.

Theme authors: please test and evaluate, keeping in mind that the goal is to support user expectations of not losing format-specific data they've entered in the admin when viewing the front-end of their site.

props wonderboymusic, beaulebens, helen. see #23347.


git-svn-id: https://develop.svn.wordpress.org/trunk@23450 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-18 19:22:58 +00:00
Helen Hou-Sandi 5b3c058bd5 Edit screen UI for post formats: a first run for functionality.
* Adds a very basic tabbed interface for selecting a post format (requires JS).
* Extra fields, which are post meta, are shown/hidden based on the selected format.
* Introduce a helper function for retrieving formats-specific metadata: `get_post_format_meta()`.
* Image selection uses the media modal, although without filtering or from URL support at the moment.

props rachelbaker, wonderboymusic, aaroncampbell, helen. see #19570.


git-svn-id: https://develop.svn.wordpress.org/trunk@23449 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-18 19:11:24 +00:00
Sergey Biryukov edd0530290 Fix typo in phpdoc. see #23498.
git-svn-id: https://develop.svn.wordpress.org/trunk@23448 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-18 18:56:51 +00:00
bumpbot 745ed8b530 Compress scripts/styles: 3.6-alpha-23447.
git-svn-id: https://develop.svn.wordpress.org/trunk@23447 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-16 22:58:41 +00:00
Andrew Nacin 038439326d Remove unused admin-categories and admin-custom-fields JavaScript files. props ocean90. fixes #23486.
git-svn-id: https://develop.svn.wordpress.org/trunk@23446 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-16 19:03:59 +00:00
Andrew Nacin 0c89805886 jQuery UI 1.10.1.
props ocean90. see #23370.



git-svn-id: https://develop.svn.wordpress.org/trunk@23442 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-16 17:40:37 +00:00
Sergey Biryukov 4d8fc5d551 Restore the original wp_convert_bytes_to_hr() code. fixes #19067.
git-svn-id: https://develop.svn.wordpress.org/trunk@23440 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-16 03:59:37 +00:00
Sergey Biryukov eeda24f865 Deprecate wp_convert_bytes_to_hr() in favor of size_format(). props F J Kaiser. fixes #19067.
git-svn-id: https://develop.svn.wordpress.org/trunk@23439 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-16 03:07:56 +00:00
Andrew Nacin aedda3210c Deprecate get_user_id_from_string() in favor of get_user_by( $field ) where $field is 'email' or 'login'. props SergeyBiryukov. fixes #23190.
git-svn-id: https://develop.svn.wordpress.org/trunk@23438 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-16 03:02:15 +00:00
Sergey Biryukov 07d596afb7 Add missing inline descriptions. see #19067.
git-svn-id: https://develop.svn.wordpress.org/trunk@23437 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-16 02:52:57 +00:00
Andrew Nacin 4b040e72dc WP_Query: `post_parent__in` and `post_parent__not_in`. props wonderboymusic. fixes #11056.
git-svn-id: https://develop.svn.wordpress.org/trunk@23436 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-16 02:08:46 +00:00
bumpbot fe6bb0671d Compress scripts/styles: 3.6-alpha-23435.
git-svn-id: https://develop.svn.wordpress.org/trunk@23435 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-15 22:58:45 +00:00
Sergey Biryukov 2950f848d4 Fix typos in phpdoc. props markmcwilliams. fixes #23481.
git-svn-id: https://develop.svn.wordpress.org/trunk@23434 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-15 18:59:56 +00:00
Sergey Biryukov 8eebc4d4ff Use wp_get_current_user(). props nacin. see #23192.
git-svn-id: https://develop.svn.wordpress.org/trunk@23432 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-15 18:13:18 +00:00
Sergey Biryukov 79df86b818 Replace get_user_id_from_string() with get_user_by(). props ocean90, bananastalktome. fixes #23192. see #23190.
git-svn-id: https://develop.svn.wordpress.org/trunk@23431 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-15 18:00:52 +00:00
Mark Jaquith ead92fb39d "LGPL License" is redundant.
props wonderboymusic, jakub.tyrcha. fixes #15585

git-svn-id: https://develop.svn.wordpress.org/trunk@23425 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-15 16:26:46 +00:00
Sergey Biryukov 417adb2e2e Filter "Powered by WordPress" text in Meta widget. props Viper007Bond, wonderboymusic. fixes #14358.
git-svn-id: https://develop.svn.wordpress.org/trunk@23424 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-15 16:20:14 +00:00
Andrew Nacin d9e2f14dca jQuery UI 1.10.0.
Some lingering issues with the edit/insert link dialog.

props ocean90.
see #23370.



git-svn-id: https://develop.svn.wordpress.org/trunk@23423 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-15 16:13:26 +00:00
Mark Jaquith 1dc5d1c401 Update our Windows media file MIME types to the official Microsoft-recommended ones.
props niallkennedy, wonderboymusic. fixes #14253

git-svn-id: https://develop.svn.wordpress.org/trunk@23422 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-15 16:12:40 +00:00
Andrew Nacin 88b8e29f0d jQuery 1.9.1 and jQuery Migrate 1.1.0.
Remains uncompressed for now, until we work out all 1.9.x issues.
Fixes custom fields.

props ocean90, wonderboymusic. see #22975.



git-svn-id: https://develop.svn.wordpress.org/trunk@23421 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-15 16:09:04 +00:00
Sergey Biryukov 9defec712a Properly truncate UTF-8 post slugs in wp_unique_post_slug(). fixes #21013.
git-svn-id: https://develop.svn.wordpress.org/trunk@23420 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-15 14:35:41 +00:00
bumpbot 2d34b9a876 Compress scripts/styles: 3.6-alpha-23417.
git-svn-id: https://develop.svn.wordpress.org/trunk@23418 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-14 22:58:42 +00:00
Mark Jaquith bfd0b6fb37 Refactor the Customizer accordion so that it can be used in other locations.
fixes #23449. props lessbloat, aaroncampbell

git-svn-id: https://develop.svn.wordpress.org/trunk@23417 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-14 22:58:04 +00:00
Ryan Boren a6c8efadb9 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: https://develop.svn.wordpress.org/trunk@23416 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-14 22:51:06 +00:00
Peter Westwood 4ca366a0d1 Revisions: Allow a plugin to force us to skip the don't save this revision because it hasn't changed code if it knows better.
See #7392 and #9843. Also cleans up the whitespace.


git-svn-id: https://develop.svn.wordpress.org/trunk@23415 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-14 16:45:43 +00:00
Peter Westwood 671a9b2017 Revisions: Before saving a new post revision make sure that something has changed in the fields that we are revisioning.
Fixes: #7392 and #9843 props adamsilverstein.


git-svn-id: https://develop.svn.wordpress.org/trunk@23414 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-14 11:36:32 +00:00
Sergey Biryukov 16e16c7ee4 Use correct escaping function. fixes #23334.
git-svn-id: https://develop.svn.wordpress.org/trunk@23413 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-14 05:52:23 +00:00