diff --git a/mu-plugins/10up-plugin/includes/core.php b/mu-plugins/10up-plugin/includes/core.php index 1234957..9275ae4 100755 --- a/mu-plugins/10up-plugin/includes/core.php +++ b/mu-plugins/10up-plugin/includes/core.php @@ -108,6 +108,8 @@ function get_enqueue_contexts() { * @param string $script Script file name (no .js extension) * @param string $context Context for the script ('admin', 'frontend', or 'shared') * + * @throws \RuntimeException If an invalid $context is specified. + * * @return string URL */ function script_url( $script, $context ) { @@ -125,6 +127,8 @@ function script_url( $script, $context ) { * @param string $stylesheet Stylesheet file name (no .css extension) * @param string $context Context for the script ('admin', 'frontend', or 'shared') * + * @throws \RuntimeException If an invalid $context is specified. + * * @return string URL */ function style_url( $stylesheet, $context ) { @@ -269,7 +273,7 @@ function script_loader_tag( $tag, $handle ) { } if ( 'async' !== $script_execution && 'defer' !== $script_execution ) { - return $tag; // _doing_it_wrong()? + return $tag; } // Abort adding async/defer for scripts that have this script as a dependency. _doing_it_wrong()? diff --git a/mu-plugins/10up-plugin/includes/utility.php b/mu-plugins/10up-plugin/includes/utility.php index 3ffe2c5..9535e7c 100755 --- a/mu-plugins/10up-plugin/includes/utility.php +++ b/mu-plugins/10up-plugin/includes/utility.php @@ -26,7 +26,10 @@ function get_asset_info( $slug, $attribute = null ) { } elseif ( file_exists( TENUP_PLUGIN_PATH . 'dist/css/' . $slug . '.asset.php' ) ) { $asset = require TENUP_PLUGIN_PATH . 'dist/css/' . $slug . '.asset.php'; } else { - $asset = [ 'version' => TENUP_PLUGIN_VERSION, 'dependencies' => [] ]; + $asset = [ + 'version' => TENUP_PLUGIN_VERSION, + 'dependencies' => [], + ]; } // @var }> $asset diff --git a/themes/10up-theme/includes/overrides.php b/themes/10up-theme/includes/overrides.php index 40028e8..80d6b35 100644 --- a/themes/10up-theme/includes/overrides.php +++ b/themes/10up-theme/includes/overrides.php @@ -68,8 +68,8 @@ function disable_emojis_tinymce( $plugins ) { * * @link https://developer.wordpress.org/reference/hooks/emoji_svg_url/ * - * @param array $urls URLs to print for resource hints. - * @param string $relation_type The relation type the URLs are printed for. + * @param array $urls URLs to print for resource hints. + * @param string $relation_type The relation type the URLs are printed for. * @return array Difference betwen the two arrays. */ function disable_emoji_dns_prefetch( $urls, $relation_type ) { diff --git a/themes/10up-theme/includes/utility.php b/themes/10up-theme/includes/utility.php index 57645bb..07c96ae 100755 --- a/themes/10up-theme/includes/utility.php +++ b/themes/10up-theme/includes/utility.php @@ -26,7 +26,10 @@ function get_asset_info( $slug, $attribute = null ) { } elseif ( file_exists( TENUP_THEME_PATH . 'dist/css/' . $slug . '.asset.php' ) ) { $asset = require TENUP_THEME_PATH . 'dist/css/' . $slug . '.asset.php'; } else { - $asset = [ 'version' => TENUP_THEME_VERSION, 'dependencies' => [] ]; + $asset = [ + 'version' => TENUP_THEME_VERSION, + 'dependencies' => [], + ]; } if ( ! empty( $attribute ) && isset( $asset[ $attribute ] ) ) { @@ -41,6 +44,8 @@ function get_asset_info( $slug, $attribute = null ) { * * @param string $path the path to your CSS variables file * + * @throws \RuntimeException If the file is not found or could not be read + * * @return array */ function get_colors( $path ) {