← All changes
|
modules/theme-tools/site-logo/inc/class-site-logo.php
+8
-4
13.3.3
→
16.3-beta
View file →
| @@ -4,8 +4,12 @@ | ||
| 4 | 4 | * |
| 5 | 5 | * @package automattic/jetpack |
| 6 | 6 | */ |
| 7 | 7 | |
| 8 | +if ( ! defined( 'ABSPATH' ) ) { | |
| 9 | + exit( 0 ); | |
| 10 | +} | |
| 11 | + | |
| 8 | 12 | /** |
| 9 | 13 | * Site Logo class for managing a theme-agnostic logo through the Customizer. |
| 10 | 14 | */ |
| 11 | 15 | class Site_Logo { |
| @@ -213,11 +217,11 @@ | ||
| 213 | 217 | } |
| 214 | 218 | |
| 215 | 219 | // If we've got an array, reduce them to a string for output |
| 216 | 220 | if ( is_array( $classes ) ) { |
| 217 | - $classes = (string) '.' . implode( ', .', $classes ); | |
| 221 | + $classes = '.' . implode( ', .', $classes ); | |
| 218 | 222 | } else { |
| 219 | - $classes = (string) '.' . $classes; | |
| 223 | + $classes = '.' . $classes; | |
| 220 | 224 | } |
| 221 | 225 | |
| 222 | 226 | return $classes; |
| 223 | 227 | } |
| @@ -364,9 +368,9 @@ | ||
| 364 | 368 | |
| 365 | 369 | /** |
| 366 | 370 | * Sanitize our header text Customizer setting. |
| 367 | 371 | * |
| 368 | - * @param any $input The input value to sanitize. | |
| 372 | + * @param mixed $input The input value to sanitize. | |
| 369 | 373 | * @return bool|string 1 if checked, empty string if not checked. |
| 370 | 374 | */ |
| 371 | 375 | public function sanitize_checkbox( $input ) { |
| 372 | 376 | return ( 1 === (int) $input ) ? 1 : ''; |
| @@ -374,9 +378,9 @@ | ||
| 374 | 378 | |
| 375 | 379 | /** |
| 376 | 380 | * Validate and sanitize a new site logo setting. |
| 377 | 381 | * |
| 378 | - * @param any $input Logo setting value to sanitize. | |
| 382 | + * @param mixed $input Logo setting value to sanitize. | |
| 379 | 383 | * @return int Attachment post ID, or 0 if invalid. |
| 380 | 384 | */ |
| 381 | 385 | public function sanitize_logo_setting( $input ) { |
| 382 | 386 | $input = absint( $input ); |