mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-04 14:47:02 +00:00
Taxonomy: get_terms_to_edit() can also return false or WP_Error. Vars using it should be set to empty string when errors are returned to avoid producing fatal errors when used in string operations.
Props valendesigns. Fixes #30472. git-svn-id: https://develop.svn.wordpress.org/trunk@35139 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -314,8 +314,13 @@ function get_inline_data($post) {
|
||||
|
||||
} elseif ( $taxonomy->show_ui ) {
|
||||
|
||||
$terms_to_edit = get_terms_to_edit( $post->ID, $taxonomy_name );
|
||||
if ( ! is_string( $terms_to_edit ) ) {
|
||||
$terms_to_edit = '';
|
||||
}
|
||||
|
||||
echo '<div class="tags_input" id="'.$taxonomy_name.'_'.$post->ID.'">'
|
||||
. esc_html( str_replace( ',', ', ', get_terms_to_edit( $post->ID, $taxonomy_name ) ) ) . '</div>';
|
||||
. esc_html( str_replace( ',', ', ', $terms_to_edit ) ) . '</div>';
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user