efer attribute to the script tag. * * @param string $tag The HTML script tag. * @param string $handle The handle of the script. * * @return string Modified HTML script tag. */ public function add_defer( $tag, $handle ) { if ( 'linkprefetcher' === $handle && false === strpos( $tag, 'defer' ) ) { $tag = preg_replace( ':(?=>):', ' defer', $tag ); } return $tag; } /** * Retrieves the current link prefetch settings. * * @return array Current settings. */ public static function get_settings() { return get_option( self::$option_name, self::$default_settings ); } /** * Updates the link prefetch settings. * * @param array $settings The settings to update. * * @return boolean */ public static function update_settings( $settings ) { return update_option( self::$option_name, $settings ); } }