Commit Graph

332 Commits

Author SHA1 Message Date
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
757a470708 Include columns-# CSS class in wp_dashboard() for when the screen supports it.
props westi.
fixes #26354.

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


git-svn-id: http://core.svn.wordpress.org/trunk@26507 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-04 17:28:11 +00:00
Andrew Nacin
7e5b2a013a Restore original properties of the right now (activity) and primary (news) dashboard widgets.
This avoids issues with those trying to remove/disable core meta boxes.

fixes #26392.

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


git-svn-id: http://core.svn.wordpress.org/trunk@26501 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-04 16:56:10 +00:00
Helen Hou-Sandí
725eb939d7 Better Dashboard treatment when in no-JS, especially Quick Draft. props georgestephanis, helen. fixes #26376.
Built from https://develop.svn.wordpress.org/trunk@26563


git-svn-id: http://core.svn.wordpress.org/trunk@26454 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-03 17:32:19 +00:00
Helen Hou-Sandí
236f388d6d Don't show the Activity widget on the Network Admin Dashboard. props ocean90. fixes #26184.
Built from https://develop.svn.wordpress.org/trunk@26394


git-svn-id: http://core.svn.wordpress.org/trunk@26294 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-26 05:29:10 +00:00
Helen Hou-Sandí
2c9af1367e Dashboard columns:
* Improve responsive breakpoints for.
* Remove obsolete network admin option.
* Remove unnecessary JS.

props SergeyBiryukov, kraftbj, lessbloat. fixes #26074.

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


git-svn-id: http://core.svn.wordpress.org/trunk@26292 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-26 05:09:10 +00:00
Dominik Schilling
06b4f99e18 Dashboard: Use _draft_or_post_title() to display (no title) if no post title is set. see #25824.
Built from https://develop.svn.wordpress.org/trunk@26337


git-svn-id: http://core.svn.wordpress.org/trunk@26238 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-23 14:13:09 +00:00
Sergey Biryukov
35ec8405f0 Fix date comparison in dashboard_relative_date(). fixes #26033.
Built from https://develop.svn.wordpress.org/trunk@26242


git-svn-id: http://core.svn.wordpress.org/trunk@26149 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-17 03:30:09 +00:00
Sergey Biryukov
ecd594b5a6 PHPDoc and i18n fixes for dashboard widgets.
props dimadin for initial patch.
see #25824.
Built from https://develop.svn.wordpress.org/trunk@26241


git-svn-id: http://core.svn.wordpress.org/trunk@26148 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-17 03:21:10 +00:00
Andrew Nacin
963b2aa574 Merge wp_dashboard_recent_quickdrafts() into wp_dashboard_quick_press(). see #25824.
Built from https://develop.svn.wordpress.org/trunk@26221


git-svn-id: http://core.svn.wordpress.org/trunk@26129 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-15 20:40:15 +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
5361a8abca Spell out duplicate hook locations.
props DrewAPicture.
fixes #25658.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25868 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-24 22:59:20 +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
Andrew Nacin
74488bdcb0 Spell out duplicate hook locations.
props DrewAPicture.
fixes #25658.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25780 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-22 17:22:11 +00:00
Andrew Nacin
7de2054ece Show a proper error message on the dashboard when the current theme is broken.
Clean up Appearance -> Themes when we don't have enough information to show for a broken theme.

Clean up broken/ugly "alt" row styling when we are displaying broken themes.

props johnbillion for initial patch.
fixes #21670.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25582 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-02 20:50:09 +00:00
Andrew Nacin
4587da663f Allow callback args to be passed from wp_add_dashboard_widget() to add_meta_box().
props jdgrimes.
fixes #25152.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25375 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-16 18:07:10 +00:00
Andrew Nacin
fef6081046 Move to JSON for three api.wordpress.org endpoints. see #25311.
Built from https://develop.svn.wordpress.org/trunk@25441


git-svn-id: http://core.svn.wordpress.org/trunk@25362 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-14 19:31:08 +00:00
Sergey Biryukov
05d55a400b Avoid PHP notices when configuring the Incoming Links dashboard widget. fixes #25250.
Built from https://develop.svn.wordpress.org/trunk@25298


git-svn-id: http://core.svn.wordpress.org/trunk@25261 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-07 18:17:10 +00:00
Andrew Nacin
9b0e21493d In the admin, do not use auto-generated Gravatar images for comment authors.
This makes it easier to recognize Gravatars (or lack thereof) when moderating comments.

props solarissmoke.
fixes #7054.


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


git-svn-id: http://core.svn.wordpress.org/trunk@25075 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-22 20:08:08 +00:00
Andrew Nacin
797ee34bc3 Remove /extend/ from URLs to wordpress.org/plugins, /themes, and /mobile, as those are all now top-level. see #24389.
git-svn-id: http://core.svn.wordpress.org/trunk@24320 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-05-22 21:01:57 +00:00
Ryan Boren
66472f11a0 phpdoc improvements for wp_dashboard_quota()
Props DrewAPicture, h4ck3rm1k3


git-svn-id: http://core.svn.wordpress.org/trunk@24246 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-05-14 12:37:30 +00:00
Sergey Biryukov
415a5c60da * Pass ellipsis as a parameter to wp_html_excerpt() instead of appending it manually.
* Consolidate the logic to avoid appending ellipsis if the entire string is shown.
* Show ellipsis after truncated filenames and post titles.

props solarissmoke, bpetty, SergeyBiryukov. fixes #11446.

git-svn-id: http://core.svn.wordpress.org/trunk@24214 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-05-09 00:22:02 +00:00
Sergey Biryukov
08bef7a3cb Use wp_trim_words() in Recent Drafts widget. fixes #24292.
git-svn-id: http://core.svn.wordpress.org/trunk@24212 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-05-08 23:06:41 +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
Sergey Biryukov
581975e9bf Add description for wp_dashboard_rss_output(). props aaronholbrook for initial patch. fixes #23301.
git-svn-id: http://core.svn.wordpress.org/trunk@23606 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-04 04:34:39 +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
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
Peter Westwood
f683fc7677 Tighten our braces. Fixes #23118 props evansolomon.
git-svn-id: http://core.svn.wordpress.org/trunk@23265 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-01-04 10:13:51 +00:00
Andrew Nacin
a13a011265 Translate the 'First Steps with WordPress' Codex link. props SergeyBiryukov, fixes #22767.
git-svn-id: http://core.svn.wordpress.org/trunk@23082 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-12-05 22:51:24 +00:00
Ryan Boren
63662a9b7b In the QuickPress media modal, use the new post id when a post is published.
Props nacin, koopersmith
fixes #22673


git-svn-id: http://core.svn.wordpress.org/trunk@22994 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-12-03 07:17:10 +00:00
Ryan Boren
b7b54c00e9 Namespace the dashboard widget nonce to avoid collisions with plugins.
git-svn-id: http://core.svn.wordpress.org/trunk@22964 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-12-02 00:12:43 +00:00
Ryan Boren
d4abd95449 Scope button classes so they can be used on the frontend without interfering with theme styles.
Props helenyhou, koopersmith
fixes #22644


git-svn-id: http://core.svn.wordpress.org/trunk@22948 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-30 13:40:59 +00:00
Andrew Nacin
24b82f2c3b Nonces for dashboard controls.
git-svn-id: http://core.svn.wordpress.org/trunk@22930 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-30 00:01:02 +00:00
Ryan Boren
52dcf95dcd Gettext markup for a welcome screen string. Props SergeyBiryukov, xibe. fixes #22546
git-svn-id: http://core.svn.wordpress.org/trunk@22831 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-23 16:42:31 +00:00
Andrew Ozz
c4fd7d119b Welcome screen: clean up the css, improve the html, add RTL styles, props helenyhou TobiasBg ocean90, fixes #21368, see #22453
git-svn-id: http://core.svn.wordpress.org/trunk@22638 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-17 21:51:39 +00:00
Peter Westwood
06830f4501 Multisite: When displaying the upload quota and space used in the dashboard widget format them nicely.
git-svn-id: http://core.svn.wordpress.org/trunk@22498 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-09 10:47:43 +00:00
Andrew Ozz
cbd737470c Kill use of colons in class names, props SergeyBiryukov, fixes #21152
git-svn-id: http://core.svn.wordpress.org/trunk@22396 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-06 01:01:52 +00:00
Ryan Boren
6757005b59 Welcome screen refresh. Now with icons. Props lessbloat, empireoflight. fixes #21368
git-svn-id: http://core.svn.wordpress.org/trunk@22379 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-05 21:12:46 +00:00
Andrew Nacin
076ede55f2 Split by [\r\n\t ] rather than \s to avoid UTF-8 issues. props SergeyBiryukov. fixes #21625.
git-svn-id: http://core.svn.wordpress.org/trunk@22306 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-25 21:09:42 +00:00
Ryan Boren
1714e085e4 Don't create {$blog_id}_user-settings, {$blog_id}_user-settings-time, and {$blog_id}_dashboard_quick_press_last_post_id user options when a super admin visits a site they aren't a member of. Instead, rely solely on the wp-settings cookie.
fixes #22178


git-svn-id: http://core.svn.wordpress.org/trunk@22256 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-17 18:58:09 +00:00
Andrew Ozz
e6fe8c83a3 Tab indexes: when tabbing out of the editors make sure the next focused element is the expected/default action, fix focusing the next field when picking a date for future post, props lessbloat, fixes #21340
git-svn-id: http://core.svn.wordpress.org/trunk@22250 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-16 21:38:35 +00:00
Andrew Nacin
f27e7f051f Align QuickPress fields. props lessbloat. fixes #21754.
git-svn-id: http://core.svn.wordpress.org/trunk@22146 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-09 19:07:09 +00:00
Andrew Nacin
b0e29340e1 Provide no-customize fallback to the welcome screen. Use the customize overlay rather than a page reload. see #21368.
git-svn-id: http://core.svn.wordpress.org/trunk@22089 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-01 14:58:05 +00:00
Andrew Nacin
1acd8b556f New HiDPI spinner. Uses clean <span class="spinner"></span> markup.
Be on the lookout for weirdness.
props lessbloat. see #21456.



git-svn-id: http://core.svn.wordpress.org/trunk@22019 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-26 19:57:44 +00:00
Andrew Nacin
51ad055a68 New design and content for the welcome panel. First pass.
props lessbloat, helenyhou, georgestephanis, sabreuse, ryelle.
see #21368.



git-svn-id: http://core.svn.wordpress.org/trunk@22018 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-26 19:44:43 +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
c1b0670c2d Updates and fixes to the new button styles. By default, buttons are now the same size as they were in 3.4. Then there is a smaller button (designed for minor elements) and a larger button (designed for things like Publish and Save Changes). Better focus styles. props lessbloat. see #21598.
git-svn-id: http://core.svn.wordpress.org/trunk@21944 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-21 19:34:23 +00:00
Andrew Nacin
cfdab676fa Replace QuickPress labels with gray prompt texts. Stylish, but also done for localization purposes (string lengths). props ocean90. fixes #21754.
git-svn-id: http://core.svn.wordpress.org/trunk@21894 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-18 18:45:44 +00:00