Commit Graph

229 Commits

Author SHA1 Message Date
John Blackbourn 932236420c Move the `show_ui` logic into the `get_edit_post_link()` and `get_edit_term_link()` functions to facilitate post types and terms which specify `show_ui` as false but provide a custom editing UI via the `get_edit_post_link` and `get_edit_term_link` filters.
Fixes #33763
Fixes #33938

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


git-svn-id: http://core.svn.wordpress.org/trunk@35668 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-19 16:25:26 +00:00
Drew Jaynes d01f1c2e15 Docs: Add missing file headers to two Toolbar API files: wp-includes/admin-bar.php and wp-includes/class-wp-admin-bar.php.
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35123 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-14 17:27:25 +00:00
Jeremy Felt b9b7592ee8 MS: Add "Settings" link under "Network Admin" toolbar menu.
Props johnjamesjacoby.
Fixes #34287.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35122 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-14 17:00:26 +00:00
Scott Taylor 00ade45fd1 Docs: some `@global object` vernaculars should be converted to the actual object type.
See #33491.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34978 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-10 15:45:25 +00:00
Gary Pendergast 83c3e3e00e Embeds: Add oEmbed provider support.
For the past 6 years, WordPress has operated as an oEmbed consumer, allowing users to easily embed content from other sites. By adding oEmbed provider support, this allows any oEmbed consumer to embed posts from WordPress sites.

In addition to creating an oEmbed provider, WordPress' oEmbed consumer code has been enhanced to work with any site that provides oEmbed data (as long as it matches some strict security rules), and provides a preview from within the post editor.

For security, embeds appear within a sandboxed iframe - the iframe content is a template that can be styled or replaced entirely by the theme on the provider site.

Props swissspidy, pento, melchoyce, netweb, pfefferle, johnbillion, extendwings, davidbinda, danielbachhuber, SergeyBiryukov, afercia

Fixes #32522.


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


git-svn-id: http://core.svn.wordpress.org/trunk@34868 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-07 10:36:25 +00:00
Scott Taylor 84da11d918 Pass `false` as the 2nd argument to `class_exists()` to disable autoloading and to not cause problems for those who define `__autoload()`.
Fixes #20523.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34312 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-20 03:52:25 +00:00
Scott Taylor 54829b6305 Create a function, `get_preview_post_link()`, to DRY the logic for applying the `'preview_post_link'` filter to a URL.
Props TomHarrigan, wonderboymusic.
Fixes #24345.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34138 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-15 04:15:25 +00:00
John Blackbourn bc6af23302 Update links to the user profile editing screen in the admin toolbar when the current logged in user has no role on the current site. Covers single site and Multisite and introduces tests.
Fixes #25162

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


git-svn-id: http://core.svn.wordpress.org/trunk@34090 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-14 17:10:26 +00:00
Drew Jaynes 7ab106e1f5 Fix the summary and parameter description for `wp_admin_bar_customize_menu()` added in 4.3.
See [33130]. See #32891.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33185 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-13 19:58:25 +00:00
Helen Hou-Sandí 3e292a2426 Toolbar: Don't show the customize link in the admin.
props afragen.
fixes #32945.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33119 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-09 19:19:24 +00:00
Helen Hou-Sandí 28c1600e6e Toolbar: Disambiguate links to the dashboard vs. to the customizer.
All links in the site name menu now point to admin screens, and Customize is its own top-level link. This makes it clear which context you are about to enter.

fixes #32924. see #32678.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33101 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-08 20:03:24 +00:00
John Blackbourn 3c7ea03cb0 Correct the title used on the user dashboard.
Fixes #32754
Props johnjamesjacoby

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


git-svn-id: http://core.svn.wordpress.org/trunk@32888 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-24 00:37:28 +00:00
Scott Taylor 5c6b63d3a6 `if` is a statment, not a function.
See #32444.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32771 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-16 20:01:25 +00:00
Scott Taylor 83dd461b2f Add missing doc blocks to `admin-bar.php`.
See #32444.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32507 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-22 04:00:26 +00:00
Scott Taylor c92608aebd In `admin-bar.php`, most functions simply return when a conditional is not met. `wp_admin_bar_render()` shouldn't explicitly return `false`.
See #32444.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32495 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-21 20:09:24 +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
Jeremy Felt d7fec56e26 Check for an active blog before generating the `my-sites.php` URL.
If a super admin does not have an active blog assigned to their account, `$wp_admin_bar->user->active_blog` will be set as `null`. We can then fall back to `admin_url()` to generate the My Sites URL.

Props SergeyBiryukov, deconf.

Fixes #31755.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31960 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-02 05:27:30 +00:00
Mark Jaquith 8b180b9a46 Add theme browsing and theme switching to the Customizer
* Brings into core the Customizer Theme Switcher feature plugin
* You can now browse, preview, and activate themes right from the Customizer

fixes #31303.
props celloexpressions, afercia, westonruter, folletto, designsimply
Built from https://develop.svn.wordpress.org/trunk@31533


git-svn-id: http://core.svn.wordpress.org/trunk@31514 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-24 20:31:24 +00:00
Sergey Biryukov 586bd7982c Toolbar: Remove title attributes from 'About WordPress', 'Add New', and 'My Account' items.
props afercia.
fixes #31324.
Built from https://develop.svn.wordpress.org/trunk@31456


git-svn-id: http://core.svn.wordpress.org/trunk@31437 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-13 20:20:27 +00:00
Sergey Biryukov 2194cbf245 Toolbar: Add a label for search field on front-end.
props afercia.
fixes #31323.
Built from https://develop.svn.wordpress.org/trunk@31455


git-svn-id: http://core.svn.wordpress.org/trunk@31436 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-13 19:21:27 +00:00
Sergey Biryukov 7e71b1f827 Use `get_admin_url()` to get the correct My Sites URL without calling `switch_to_blog()` directly.
props ocean90.
see #31314.
Built from https://develop.svn.wordpress.org/trunk@31448


git-svn-id: http://core.svn.wordpress.org/trunk@31429 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-13 12:53:25 +00:00
Jeremy Felt e085363aa5 Create the My Sites URL in the context of a user's primary site.
Switch to the user's primary (or active) site before creating the My Sites URL. This previously linked to the current site's dashboard, even if a user was not a member of that site.

Props simonwheatley for the initial patch.

Fixes #31314.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31426 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-13 06:30:26 +00:00
Sergey Biryukov 491ecc4c1c Use `require_once()` to prevent a fatal error if `_wp_admin_bar_init()` is called twice.
props danielbachhuber.
fixes #31287.
Built from https://develop.svn.wordpress.org/trunk@31411


git-svn-id: http://core.svn.wordpress.org/trunk@31392 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-11 15:59:26 +00:00
Sergey Biryukov c3c35cf645 Customizer: Use deep-link for Widgets in toolbar on front-end.
props caseypatrickdriscoll.
fixes #30971.
Built from https://develop.svn.wordpress.org/trunk@31176


git-svn-id: http://core.svn.wordpress.org/trunk@31157 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-13 07:45:22 +00:00
Scott Taylor fc843ce4d0 There are some random `add_action()` and `add_filter()` calls littered around some files in `wp-includes/`. These should be moved to `wp-includes/default-filters.php` with the rest of the registered hooks. It seems like this was the best practice for awhile and then we randomly stopped. This file loads way before any of the includes, so the hooks will be registered for any request that loads WordPress, even `SHORTINIT` - a lot of the hooks registered won't run anyways (that's already the case).
See #30947.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31149 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-12 16:40:23 +00:00
Sergey Biryukov 8cc6732b03 Consistently handle an empty site title in Site and My Sites toolbar menus.
see #28682.
Built from https://develop.svn.wordpress.org/trunk@30598


git-svn-id: http://core.svn.wordpress.org/trunk@30588 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-28 08:13:24 +00:00
Dominik Schilling cffba3c1ba Customizer: Use deep-links for Backgrounds, Headers, and Widgets.
Replace links in admin menu and toolbar to Custom Background/Header screen with deep-links to the Customizer section.
On the Widgets screen display a link to the Customizer widgets panel.

props topher1kenobe, rzen, celloexpressions, westonruter
fixes #25569, #25571, #28032.
Built from https://develop.svn.wordpress.org/trunk@30459


git-svn-id: http://core.svn.wordpress.org/trunk@30450 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-20 15:29:23 +00:00
Sergey Biryukov cc04e76d11 Don't display Edit links for posts and terms in toolbar if they are empty.
props boonebgorges.
fixes #29538.
Built from https://develop.svn.wordpress.org/trunk@29714


git-svn-id: http://core.svn.wordpress.org/trunk@29488 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-09-07 08:32:19 +00:00
Sergey Biryukov 2ff943b7b0 Restore the post type's view_item label for preview links that don't submit the changes.
fixes #28350.
Built from https://develop.svn.wordpress.org/trunk@29695


git-svn-id: http://core.svn.wordpress.org/trunk@29470 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-09-03 11:33:16 +00:00
Dominik Schilling 57c914f75a Customizer: Add meta capability `customize` which is mapped to `edit_theme_options`.
You can now allow users to access the Customizer, say for any user who can `edit_posts`, via `map_meta_cap` or `user_has_cap` filter. See ticket for examples.

props westonruter, nacin.
fixes #28605.
Built from https://develop.svn.wordpress.org/trunk@29170


git-svn-id: http://core.svn.wordpress.org/trunk@28954 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-14 19:01:16 +00:00
Sergey Biryukov 4e75d406ec Pass $post object to 'preview_post_link' filter.
props danielbachhuber.
fixes #28729.
Built from https://develop.svn.wordpress.org/trunk@28969


git-svn-id: http://core.svn.wordpress.org/trunk@28758 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-03 14:42:15 +00:00
Sergey Biryukov 8dcf86f94d Display consistent preview links for drafts.
props mordauk.
fixes #28350.
Built from https://develop.svn.wordpress.org/trunk@28920


git-svn-id: http://core.svn.wordpress.org/trunk@28719 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-30 10:02:16 +00:00
Andrew Nacin 0c16c0477b Reference https://wordpress.org rather than http://wordpress.org in strings, links, comments, etc.
props Ipstenu, markjaquith.
see #27115.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27219 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-03 02:34:27 +00:00
Andrew Ozz 33c41db77a Improve keyboard accessibility for the admin menu when in responsive mode, props SergeyBiryukov, fixes #26639 for trunk.
Built from https://develop.svn.wordpress.org/trunk@27011


git-svn-id: http://core.svn.wordpress.org/trunk@26888 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-01-22 20:08:11 +00:00
Andrew Nacin e9f6fc09df Request a larger avatar for the toolbar, as we use it at narrow responsive sizes.
props kovshenin.
fixes #26292.

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


git-svn-id: http://core.svn.wordpress.org/trunk@26687 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-08 07:43:11 +00:00
Andrew Ozz b8984636c2 Clean up the sticky menu and responsive tweaks JS:
- More descriptive names.
- Share cached jQuery elements.
- Fix re-enabling of touch events on the admin menu.
- Fix disabling/enabling of UI Sortable.
Props tollmanz, props sanchothefat, see #26086, fixes #26088.
Built from https://develop.svn.wordpress.org/trunk@26402


git-svn-id: http://core.svn.wordpress.org/trunk@26302 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-26 08:57:10 +00:00
Matt Thomas 2adf09fea9 Bring in the responsive component of MP6. See #25858.
* Makes the admin fully responsive down to 320px wide.
* Adds a touch-optimized main menu that can be opened and closed from the toolbar.
* Size and positioning adjustments to icons, buttons, and text elements for better touch usability.

A few changes since MP6:

* Removed jQuery mobile. This script was used to add swipe controls to open/close the sidebar menu. This feature was apparently buggy and due to the pending demise of jQuery mobile, it was removed.
* Removed use of Backbone.js. Adding Backbone.js to this script would add a dependency of Backbone.js for all of the admin. Additionally, it was used to add a menu item. Instead of doing that, it was added via the admin menu API. This also fixes a bad delay in the item showing in the menu.
* CSS layout is standardized. Comments have also been cleaned up.
* Jetpack and Akismet code is removed.
* RTL CSS is removed.
* JS passes hinting other than one small issue that will likely be removed when parts of the code are reviewed.

A number of areas for improvement remain; we're tracking these issues in the comments of #25858.

Props to tollmanz, tillkruess, helen, dd32, and apeatling.


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


git-svn-id: http://core.svn.wordpress.org/trunk@26046 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-13 18:00:10 +00:00
Sergey Biryukov 74f77b85a6 Use get_current_site() instead of the $current_site global when possible.
props jeremyfelt.
fixes #25158.
Built from https://develop.svn.wordpress.org/trunk@26120


git-svn-id: http://core.svn.wordpress.org/trunk@26032 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-13 03:23:10 +00:00
Helen Hou-Sandí 69d432410a Say hello to a fresh new look for the WordPress admin.
Still to come: more color schemes, a responsive component, and more.

see #25858.
props iammattthomas, tillkruess, EmpireOfLight, melchoyce, ryelle, joen, mitchoyoshitaka, sirbrillig, andypeatling, isaackeyet, Otto42, dd32, matt, helen.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25992 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-10 00:27:10 +00:00
Drew Jaynes a7465eb374 Inline documentation for hooks in wp-includes/admin-bar.php.
Props swissspidy.
Fixes #25508.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25900 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-26 21:18:09 +00:00
Andrew Nacin 4e4e9f6bee Network Admin toolbar menu: Add Plugins and Themes, remove Visit Network.
props Ipstenu, SergeyBiryukov.
fixes #21674.


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


git-svn-id: http://core.svn.wordpress.org/trunk@25100 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-26 15:22:11 +00:00
Ryan Boren b969f490d8 phpdoc for $wp_admin_bar in admin-bar.php
Props jeremyfelt
see #24900


git-svn-id: http://core.svn.wordpress.org/trunk@24999 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-06 19:23:00 +00:00
Dominik Schilling 55d3e33a56 Remove unused variable. props jeremyfelt. fixes #24893.
git-svn-id: http://core.svn.wordpress.org/trunk@24987 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-06 09:01:25 +00:00
Andrew Nacin c2db94d10c Use meta caps edit_post, read_post, and delete_post directly, rather than consulting the post type object. map_meta_cap() handles that for us. props markjaquith, kovshenin. fixes #23226.
git-svn-id: http://core.svn.wordpress.org/trunk@24593 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-08 20:05:42 +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
Andrew Nacin 26d2fc2916 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: http://core.svn.wordpress.org/trunk@23512 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-02-28 16:56:35 +00:00
Sergey Biryukov 42a3edc83d Display username (user_login) rather than user_nicename in Toolbar. fixes #22121.
git-svn-id: http://core.svn.wordpress.org/trunk@23360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-01-31 01:39:08 +00:00
Andrew Nacin 61caecfa93 Use the create_posts post type cap in more places. Remove the janky create_posts meta cap. see #16714.
git-svn-id: http://core.svn.wordpress.org/trunk@22908 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-28 22:28:20 +00:00
Andrew Nacin f63e0b1df9 Use create_posts whenever linking to post-new.php. props johnbillion. fixes #16714.
git-svn-id: http://core.svn.wordpress.org/trunk@22900 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-28 18:24:11 +00:00
Andrew Nacin 56c1b7c7ff Final HiDPI tweaks. Don't use rss-2x.png on a front-end widget. Improve selectors for favicons in the toolbar to avoid breaking existing images. Remove unnecessary RTL styles. FIXES #21019.
git-svn-id: http://core.svn.wordpress.org/trunk@22481 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-09 02:06:59 +00:00