HOUR_IN_SECONDS ) { $hours = floor( $duration / HOUR_IN_SECONDS ); $out .= $hours . 'H'; $duration = ( $duration - ( $hours * HOUR_IN_SECONDS ) ); } if ( $duration > MINUTE_IN_SECONDS ) { $minutes = floor( $duration / MINUTE_IN_SECONDS ); $out .= $minutes . 'M'; $duration = ( $duration - ( $minutes * MINUTE_IN_SECONDS ) ); } if ( $duration > 0 ) { $out .= $duration . 'S'; } return $out; } /** * Determine whether a video is family friendly or not. * * @since 11.1 * * @param int $post_id Post ID. * * @return bool True if family friendly, false if not. */ public static function is_video_family_friendly( $post_id ) { $not_family_friendly = apply_filters( 'wpseo_video_family_friendly', WPSEO_Meta::get_value( 'videositemap-not-family-friendly', $post_id ), $post_id ); return ( false === ( is_string( $not_family_friendly ) && $not_family_friendly === 'on' ) ); } /** * Return the plugin file * * @since 11.1 * * @return string */ public static function get_plugin_file() { return WPSEO_VIDEO_FILE; } /** * Load translations * * @since 11.1 */ public static function load_textdomain() { load_plugin_textdomain( 'yoast-video-seo', false, dirname( plugin_basename( WPSEO_VIDEO_FILE ) ) . '/languages/' ); } }