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
This commit is contained in:
Scott Taylor
2014-05-19 05:04:16 +00:00
parent 511eabe5f3
commit 2f513d3320
27 changed files with 71 additions and 68 deletions

View File

@@ -236,16 +236,18 @@ function get_terms_to_edit( $post_id, $taxonomy = 'post_tag' ) {
$tags = wp_get_post_terms($post_id, $taxonomy, array());
if ( !$tags )
if ( !$tags ) {
return false;
if ( is_wp_error($tags) )
}
if ( is_wp_error($tags) ) {
return $tags;
foreach ( $tags as $tag )
}
$tag_names = array();
foreach ( $tags as $tag ) {
$tag_names[] = $tag->name;
$tags_to_edit = join( ',', $tag_names );
$tags_to_edit = esc_attr( $tags_to_edit );
}
$tags_to_edit = esc_attr( join( ',', $tag_names ) );
/**
* Filter the comma-separated list of terms available to edit.