Commit Graph

114 Commits

Author SHA1 Message Date
Andrew Nacin
7dbfca1778 Nonces are already per-user. see #22862.
Built from https://develop.svn.wordpress.org/trunk@26793


git-svn-id: http://core.svn.wordpress.org/trunk@26680 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-08 07:05:10 +00:00
Andrew Nacin
c09252b950 Core updates for the new color schemes.
* Update about page, there's now 8.
 * Display them four wide, not three, and ensure adequate spacing.
 * Use a dedicated nonce.
 * Push Light to the front in addition to Default.
 * Use user-profile.js on about.php. A few extra things are initialized but they are harmless.

see #26468, #26387.

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


git-svn-id: http://core.svn.wordpress.org/trunk@26663 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-07 07:46:21 +00:00
Drew Jaynes
fdbc44ff48 Inline documentation fixes for wp_heartbeat_set_suspension().
See #25073.

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


git-svn-id: http://core.svn.wordpress.org/trunk@26621 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-06 18:43:10 +00:00
Andrew Nacin
9b29ad0529 Allow for Dashicons and base64-encoded data:image/svg+xml URIs when specifying menu icons.
Both of these icons can be colored to match the color scheme, including hover states.
Both are accepted for register_post_type()'s menu_icon argument, and also add_menu_page()'s $icon_url argument.

To use a Dashicon, pass the name of the helper class, e.g. 'dashicons-piechart'.
To use an SVG, pass a valid data URI string starting with 'data:image/svg+xml;base64,'.

props helen.
fixes #25147.

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


git-svn-id: http://core.svn.wordpress.org/trunk@26554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-05 06:38:09 +00:00
Andrew Ozz
e6dd5fbf48 Svg-painter:
- Clean up the JS, better names, etc.
- Convert the base64 encode/decode code from jQuery plugin to local use.
- Add missing icon colors for the default theme.
- Make it more error-proof.
Fixes #26333.
Built from https://develop.svn.wordpress.org/trunk@26601


git-svn-id: http://core.svn.wordpress.org/trunk@26491 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-04 04:13:11 +00:00
Andrew Ozz
0f20e57329 Heartbeat:
- Bring back heartbeat.interval().
- Rename wp_disable_heartbeat_suspend() to wp_heartbeat_set_suspension().
- Rename the option for disabling suspension from options.suspend to options.suspension.
Fixes #25073.
Built from https://develop.svn.wordpress.org/trunk@26549


git-svn-id: http://core.svn.wordpress.org/trunk@26441 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-03 00:45:10 +00:00
Andrew Ozz
a6ac0bea23 Improve the admin color scheme picker:
- Easier to extend.
- Remove the "drop-down" look, show all choices inline.
- Some PHP and JS cleanup.
Props ryelle, fixes #26336.
Built from https://develop.svn.wordpress.org/trunk@26506


git-svn-id: http://core.svn.wordpress.org/trunk@26400 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-01 19:50:09 +00:00
Andrew Ozz
162037903d Heartbeat: introduce "suspend" functionality and enable it after 20 min. of inactivity, see #25073.
Built from https://develop.svn.wordpress.org/trunk@26428


git-svn-id: http://core.svn.wordpress.org/trunk@26328 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-27 01:56:10 +00:00
Sergey Biryukov
f0a4d5a991 Rename mp6_color_scheme JS global to wp_color_scheme.
props kovshenin.
see #26263.
Built from https://develop.svn.wordpress.org/trunk@26406


git-svn-id: http://core.svn.wordpress.org/trunk@26306 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-26 13:58:10 +00:00
Helen Hou-Sandí
603c1aff6d Merge the color schemes component from MP6. Introduces Light, Blue, and Midnight.
Color scheme selection on your own profile page gives you a preview and autosaves the selection.

Also introduces the usage of a preprocessor for core files, namely Sass. For 3.8, we will not expand its implementation past the color schemes. This does require Ruby as well as Sass 3.3.0+ due to the usage of the sourcemap option.

Note that only the default color scheme is available when running out of src. Use build to test the rest as well as the color picker.

props ryelle, melchoyce, tillkruess, drw158, littlethingsstudio, helen. see #25858, #22862.

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


git-svn-id: http://core.svn.wordpress.org/trunk@26048 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-13 19:38:38 +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
82547b21b6 In show_message(), only print error data if it is a string.
see #25576, [25775].

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


git-svn-id: http://core.svn.wordpress.org/trunk@25708 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-15 19:51:10 +00:00
Andrew Nacin
d3b89d43fc Add nginx detection to the Permalink Settings screen.
Introduces got_url_rewrite() and a corresponding filter, which should now be used in lieu of the got_rewrite filter in got_mod_rewrite().

This does not write or even suggest nginx configuration; rather, it prevents nginx from being considered as either Apache or as an unrecognized server.

props johnbillion.
fixes #25098.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25377 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-16 20:07:09 +00:00
Andrew Nacin
c2a543566c Move _local_storage_notice() to admin/includes/template.php. props azaozz, see #24756.
git-svn-id: http://core.svn.wordpress.org/trunk@24762 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-22 05:09:49 +00:00
Andrew Nacin
740d141e1d Support IIS 8 and above.
props hurtige for initial patch.
fixes #23533.



git-svn-id: http://core.svn.wordpress.org/trunk@24594 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-08 20:27:06 +00:00
Andrew Ozz
b8b66e2cc1 Nonce refresh:
- Update the heartbeat nonce when refreshing nonces on the Edit Post screen.
- After a user logs in from the auth-check dialog, speed up heatrbeat to check/refresh nonces on the Edit Post screen.
- Speeding up heartbeat: bring back the setting how long it should last (how many ticks).
- Add 'heartbeat-nonces-expired' jQuery event when nonces have expired and the user is logged in.
See #23295, see #23216.

git-svn-id: http://core.svn.wordpress.org/trunk@24528 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-06-29 01:31:44 +00:00
Andrew Ozz
5642a56311 Post locks:
- When a post is locked, ensure the 'Go back' button doesn't reload the same screen. If no referrer, change the button from 'Go back' to 'Go to All Posts'/'Go to All Pages' etc.
- Remove restriction on checking locks only for posts.
See #23697.



git-svn-id: http://core.svn.wordpress.org/trunk@24408 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-06-05 03:01:59 +00:00
Andrew Ozz
0fff739949 Heartbeat: rename some vars/args to make them more intuitive, don't set user_id on every request, see #23216
git-svn-id: http://core.svn.wordpress.org/trunk@24406 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-06-05 00:13:40 +00:00
Ryan Boren
ad4a081c0c Pinking shears
git-svn-id: http://core.svn.wordpress.org/trunk@24303 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-05-20 12:10:58 +00:00
Andrew Ozz
2f0c58960a Separate the nonces update from checking the post lock. Fix scheduling the logged out check. See #23697, see #23295.
git-svn-id: http://core.svn.wordpress.org/trunk@24273 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-05-16 03:47:09 +00:00
Andrew Ozz
d0c5c59c94 Post locks and autosave:
- Move nonces refreshing from autosave to lock checking.
- Do autosave only when there is something to save.
See #23295

git-svn-id: http://core.svn.wordpress.org/trunk@24209 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-05-08 22:52:55 +00:00
Sergey Biryukov
57c10eadbb Use ellipsis instead of three dots. props tjsingleton, jordie23, wojtek.szkutnik, DrewAPicture, SergeyBiryukov. see #8714.
git-svn-id: http://core.svn.wordpress.org/trunk@24207 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-05-08 21:27:31 +00:00
Andrew Ozz
d2a8f064aa Post locks:
- Show 'Saving revision...' while autosaving after a post has been taken over. Change to 'Your latest changes were saved as a revision.' when autosave completes.
- Make sure a user exists before using $user->display_name.
- Add 'post_lock_text' action for extending the message text.

git-svn-id: http://core.svn.wordpress.org/trunk@24042 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-04-22 03:08:51 +00:00
Andrew Ozz
e9245269a7 Autosave to the browser's sessionStorage, compare this autosave to the post content on page load and let the user restore it when the data is not the same. First run, see #23220
git-svn-id: http://core.svn.wordpress.org/trunk@23683 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-13 10:08:16 +00:00
Andrew Ozz
3b4b058275 Post locks on the posts list screen: new icons for the lock, props empireoflight, show avatar for the user currently editing, props dh-shredder, see #23312
git-svn-id: http://core.svn.wordpress.org/trunk@23681 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-13 00:28:07 +00:00
Andrew Ozz
edb9333d40 Check post locks with heartbeat and display modal notifications when a post is locked or a user takes over editing, props dh-shredder, see #23697
git-svn-id: http://core.svn.wordpress.org/trunk@23661 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-12 03:22:30 +00:00
Sergey Biryukov
f288da4b7b Use correct variable. see [23575]. see #21767.
git-svn-id: http://core.svn.wordpress.org/trunk@23584 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-02 21:10:12 +00:00
Andrew Nacin
4e06d41b9f Assume that url_shorten() receives unslashed data, as it does in core usage. see #21767.
git-svn-id: http://core.svn.wordpress.org/trunk@23575 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-01 17:56:31 +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
Andrew Ozz
9a827a485e Post locks: use heartbeat to dynamically update locked posts on the Posts screen, first run, see #23312
git-svn-id: http://core.svn.wordpress.org/trunk@23487 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-02-25 23:17:10 +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
Ryan Boren
b10f343480 Consistent escaping in admin_color_scheme_picker(). Props johnjamesjacoby. fixes #22326
git-svn-id: http://core.svn.wordpress.org/trunk@22375 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-05 18:16:23 +00:00
Andrew Nacin
fac0ce8ec7 Flush rewrite rules when page_on_front is updated. props SergeyBiryukov. fixes #21274.
git-svn-id: http://core.svn.wordpress.org/trunk@22301 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-25 20:20:24 +00:00
Ryan Boren
bcbc0b65ac Allow numbers in screen option IDs. Fixes setting posts per page for custom post types containing 0-9. Props SergeyBiryukov. fixes #18323
git-svn-id: http://core.svn.wordpress.org/trunk@22253 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-17 13:09:17 +00:00
Dion Hulse
a41af6219a Move win_is_writable() from wp-admin/includes to wp-includes so that it's always available for get_temp_dir(). Fixes #20778
git-svn-id: http://core.svn.wordpress.org/trunk@22009 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-26 05:08:26 +00:00
ryan
f45383244d Fix per_page screen option for custom post types and taxonomies. Don't convert taxonomy and post type slugs from hyphen to underscore when saving the per_page usermeta. Props nacin. see #18958
git-svn-id: http://core.svn.wordpress.org/trunk@21322 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-07-25 16:13:13 +00:00
azaozz
1d12cd07b0 Introduce wp_is_mobile() and use it instead of $is_iphone global, see #20014
git-svn-id: http://svn.automattic.com/wordpress/trunk@20417 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-04-10 01:19:30 +00:00
duck_
a395e06896 Reduce references to the $wp_rewrite global because it's no longer used or a wrapper function can be used instead. Fixes #14546.#14546.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20023 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-02-28 20:29:33 +00:00
ryan
e3b46b25d3 Lose EOF ?>. Clean up EOF newlines. fixes #12307
git-svn-id: http://svn.automattic.com/wordpress/trunk@19712 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-08 17:01:11 +00:00
ryan
616c35e71c One newline is enough.
git-svn-id: http://svn.automattic.com/wordpress/trunk@19684 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-05 20:10:39 +00:00
ryan
02a1dd7ccb Best practice, use wp_safe_redirect() when dealing with referrers. Props nacin.
git-svn-id: http://svn.automattic.com/wordpress/trunk@19579 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-12-10 18:26:48 +00:00
azaozz
eb5dbde246 Admin bar IE7, iPad and rtl refresh, see #81197
git-svn-id: http://svn.automattic.com/wordpress/trunk@19368 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-11-21 02:03:02 +00:00
azaozz
f85e0b3f00 Make iPad support usable again, add viewport meta, see #18863
git-svn-id: http://svn.automattic.com/wordpress/trunk@18926 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-10-10 04:19:05 +00:00
westi
b816f54124 Revert [18747] until we can discuss it further. See #18453.
git-svn-id: http://svn.automattic.com/wordpress/trunk@18752 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-09-22 09:15:45 +00:00
azaozz
95e8b34104 Postpone warnings when WP_DEBUG and WP_DEBUG_DISPLAY are set, see #18453
git-svn-id: http://svn.automattic.com/wordpress/trunk@18747 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-09-22 02:27:00 +00:00
nacin
a4c18fc053 Use untrailingslashit in url_shorten() and recurse_dirsize(). Remove unnecessary camelCase variables. see #18592.
git-svn-id: http://svn.automattic.com/wordpress/trunk@18637 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-09-05 16:53:19 +00:00
azaozz
06fd2002c5 Fix unfolding of the admin menu when no JS, fixes #17897
git-svn-id: http://svn.automattic.com/wordpress/trunk@18349 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-06-27 20:40:04 +00:00
westi
3c278d6421 Don't touch web.config when flushing rewrite rules if it is a multisite install. Fixes #16076 props nacin.
git-svn-id: http://svn.automattic.com/wordpress/trunk@17328 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-01-19 16:49:46 +00:00
dd32
20e1171ae8 Fix fatal error on IIS after r16797. props peaceablewhale. Limit variable string searching when possible. See #10187
git-svn-id: http://svn.automattic.com/wordpress/trunk@16904 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-12-14 08:31:33 +00:00