Drew Jaynes
ee97475edb
Docs: Add a file header to wp-admin/includes/nav-menus.php.
...
See [34168]. See #33701 .
Built from https://develop.svn.wordpress.org/trunk@34421
git-svn-id: http://core.svn.wordpress.org/trunk@34385 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-22 14:27:24 +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
fde014e85e
Move the admin Nav Menu Walker subclasses into their own files. Load in nav-menu.php
to remain BC.
...
See #33413 .
Built from https://develop.svn.wordpress.org/trunk@34168
git-svn-id: http://core.svn.wordpress.org/trunk@34136 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-15 04:02:25 +00:00
Sergey Biryukov
f9e7fb306c
Merge two similar strings.
...
Props dipesh.kakadiya.
Fixes #33777 .
Built from https://develop.svn.wordpress.org/trunk@33998
git-svn-id: http://core.svn.wordpress.org/trunk@33967 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-10 10:59:27 +00:00
Scott Taylor
ef87172270
foreach
is a statement, not a function.
...
See #33491 .
Built from https://develop.svn.wordpress.org/trunk@33734
git-svn-id: http://core.svn.wordpress.org/trunk@33702 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-25 20:28:22 +00:00
Drew Jaynes
f9194e361c
Add a description for the dynamic portion of the nav_menu_items_{$post_type_name}_recent
filter added in 4.3.
...
See [32833]. See #32891 .
Built from https://develop.svn.wordpress.org/trunk@33211
git-svn-id: http://core.svn.wordpress.org/trunk@33183 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-13 19:51:24 +00:00
Scott Taylor
92d67bf395
Use valid markup in Walker_Nav_Menu_Edit::start_el()
- replace <d(l|t)>
with <div>
for .menu-item-bar
and .menu-item-handle
.
...
Props sagarjadhav.
Fixes #31817 .
Built from https://develop.svn.wordpress.org/trunk@32879
git-svn-id: http://core.svn.wordpress.org/trunk@32850 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-19 22:22:26 +00:00
Konstantin Obenland
d872f38c31
Show the posts meta box by default in Appearance > Menus.
...
Lessens user confusion and the likelyhood of misusing custom links
to add menu items for posts.
Props bcole808.
Fixes #32440 .
Built from https://develop.svn.wordpress.org/trunk@32842
git-svn-id: http://core.svn.wordpress.org/trunk@32813 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-18 15:04:26 +00:00
Konstantin Obenland
c9e1e2be9b
Make posts in the 'Most recent' tab of post type meta boxes filterable.
...
Provides parity with the 'View All' tab of post type meta boxes in Appearance > Menus.
Props jpyper, chriscct7.
Fixes #19365 .
Built from https://develop.svn.wordpress.org/trunk@32833
git-svn-id: http://core.svn.wordpress.org/trunk@32804 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-18 11:35: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
Helen Hou-Sandí
0e77b693ac
Nav menus: hide the title attribute field by default for new users and installs.
...
It is still available in screen options. This also gives the "Navigation Label", a crucial field, the room it really deserves.
props paulwilde.
fixes #32218 .
Built from https://develop.svn.wordpress.org/trunk@32691
git-svn-id: http://core.svn.wordpress.org/trunk@32661 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-04 04:38:25 +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
a51dfa3971
In the style of #30947 and default-filters.php
, add 2 new files to wp-admin/includes
:
...
`admin-filters.php`
`ms-admin-filters.php`
There are random actions and filters littered among files like `misc.php`. These files contain functions that won't work outside of admin context and are typically only loaded in files that have already loaded the admin bootstrap.
See #32529 .
Built from https://develop.svn.wordpress.org/trunk@32653
git-svn-id: http://core.svn.wordpress.org/trunk@32623 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-29 17:04:26 +00:00
Scott Taylor
b56b9b3e5c
Add @global
annotations for wp-admin/*
.
...
See #32444 .
Built from https://develop.svn.wordpress.org/trunk@32642
git-svn-id: http://core.svn.wordpress.org/trunk@32612 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-28 21:41:30 +00:00
Scott Taylor
af7a017f46
When calling unset()
, it is unnecessary to immediately precede it with a call to isset()
.
...
See #32444 .
Built from https://develop.svn.wordpress.org/trunk@32545
git-svn-id: http://core.svn.wordpress.org/trunk@32515 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-22 05:47:25 +00:00
Helen Hou-Sandí
d85f8fe326
Admin notices: Make (most) core notices dismissible.
...
These no longer return upon refreshing the page when JS is on and working, so users should be able to dismiss them. This is particularly important on the post edit screen when DFW is triggered, but pretty much all notices can be dismissed if needed. A post on Make/Core will follow with information on how this can be leveraged in plugins.
props valendesigns, afercia, paulwilde, adamsilverstein, helen.
fixes #31233 . see #23367 .
Built from https://develop.svn.wordpress.org/trunk@31973
git-svn-id: http://core.svn.wordpress.org/trunk@31952 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-01 22:06:28 +00:00
Helen Hou-Sandí
296dba2804
Nav menus: Return to calling links "Custom Links".
...
It was like this before 3.6 and got a bit lost during that development cycle. Also uses the terminology more consistently in the nav menu UI.
props tyxla.
fixes #31344 .
Built from https://develop.svn.wordpress.org/trunk@31748
git-svn-id: http://core.svn.wordpress.org/trunk@31729 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-12 06:15:27 +00:00
Helen Hou-Sandí
5567d03278
Nav menus: Better JS performance on initial load of edit screen.
...
The accessibility helpers previously processed all items when editing a menu, which was quite slow to the point of being unresponsive for large menus. They now only process items when they are expanded or a user comes near them in some way, such as hover or focus.
Also simplifies a redundant set of click event handlers down to one, which further enhances performance.
props atimmer, sevenspark.
fixes #25698 .
Built from https://develop.svn.wordpress.org/trunk@31604
git-svn-id: http://core.svn.wordpress.org/trunk@31585 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-03 21:14:25 +00:00
Scott Taylor
5eb5afac34
For clarity, initialize some arrays that previously were only assigned via short circuit in loops.
...
See #30799 .
Built from https://develop.svn.wordpress.org/trunk@30982
git-svn-id: http://core.svn.wordpress.org/trunk@30968 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-20 22:47: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
3699ea4155
Use the correct type (integer) for the $menu_id
parameter in the wp_get_nav_menu_to_edit()
DocBlock.
...
Also properly mark the parameter as optional and specify the default value.
Props jaimieolmstead for the initial patch.
Fixes #30540 .
Built from https://develop.svn.wordpress.org/trunk@30627
git-svn-id: http://core.svn.wordpress.org/trunk@30617 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-30 04:25:23 +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
Gary Pendergast
007ec52958
Add wp_json_encode()
, a wrapper for json_encode()
that ensures everything is converted to UTF-8.
...
Change all core calls from `json_encode()` to `wp_json_encode()`.
Fixes #28786 .
Built from https://develop.svn.wordpress.org/trunk@30055
git-svn-id: http://core.svn.wordpress.org/trunk@30055 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-28 18:35:19 +00:00
Drew Jaynes
097dc8ee15
Fix syntax for single- and multi-line comments in wp-admin-directory files.
...
See #28931 .
Built from https://develop.svn.wordpress.org/trunk@29206
git-svn-id: http://core.svn.wordpress.org/trunk@28990 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-17 09:14:16 +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
Scott Taylor
e57fa7300d
In wp-admin/includes/nav-menu.php
, remove dead code:
...
* In `_wp_ajax_menu_quick_search()`, in an `else` block, `$post_obj` was set and not used. Another block sets it again and does use it.
* In `wp_nav_menu_item_post_type_meta_box()`, `$post_type_object` was set and, sadly, never used. `$error` was set and not used.
See #27882 .
Built from https://develop.svn.wordpress.org/trunk@28300
git-svn-id: http://core.svn.wordpress.org/trunk@28128 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-06 16:55:14 +00:00
Drew Jaynes
029dd247be
Ensure the wp_edit_nav_menu_walker
filter is only documented once.
...
See #26869 .
Built from https://develop.svn.wordpress.org/trunk@28213
git-svn-id: http://core.svn.wordpress.org/trunk@28043 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-25 06:50:15 +00:00
Drew Jaynes
a9b74e2088
Ensure the nav_menu_meta_box_object
filter hook is only documented once.
...
See #26869 .
Built from https://develop.svn.wordpress.org/trunk@28207
git-svn-id: http://core.svn.wordpress.org/trunk@28037 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-25 06:14:15 +00:00
Drew Jaynes
cb8951b0b3
Remove all @package
and @subpackage
PHPDoc tags not at the file- or class-levels in core.
...
See #27200 .
Built from https://develop.svn.wordpress.org/trunk@27262
git-svn-id: http://core.svn.wordpress.org/trunk@27119 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-25 17:14:14 +00:00
Sergey Biryukov
95ff70fcc0
Remove redundant translation function calls.
...
props markoheijnen.
see #26187 .
Built from https://develop.svn.wordpress.org/trunk@26349
git-svn-id: http://core.svn.wordpress.org/trunk@26250 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-24 12:42:09 +00:00
Dominik Schilling
df6010446a
Don't use esc_attr_e() function for a non-translatable context.
...
props yoavf, mattheu.
fixes #26187 .
Built from https://develop.svn.wordpress.org/trunk@26347
git-svn-id: http://core.svn.wordpress.org/trunk@26248 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-24 12:04:09 +00:00
Drew Jaynes
94a3ee8d68
Inline documentation for hooks in wp-admin/includes/nav-menu.php.
...
Props Faison.
Fixes #25474 .
Built from https://develop.svn.wordpress.org/trunk@25935
git-svn-id: http://core.svn.wordpress.org/trunk@25894 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-26 17:48:11 +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
Helen Hou-Sandí
75eb364ced
Show a label for the "Home" page nav menu item checkbox. props SergeyBiryukov. props ericlewis for the initial patch. fixes #25410 .
...
Built from https://develop.svn.wordpress.org/trunk@25741
git-svn-id: http://core.svn.wordpress.org/trunk@25654 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-09 18:47:09 +00:00
Drew Jaynes
39d7e0df8a
Improve inline documentation for Walker_Nav_Menu
, Walker_Nav_Menu_Edit
, Walker_Nav_Menu_Checklist
.
...
Includes previously undocumented parameters.
See #23406 .
Built from https://develop.svn.wordpress.org/trunk@25643
git-svn-id: http://core.svn.wordpress.org/trunk@25560 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-28 21:02:09 +00:00
Scott Taylor
a4841da471
Use get_the_title()
when dealing with post_type
-like items in the admin.
...
Props nacin, DrewAPicture.
Fixes #14975 .
Built from https://develop.svn.wordpress.org/trunk@25285
git-svn-id: http://core.svn.wordpress.org/trunk@25249 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-06 17:08:08 +00:00
Sergey Biryukov
eccd3e42df
Deprecate wp_nav_menu_locations_meta_box(), unused since [23441]. props DrewAPicture. fixes #24942 .
...
Built from https://develop.svn.wordpress.org/trunk@25209
git-svn-id: http://core.svn.wordpress.org/trunk@25181 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-02 11:26:09 +00:00
Sergey Biryukov
61e5d3e5c1
Remove unused variable. props jeremyfelt. fixes #25121 .
...
Built from https://develop.svn.wordpress.org/trunk@25098
git-svn-id: http://core.svn.wordpress.org/trunk@25080 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-23 00:19:09 +00:00
Mark Jaquith
84c50056b7
Reinstate 'label' property of nav menu items. Fixes a regression from [22234].
...
Fixes #24840 . Props johnbillion.
git-svn-id: http://core.svn.wordpress.org/trunk@24798 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-27 06:50:59 +00:00
Dominik Schilling
99973e4738
Nav Menus: Hide the rearrange section in no-js. see #14045 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@24702 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-13 16:38:14 +00:00
Sergey Biryukov
4b13a1ffa4
Fix E_STRICT notices in walkers. props dvarga. see #24356 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@24377 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-05-28 03:29:15 +00:00
Mark Jaquith
58e02a1530
Remove unnecessary parenthetical that should have been "e.g." instead of "i.e." anyway.
...
see #23119
git-svn-id: http://core.svn.wordpress.org/trunk@24356 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-05-25 16:52:26 +00:00
Sergey Biryukov
4b174612ab
Prevent menu items with '0' label from being removed on menu saving. props MikeHansenMe, kovshenin. fixes #23051 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@24235 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-05-10 18:03:09 +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
e2dde2765c
Update the instructions on Edit Menus screen. props DrewAPicture. fixes #24261 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@24185 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-05-07 14:55:14 +00:00
Andrew Nacin
10d898ecbb
Remove _wp_delete_nav_menu(). wp_delete_nav_menu() should instead remove the menu from theme locations, which was the only difference between the functions. see #23119 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@23897 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-04-04 04:28:12 +00:00
Mark Jaquith
271030746c
RTL for Nav Menu tweaks. see #23641 . see #23645 . props lessbloat
...
git-svn-id: http://core.svn.wordpress.org/trunk@23808 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-27 08:53:26 +00:00
Mark Jaquith
9bd740f616
Accessibility revamp for nav menus.
...
props lessbloat. fixes #14045
git-svn-id: http://core.svn.wordpress.org/trunk@23727 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-16 04:47:19 +00:00