diff --git a/git_status_output.txt b/git_status_output.txt new file mode 100644 index 0000000..c03ddf2 --- /dev/null +++ b/git_status_output.txt @@ -0,0 +1,6 @@ +On branch main +Untracked files: + (use "git add ..." to include in what will be committed) + git_status_output.txt + +nothing added to commit but untracked files present (use "git add" to track) diff --git a/wpa-superstar-plugin.php b/wpa-superstar-plugin.php index 4289453..6965a83 100644 --- a/wpa-superstar-plugin.php +++ b/wpa-superstar-plugin.php @@ -74,17 +74,28 @@ function wpa_superstar_admin_assets() { } add_action( 'admin_enqueue_scripts', 'wpa_superstar_admin_assets' ); -function lazyLoad_assets() { +/** + * Register and enqueue lazy loading assets + */ +function wpa_superstar_lazy_load_assets() { // Enqueue styles for lazy loading - wp_enqueue_style( - 'wpa-superstar-lazy-load', - plugins_url( 'public/css/wpa-superstar-lazy-load.css', __FILE__ ), - [], - WPA_SUPERSTAR_VERSION + wp_enqueue_style( + 'wpa-superstar-lazy-load', + plugins_url( 'public/css/wpa-superstar-lazy-load.css', __FILE__ ), + [], + WPA_SUPERSTAR_VERSION ); } +// Hook the function to appropriate WordPress action +add_action( 'wp_enqueue_scripts', 'wpa_superstar_lazy_load_assets' ); -function minifyCSS($css) { +/** + * Minify CSS content to reduce file size + * + * @param string $css The CSS content to minify + * @return string Minified CSS + */ +function wpa_superstar_minify_css($css) { // Remove comments $css = preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $css); // Remove space after colons @@ -92,4 +103,4 @@ function minifyCSS($css) { // Remove whitespace $css = str_replace(["\r\n", "\r", "\n", "\t", ' ', ' ', ' '], '', $css); return $css; -} +} \ No newline at end of file