Coding standards: Fix a few phpcs errors to get tests passing.

See [48356], #43517.

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


git-svn-id: http://core.svn.wordpress.org/trunk@48127 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
whyisjake 2020-07-07 03:55:02 +00:00
parent d76e635459
commit 6542769c56
2 changed files with 5 additions and 3 deletions

View File

@ -442,7 +442,8 @@ function register_taxonomy( $taxonomy, $object_type, $args = array() ) {
// Add default term.
if ( ! empty( $taxonomy_object->default_term ) ) {
if ( $term = term_exists( $taxonomy_object->default_term['name'], $taxonomy ) ) {
$term = term_exists( $taxonomy_object->default_term['name'], $taxonomy );
if ( $term ) {
update_option( 'default_taxonomy_' . $taxonomy_object->name, $term['term_id'] );
} else {
$term = wp_insert_term(
@ -2515,7 +2516,8 @@ function wp_set_object_terms( $object_id, $terms, $taxonomy, $append = false ) {
$taxonomy_obj = get_taxonomy( $taxonomy );
// Default term for this taxonomy.
if ( empty( $terms ) && ! empty( $taxonomy_obj->default_term ) && ! empty( $default_term_id = get_option( 'default_taxonomy_' . $taxonomy ) ) ) {
$default_term_id = get_option( 'default_taxonomy_' . $taxonomy );
if ( empty( $terms ) && ! empty( $taxonomy_obj->default_term ) && ! empty( $default_term_id ) ) {
$terms[] = (int) $default_term_id;
}

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.5-alpha-48357';
$wp_version = '5.5-alpha-48358';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.