Dominik Schilling
30420b7d19
Screen API: After [37972], ensure that $box['args']
is an array before trying to access __widget_basename
.
...
This prevents a PHP fatal error on the Nav Menus screen where `$args` is an object.
Props elrae.
Fixes #35021 .
Built from https://develop.svn.wordpress.org/trunk@38004
git-svn-id: http://core.svn.wordpress.org/trunk@37945 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-07 16:39:29 +00:00
Dominik Schilling
3d6fc45834
Dashboard: Don't add a "Configure" link to the toggle button.
...
The HTML for the toggle gets appended to the widget name which is later used for the widget title and the screen reader text of the toggle button. Storing the original widget name in the arguments allows us to use the name without the HTML for the screen reader text and doesn't require further changes by plugin developers.
Props nicholas_io, swissspidy.
Fixes #35021 .
Built from https://develop.svn.wordpress.org/trunk@37972
git-svn-id: http://core.svn.wordpress.org/trunk@37913 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-05 15:22:29 +00:00
Drew Jaynes
11d6f0712e
Docs: Update the return notation for get_current_screen()
to note that null
can also be returned if the screen has not been defined.
...
Props screamingdev.
Fixes #36382 .
Built from https://develop.svn.wordpress.org/trunk@37534
git-svn-id: http://core.svn.wordpress.org/trunk@37502 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-23 16:34:28 +00:00
Drew Jaynes
c3055cc190
Docs: Standardize hook docs in wp-admin/* to use third-person singular verbs per the inline documentation standards for PHP.
...
See #36913 .
Built from https://develop.svn.wordpress.org/trunk@37488
git-svn-id: http://core.svn.wordpress.org/trunk@37456 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-22 18:01:30 +00:00
Dominik Schilling
ef3442a2fe
Docs: Remove indentation from the hidden_columns
changelog entry.
...
Added in [36154].
See #35057 .
Built from https://develop.svn.wordpress.org/trunk@36156
git-svn-id: http://core.svn.wordpress.org/trunk@36122 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-02 15:16:28 +00:00
Dion Hulse
f802d26f10
List Tables: When a user has hidden all columns, do not override that with the default_hidden_columns
filter.
...
Props Compute, jorbin, voldemortensen.
Fixes #35057
Built from https://develop.svn.wordpress.org/trunk@36154
git-svn-id: http://core.svn.wordpress.org/trunk@36120 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-02 04:44:27 +00:00
Scott Taylor
ee42803e21
Move WP_Screen
to its own file.
...
See #33413 .
Built from https://develop.svn.wordpress.org/trunk@34169
git-svn-id: http://core.svn.wordpress.org/trunk@34137 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-15 04:08:24 +00:00
Weston Ruter
bd801ae5db
Customize: Remove redundant aria-label
attributes.
...
Adds an `$options` array argument to `WP_Screen::render_screen_options()` to allow the `div#screen-options-wrap` element to be omitted when `wrap` value is `false`.
Props afercia, westonruter.
Fixes #33182 .
Built from https://develop.svn.wordpress.org/trunk@34093
git-svn-id: http://core.svn.wordpress.org/trunk@34061 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-13 06:16:26 +00:00
Scott Taylor
2c21d12232
Implement a priority system for Help Tabs to add them at specific positions.
...
Adds unit tests.
Props swissspidy.
Fixes #19828 .
Built from https://develop.svn.wordpress.org/trunk@33985
git-svn-id: http://core.svn.wordpress.org/trunk@33954 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-10 01:27:23 +00:00
Helen Hou-Sandí
514caf0120
List tables: Allow filtering of hidden and default hidden columns.
...
Similar to `get_hidden_meta_boxes()`, there are now filters named `default_hidden_columns` and `hidden_columns`.
props Compute, MikeHansenMe, chriscct7.
fixes #32499 .
Built from https://develop.svn.wordpress.org/trunk@33689
git-svn-id: http://core.svn.wordpress.org/trunk@33656 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-21 15:32:29 +00:00
Konstantin Obenland
c1a9c4b7b8
Semanticize Help and Screen Options toggle.
...
Links used as UI controls that are not real links but act as buttons, should be buttons.
Props afercia.
Fixes #32494 .
Built from https://develop.svn.wordpress.org/trunk@32844
git-svn-id: http://core.svn.wordpress.org/trunk@32815 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-18 16:36:25 +00:00
Konstantin Obenland
6d56231da3
Sort screen options for meta boxes according to the meta box's priority.
...
Props swissspidy.
Fixes #32582 .
Built from https://develop.svn.wordpress.org/trunk@32707
git-svn-id: http://core.svn.wordpress.org/trunk@32677 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-08 12:35:26 +00:00
Scott Taylor
b3e0cfd25d
Add (more) missing doc blocks to wp-admin/includes/*
.
...
See #32444 .
Built from https://develop.svn.wordpress.org/trunk@32655
git-svn-id: http://core.svn.wordpress.org/trunk@32625 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-29 21:17:27 +00:00
Scott Taylor
19a3aacc94
Add @static*
annotations where they are missing.
...
Initialize all static vars that are not, most to `null`.
See #32444 .
Built from https://develop.svn.wordpress.org/trunk@32650
git-svn-id: http://core.svn.wordpress.org/trunk@32620 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-29 15:43:29 +00:00
Scott Taylor
282e28ad81
Add @global
annotations to (the rest of the?) wp-admin/*
files.
...
Does not include list table file changes.
See #32444 .
Built from https://develop.svn.wordpress.org/trunk@32643
git-svn-id: http://core.svn.wordpress.org/trunk@32613 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-29 02:06:31 +00:00
Dominik Schilling
13ad2d4e16
Screen Options: Improve items per page option label.
...
Previously the label just said "Posts", "Pages", or "Comments". This was bad in terms of accessibility and internationalization because of missing context.
This change adds a default label "Number of items per page:" to `WP_Screen->render_per_page_options()` and removes all the existing one-word labels.
props afercia.
fixes #31349 , #15576 .
Built from https://develop.svn.wordpress.org/trunk@31696
git-svn-id: http://core.svn.wordpress.org/trunk@31677 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-10 15:32:27 +00:00
Scott Taylor
7f8b548df1
In HTML5, the action
attribute is no longer required. Remove this attribute when empty.
...
The admin HTML is served with the HTML5 doctype.
"The action and formaction content attributes, if specified, must have a value that is a valid non-empty URL potentially surrounded by spaces."
http://www.w3.org/html/wg/drafts/html/master/forms.html#attr-fs-action
Props voldemortensen.
Fixes #30126 .
Built from https://develop.svn.wordpress.org/trunk@31200
git-svn-id: http://core.svn.wordpress.org/trunk@31181 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-16 04:16:24 +00:00
Scott Taylor
fe6b5983df
In PHP 5.0.0, is_a()
became deprecated in favour of the instanceof
operator. Calling is_a()
would result in an E_STRICT
warning.
...
In PHP 5.3.0, `is_a()` is no longer deprecated, and will therefore no longer throw `E_STRICT` warnings.
To avoid warnings in PHP < 5.3.0, convert all `is_a()` calls to `$var instanceof WP_Class` calls.
`instanceof` does not throw any error if the variable being tested is not an object, it simply returns `false`.
Props markoheijnen, wonderboymusic.
Fixes #25672 .
Built from https://develop.svn.wordpress.org/trunk@31188
git-svn-id: http://core.svn.wordpress.org/trunk@31169 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-16 01:06:24 +00:00
Scott Taylor
42f5acd869
Improve some docs for @param
. Remove an unneeded $wpdb
global import.
...
See #30799 .
Built from https://develop.svn.wordpress.org/trunk@30979
git-svn-id: http://core.svn.wordpress.org/trunk@30965 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-20 20:56:22 +00:00
Andrew Ozz
1bb20da03b
Update better description of the Screen Options checkbox for DFW v2 and editor-expand. Props johnbillion, kpdesign, fixes #30557 .
...
Built from https://develop.svn.wordpress.org/trunk@30734
git-svn-id: http://core.svn.wordpress.org/trunk@30724 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-03 22:00:29 +00:00
Andrew Ozz
04c2e80c03
Update the description of the Screen Options checkbox for turning editor-expand on/off to include DFW v2. Props kpdesign, fixes #30557 .
...
Built from https://develop.svn.wordpress.org/trunk@30718
git-svn-id: http://core.svn.wordpress.org/trunk@30708 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-02 23:23:23 +00:00
Scott Taylor
2c32752abd
Improve various @param
docs for src/wp-admin/*
.
...
See #30224 .
Built from https://develop.svn.wordpress.org/trunk@30680
git-svn-id: http://core.svn.wordpress.org/trunk@30670 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-01 01:00:22 +00:00
Drew Jaynes
78bb3e5ff5
Docs Formatting: Backtick-escape inline code for all dynamic hook docs in wp-admin/includes/*.
...
Also adds a few inline `@see` cross-references as they apply.
Affects DocBlocks for the following hooks:
* `views_{$this->screen->id}`
* `bulk_actions-{$this->screen->id}`
* `manage_{$this->screen->id}_sortable_columns`
* `theme_action_links_$stylesheet`
* `after_theme_row_$stylesheet`
* `install_plugins_table_api_args_$tab`
* `$prefix . plugin_action_links`
* `after_plugin_row_$plugin_file`
* `manage_taxonomies_for_{$post_type}_columns`
* `manage_{$post_type}_posts_columns`
* `manage_{$post->post_type}_posts_custom_column`
* `{$taxonomy}_row_actions`
* `manage_{$this->screen->taxonomy}_custom_column`
* `install_themes_table_api_args_' . $tab`
* `auto_update_ . $type`
* `{$action}_prefilter`
* `admin_head_{$content_func}`
* `nav_menu_items_{$post_type_name}`
* `activate_ . $plugin`
* `deactivate_ . $plugin`
* `edit_{$post_type}_per_page`
* `postbox_classes_{$page}_{$id}`
* `_wp_post_revision_field_$field`
* `manage_{$screen->id}_columns`
* `in_plugin_update_message-{$file}`
* `in_theme_update_message-{$theme_key}`
See #30552 .
Built from https://develop.svn.wordpress.org/trunk@30648
git-svn-id: http://core.svn.wordpress.org/trunk@30638 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-30 11:28:24 +00:00
Drew Jaynes
6b83230aa5
Fix parameter description syntax for WP_Screen::get_option()
.
...
Props zrothauser for the initial patch.
See [30368]. Fixes #30363 .
Built from https://develop.svn.wordpress.org/trunk@30369
git-svn-id: http://core.svn.wordpress.org/trunk@30367 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-17 17:11:23 +00:00
Drew Jaynes
bc054387d9
Add a missing @return
description for WP_Screen::get_option()
.
...
Also declare the default value for the `$key` parameter.
Props dustyf for the initial patch.
Fixes #30363 .
Built from https://develop.svn.wordpress.org/trunk@30368
git-svn-id: http://core.svn.wordpress.org/trunk@30366 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-17 17:08:21 +00:00
Drew Jaynes
f8657d5890
Remove redundant and erroneous @uses
tag from most core inline documentation.
...
Per our inline documentation standards, no further use of the `@uses` tag is recommended as used and used-by relationships can be derived through other means. This removes most uses of the tag in core documentation, with remaining tags to be converted to `@global` or `@see` as they apply.
Fixes #30191 .
Built from https://develop.svn.wordpress.org/trunk@30105
git-svn-id: http://core.svn.wordpress.org/trunk@30105 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-30 01:05:24 +00:00
Andrew Nacin
491f5cec39
Screen: Move editor scrolling screen option to the proper place.
...
see [29336], see #28328 .
Built from https://develop.svn.wordpress.org/trunk@29588
git-svn-id: http://core.svn.wordpress.org/trunk@29362 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-24 17:57:16 +00:00
Andrew Ozz
b9886e92e3
Editor scrolling:
...
- Add a Screen Option to turn it on/off, and on()/off() methods from JS. Store the user preference.
- Fix delayed calls to resize() in the TinyMCE autoresize plugin.
See #28328 .
Built from https://develop.svn.wordpress.org/trunk@29336
git-svn-id: http://core.svn.wordpress.org/trunk@29116 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-01 02:43:17 +00:00
Helen Hou-Sandí
448275cce4
Media Grid: Remove fields from showing in the grid itself.
...
All details are still available within the modal, and less-distinguishable non-image files still show the filename along with the file type icon.
Reverts [29079], [29078], [29077], and [28995]. see #24716 .
Built from https://develop.svn.wordpress.org/trunk@29280
git-svn-id: http://core.svn.wordpress.org/trunk@29062 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-24 05:26:15 +00:00
Scott Taylor
b16d3bd6ad
Media Grid: make registering Screen Options for non-list tables more generic.
...
See #24716 .
Built from https://develop.svn.wordpress.org/trunk@29079
git-svn-id: http://core.svn.wordpress.org/trunk@28865 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-10 21:44:16 +00:00
Scott Taylor
a9fb59151b
Media Grid: Screen Options for grid have to play nice with Screen Options for list. This was fun.
...
See #24716 .
Built from https://develop.svn.wordpress.org/trunk@29078
git-svn-id: http://core.svn.wordpress.org/trunk@28864 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-10 21:26:16 +00:00
Scott Taylor
a89060013b
Media Grid: Move toggling of visible fields to Screen Options. This moves us in a better direction... but this will probably need to be massaged again.
...
See #24716 .
Built from https://develop.svn.wordpress.org/trunk@29077
git-svn-id: http://core.svn.wordpress.org/trunk@28863 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-10 21:00:17 +00:00
Scott Taylor
2f513d3320
Fix some hackificator
odds and ends in wp-admin
:
...
* `wp-activate.php` and `wp-admin/themes.php` don't need the closing PHP tag
* Switch single quotes for HTML attribute values to double in a few places
* Convert `include_once file.php` syntax to `include_once( 'file.php' )`
* Add access modifiers to methods/members in: `_WP_List_Table_Compat`, `Walker_Nav_Menu_Edit`, `Walker_Nav_Menu_Checklist`, `WP_Screen`, `Walker_Category_Checklist`
* `edit_user()` doesn't need to import the `$wpdb` global
* `wp_list_widgets()` doesn't need to import the `$sidebars_widgets` global
* switch/endswitch syntax is not supported in Hack
* A `<ul>` in `wp-admin/users.php` is unclosed
See #27881 .
Built from https://develop.svn.wordpress.org/trunk@28500
git-svn-id: http://core.svn.wordpress.org/trunk@28326 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-19 05:04:16 +00:00
Drew Jaynes
32e674f44e
Use interpolation instead of concatenation for the manage_{$screen->id}_columns
hook name.
...
Props Otto42.
See #26869 .
Built from https://develop.svn.wordpress.org/trunk@28348
git-svn-id: http://core.svn.wordpress.org/trunk@28176 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-08 09:58:14 +00:00
Scott Taylor
b80cda5d17
In WP_Screen::render_screen_options()
, remove dead code:
...
* `$wp_list_table` does not need to be imported.
* `$post` is set and never used.
See #27882 .
Built from https://develop.svn.wordpress.org/trunk@28303
git-svn-id: http://core.svn.wordpress.org/trunk@28131 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-06 17:14:15 +00:00
Drew Jaynes
94549c1a4a
Inline documentation for hooks in wp-admin/includes/screen.php.
...
Props enej, kpdesign.
Fixes #26821 .
Built from https://develop.svn.wordpress.org/trunk@27256
git-svn-id: http://core.svn.wordpress.org/trunk@27113 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-25 10:05:14 +00:00
Andrew Ozz
8d6059b383
Remove all screen_icon() calls and deprecate the functions, props TobiasBg, fixes #26119
...
Built from https://develop.svn.wordpress.org/trunk@26518
git-svn-id: http://core.svn.wordpress.org/trunk@26411 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-02 03:53:11 +00:00
Helen Hou-Sandí
99f969df3c
Add remove_option(), remove_options(), and get_options() methods to WP_Screen, along with unit tests. props ocean90, DrewAPicture. fixes #25799 .
...
Built from https://develop.svn.wordpress.org/trunk@26456
git-svn-id: http://core.svn.wordpress.org/trunk@26354 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-28 05:10:09 +00:00
Dominik Schilling
0bba1877c4
Remove post format icons next to header on edit post screen. fixes #24502 . see #24452 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@24415 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-06-06 14:45:25 +00:00
Mark Jaquith
89fd06e44b
First pass at removing Post Format UI.
...
see #24452 . fixes #24455 .
git-svn-id: http://core.svn.wordpress.org/trunk@24388 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-05-30 21:33:46 +00:00
Ryan Boren
5b7e9c8a1c
Display the post format UI when there is structured data associated with the post regardless of the screen option.
...
Props kovshenin
see #24327
git-svn-id: http://core.svn.wordpress.org/trunk@24282 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-05-17 15:12:50 +00:00
Mark Jaquith
082e067a2d
Screen option for Post Format UI.
...
props nacin. see #23930 .
git-svn-id: http://core.svn.wordpress.org/trunk@24092 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-04-25 07:28:33 +00:00
Mark Jaquith
90fc15e6d9
post-new.php?format=X will pre-fill the format, to allow for Post-Format-chosen-first editor jump-starting.
...
props kovshenin, wonderboymusic. fixes #24116 .
git-svn-id: http://core.svn.wordpress.org/trunk@24081 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-04-25 02:44:23 +00:00
Dominik Schilling
9313710f79
Post Formats: Change post screen icon on selection. props markjaquith. fixes #24140 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@24039 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-04-19 22:00:10 +00:00
Mark Jaquith
c93e0231af
Post Format UI.
...
* Icons
* Selection
* Prompt text
* Special fields
* Styling
* Sparkles
This is going to need testing, polish, and love.
see #19570 . props melchoyce, helen, wonderboymusic, lessbloat, rachelbaker, aaroncampbell, DrewAPicture, ryelle.
git-svn-id: http://core.svn.wordpress.org/trunk@23843 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-29 03:35:41 +00:00
Sergey Biryukov
539ad97c8b
Replace deprecated WP_Screen::is_network property with WP_Screen::in_admin( 'network' ). props bpetty. fixes #23215 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@23658 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-09 03:52:27 +00:00
Sergey Biryukov
ccd6e6aeec
Don't override filtered screen options on Widgets screen. props bradyvercher. fixes #23239 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@23503 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-02-28 07:40:11 +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
Ryan Boren
25ed7f52c3
The edit-tags screen ID does not contain the post_type. Fallback to post_type in the REQUEST. Fixes AJAX term addtions from edit-tags.php. fixes #21871
...
git-svn-id: http://core.svn.wordpress.org/trunk@21982 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-24 20:39:53 +00:00
Andrew Nacin
33af30eb7f
Use the regular post type UI for editing single media items (attachments).
...
* Attachments now go through post.php, edit_post(), the like, and have show_ui set to true.
* Taxonomies attached to the media library now appear in the admin menu (if show_ui).
* Editing, cropping, uploading, etc. is still very rough, but mostly functional.
API-wise:
* New function: get_taxonomies_for_attachments(). Like get_taxonomies(), for taxonomies specifically registered against attachments.
* Brings taxonomy support from the posts list table to the media list table. Expect them to converge soon.
* wp_insert_attachment() now handles taxonomies like wp_insert_post(). Also expect them to converge soon.
* New edit_form_after_title hook.
props helenyhou, ocean90. see #21391 .
git-svn-id: http://core.svn.wordpress.org/trunk@21948 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-21 22:52:54 +00:00