-
- /**
- * Sanitize quantity of featured posts.
- *
- * @static
- * @access public
- * @since Twenty Fourteen 1.0
- *
- * @param int $input The value to sanitize.
- * @return int A number between 1 and FeaturedContent::$max_posts.
- */
- public static function sanitize_quantity( $input ) {
- $quantity = absint( $input );
-
- if ( $quantity > self::$max_posts ) {
- $quantity = self::$max_posts;
- } else if ( 1 > $quantity ) {
- $quantity = 1;
- }
-
- return $quantity;
- }
-