| @@ -121,9 +121,10 @@ | ||
| 121 | 121 | * Defines the available start date options for a Google Business Profile status. |
| 122 | 122 | * |
| 123 | 123 | * @since 4.9.0 |
| 124 | 124 | * |
| 125 | - * @param array $schedule Schedule Options. | |
| 125 | + * @param array $schedule Schedule Options. | |
| 126 | + * @param bool|string $post_type Post Type (false | string). | |
| 126 | 127 | */ |
| 127 | 128 | $schedule = apply_filters( $this->base->plugin->filter_name . '_get_google_business_start_date_options', $schedule, $post_type ); |
| 128 | 129 | |
| 129 | 130 | // Return filtered results. |
| @@ -150,9 +151,10 @@ | ||
| 150 | 151 | * Defines the available start date options for a Google Business Profile status. |
| 151 | 152 | * |
| 152 | 153 | * @since 4.9.0 |
| 153 | 154 | * |
| 154 | - * @param array $schedule Schedule Options. | |
| 155 | + * @param array $schedule Schedule Options. | |
| 156 | + * @param bool|string $post_type Post Type (false | string). | |
| 155 | 157 | */ |
| 156 | 158 | $schedule = apply_filters( $this->base->plugin->filter_name . '_get_google_business_end_date_options', $schedule, $post_type ); |
| 157 | 159 | |
| 158 | 160 | // Return filtered results. |
| @@ -178,9 +180,9 @@ | ||
| 178 | 180 | ); |
| 179 | 181 | |
| 180 | 182 | // Filter out excluded post types. |
| 181 | 183 | $excluded_types = $this->get_excluded_post_types(); |
| 182 | - if ( is_array( $excluded_types ) ) { | |
| 184 | + if ( count( $excluded_types ) > 0 ) { | |
| 183 | 185 | foreach ( $excluded_types as $excluded_type ) { |
| 184 | 186 | unset( $types[ $excluded_type ] ); |
| 185 | 187 | } |
| 186 | 188 | } |
| @@ -275,9 +277,9 @@ | ||
| 275 | 277 | // Get excluded Taxonomies. |
| 276 | 278 | $excluded_taxonomies = $this->get_excluded_taxonomies(); |
| 277 | 279 | |
| 278 | 280 | // If excluded taxonomies exist, remove them from the taxonomies array now. |
| 279 | - if ( is_array( $excluded_taxonomies ) && count( $excluded_taxonomies ) > 0 ) { | |
| 281 | + if ( count( $excluded_taxonomies ) > 0 ) { | |
| 280 | 282 | foreach ( $excluded_taxonomies as $excluded_taxonomy ) { |
| 281 | 283 | unset( $taxonomies[ $excluded_taxonomy ] ); |
| 282 | 284 | } |
| 283 | 285 | } |
| @@ -307,15 +309,15 @@ | ||
| 307 | 309 | */ |
| 308 | 310 | public function get_all_taxonomies() { |
| 309 | 311 | |
| 310 | 312 | // Get Post Type Taxonomies. |
| 311 | - $taxonomies = get_taxonomies( false, 'objects' ); | |
| 313 | + $taxonomies = get_taxonomies( array(), 'objects' ); | |
| 312 | 314 | |
| 313 | 315 | // Get excluded Taxonomies. |
| 314 | 316 | $excluded_taxonomies = $this->get_excluded_taxonomies(); |
| 315 | 317 | |
| 316 | 318 | // If excluded taxonomies exist, remove them from the taxonomies array now. |
| 317 | - if ( is_array( $excluded_taxonomies ) && count( $excluded_taxonomies ) > 0 ) { | |
| 319 | + if ( count( $excluded_taxonomies ) > 0 ) { | |
| 318 | 320 | foreach ( $excluded_taxonomies as $excluded_taxonomy ) { |
| 319 | 321 | unset( $taxonomies[ $excluded_taxonomy ] ); |
| 320 | 322 | } |
| 321 | 323 | } |