ue; } } return $skip; } /** * Check whether a string ends with a specific substring. * * @param string $haystack String we are filtering. * @param string $needle The substring we are looking for. * @return bool */ public static function ends_with( $haystack, $needle ) { if ( ! $haystack || ! $needle || ! is_scalar( $haystack ) || ! is_scalar( $needle ) ) { return false; } $haystack = (string) $haystack; $needle = (string) $needle; return str_ends_with( $haystack, $needle ); } /** * This is a copy of Jetpack::get_content_width() * for backwards compatibility. */ public static function get_jetpack_content_width() { $content_width = ( isset( $GLOBALS['content_width'] ) && is_numeric( $GLOBALS['content_width'] ) ) ? $GLOBALS['content_width'] : false; /** * Filter the Content Width value. * * @since 2.2.3 * * @param string $content_width Content Width value. */ return apply_filters( 'jetpack_content_width', $content_width ); } }