General: Fix more instances of inconsistent parameters passed to various filters, plus fix some filter docs.
See #38462, #41017 Built from https://develop.svn.wordpress.org/trunk@41221 git-svn-id: http://core.svn.wordpress.org/trunk@41061 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -544,7 +544,7 @@ do_action( "{$taxonomy}_add_form", $taxonomy );
|
||||
/* translators: %s: default category */
|
||||
__( 'Deleting a category does not delete the posts in that category. Instead, posts that were only assigned to the deleted category are set to the category %s.' ),
|
||||
/** This filter is documented in wp-includes/category-template.php */
|
||||
'<strong>' . apply_filters( 'the_category', get_cat_name( get_option( 'default_category') ) ) . '</strong>'
|
||||
'<strong>' . apply_filters( 'the_category', get_cat_name( get_option( 'default_category') ), '', '' ) . '</strong>'
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
|
||||
@@ -96,14 +96,14 @@ class Walker_Category_Checklist extends Walker {
|
||||
$output .= "\n" . '<li' . $class . '>' .
|
||||
'<div class="' . $inner_class . '" data-term-id=' . $category->term_id .
|
||||
' tabindex="0" role="checkbox" aria-checked="' . $aria_checked . '">' .
|
||||
esc_html( apply_filters( 'the_category', $category->name ) ) . '</div>';
|
||||
esc_html( apply_filters( 'the_category', $category->name, '', '' ) ) . '</div>';
|
||||
} else {
|
||||
/** This filter is documented in wp-includes/category-template.php */
|
||||
$output .= "\n<li id='{$taxonomy}-{$category->term_id}'$class>" .
|
||||
'<label class="selectit"><input value="' . $category->term_id . '" type="checkbox" name="'.$name.'[]" id="in-'.$taxonomy.'-' . $category->term_id . '"' .
|
||||
checked( in_array( $category->term_id, $args['selected_cats'] ), true, false ) .
|
||||
disabled( empty( $args['disabled'] ), false, false ) . ' /> ' .
|
||||
esc_html( apply_filters( 'the_category', $category->name ) ) . '</label>';
|
||||
esc_html( apply_filters( 'the_category', $category->name, '', '' ) ) . '</label>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -214,7 +214,7 @@ function wp_popular_terms_checklist( $taxonomy, $default = 0, $number = 10, $ech
|
||||
<input id="in-<?php echo $id; ?>" type="checkbox" <?php echo $checked; ?> value="<?php echo (int) $term->term_id; ?>" <?php disabled( ! current_user_can( $tax->cap->assign_terms ) ); ?> />
|
||||
<?php
|
||||
/** This filter is documented in wp-includes/category-template.php */
|
||||
echo esc_html( apply_filters( 'the_category', $term->name ) );
|
||||
echo esc_html( apply_filters( 'the_category', $term->name, '', '' ) );
|
||||
?>
|
||||
</label>
|
||||
</li>
|
||||
@@ -255,7 +255,7 @@ function wp_link_category_checklist( $link_id = 0 ) {
|
||||
$cat_id = $category->term_id;
|
||||
|
||||
/** This filter is documented in wp-includes/category-template.php */
|
||||
$name = esc_html( apply_filters( 'the_category', $category->name ) );
|
||||
$name = esc_html( apply_filters( 'the_category', $category->name, '', '' ) );
|
||||
$checked = in_array( $cat_id, $checked_categories ) ? ' checked="checked"' : '';
|
||||
echo '<li id="link-category-', $cat_id, '"><label for="in-link-category-', $cat_id, '" class="selectit"><input value="', $cat_id, '" type="checkbox" name="link_category[]" id="in-link-category-', $cat_id, '"', $checked, '/> ', $name, "</label></li>";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user