Tag: javascript

  • Limiting Featured Image Dimensions in WordPress

    Limiting Featured Image Dimensions in WordPress

    Discover how to limit image sizes for featured images based on pixel dimensions using JavaScript in the WordPress block editor. Block large images from being uploaded and display error notifications, preventing publishing until the image size meets the specified criteria. Implement this feature by enqueuing a simple `add_action()` during the `enqueue_block_editor_assets` hook.

  • Half-Baked Plugins: Embeds for Twitch and Gutenberg

    Half-Baked Plugins: Embeds for Twitch and Gutenberg

    Learn about Embeds for Twitch and Gutenberg, a WordPress plugin for embedding Twitch channels, videos, and clips as Gutenberg blocks. No plans for release, just for learning. Note: Clip functionality may be faulty. Explore Half-Baked Plugins for more experimental projects.

  • CSS & JS Concatenation in WordPress

    CSS & JS Concatenation in WordPress

    Automated concatenation of Javascript and CSS files in WordPress can be enhanced using the `nginx-http-concat` plugin. Even though it was designed for nginx, it can be adapted to work with Apache servers. By utilizing specific code in `wp-config.php` and `mu-plugin`, improved caching and speed can be achieved. Consider turning this setup into a dedicated plugin…