mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
For clarity, initialize some arrays that previously were only assigned via short circuit in loops.
See #30799. git-svn-id: https://develop.svn.wordpress.org/trunk@30982 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -301,11 +301,14 @@ function wp_popular_terms_checklist( $taxonomy, $default = 0, $number = 10, $ech
|
||||
function wp_link_category_checklist( $link_id = 0 ) {
|
||||
$default = 1;
|
||||
|
||||
$checked_categories = array();
|
||||
|
||||
if ( $link_id ) {
|
||||
$checked_categories = wp_get_link_cats( $link_id );
|
||||
// No selected categories, strange
|
||||
if ( ! count( $checked_categories ) )
|
||||
if ( ! count( $checked_categories ) ) {
|
||||
$checked_categories[] = $default;
|
||||
}
|
||||
} else {
|
||||
$checked_categories[] = $default;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user