The progressive plan for customizing the WordPress Editor for clientx (sep 2020)

Victor Ramirez talks about the approach here: https://www.youtube.com/watch?v=3o66SvY9G1k&t=91s

The plan itself was posted on Twitter. It is a bit old, but it sounds like decent approach

Level 1

Read More

Blade Icons

Blade Icons

A package to easily make use of SVG icons in your Laravel Blade views. Originally “Blade SVG” by Adam Wathan.

Turn…

<!-- camera.svg -->
<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" class="w-6 h-6">
  <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 9a2 2 0 012-2h.93a2 2 0 001.664-.89l.812-1.22A2 2 0 0110.07 4h3.86a2 2 0 011.664.89l.812 1.22A2 2 0 0018.07 7H19a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2V9z"/>
  <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 13a3 3 0 11-6 0 3 3 0 016 0z"/>
</svg>

Into…

<x-icon-camera class="w-6 h-6" />

Or into…

@svg('camera', 'w-6 h-6')

Search all 84,305 Blade Icons:

https://blade-ui-kit.com/blade-icons#search

But for a better overview you may want to go to the homepages of the icons set instead. For example:

https://heroicons.com/

Read More

Roots Dev’s Favorite WordPress Plugins and Utilities

https://roots.io/favorite-wordpress-plugins-and-utilities/

I asked Brandon Nifong, Mike Spainhower, Craig, Evan Mattson, Nathan Knowler, and Matt Mirus for their recommendations on WordPress plugins and any relevant Composer packages they use on their sites. Here’s what our list of most frequently used WordPress plugins looks like!

Free WordPress plugins

  • Better Search Replace for performing a search/replace on the database $ composer require wpackagist-plugin/better-search-replace
  • Breadcrumb NavXT for breadcrumb trails $ composer require wpackagist-plugin/breadcrumb-navxt
  • Disable Comments for globally disabling comments on any post type $ composer require wpackagist-plugin/disable-comments
  • Duplicate Post for cloning posts from any post type $ composer require wpackagist-plugin/duplicate-post
  • Easy WP SMTP for configuring WordPress to send emails through any SMTP server $ composer require wpackagist-plugin/easy-wp-smtp
  • HTML Forms for straightforward and flexible forms in WordPress $ composer require wpackagist-plugin/html-forms
  • Imsanity for automatically resizing large image uploads $ composer require wpackagist-plugin/imsanity
  • Intervention for cleaning up and customizing the wp-admin $ composer require soberwp/intervention
  • Post Type Switcher for reassigning any post to a new post type $ composer require wpackagist-plugin/post-type-switcher
  • Query Monitor for WordPress dev tools $ composer require wpackagist-plugin/query-monitor
  • Restricted Site Access for enforcing user logins or whitelisting IPs for access $ composer require wpackagist-plugin/restricted-site-access
  • Safe Redirect Manager for managing redirects $ composer require wpackagist-plugin/safe-redirect-manager
  • Safe SVG for allowing SVG uploads $ composer require wpackagist-plugin/safe-svg
  • Simple Page Ordering for re-ordering any type of page or post with drag and drop $ composer require wpackagist-plugin/simple-page-ordering
  • Stream for logging activity on your WordPress install $ composer require wpackagist-plugin/stream
  • The SEO Framework for fast SEO with automated titles and descriptions $ composer require wpackagist-plugin/autodescription
  • WPBruiser for preventing spam comments and brute force attacks $ composer require wpackagist-plugin/goodbye-captcha
  • WP Stage Switcher for switching between different environments from the admin bar (by Roots) $ composer require roots/wp-stage-switcher
  • WP Term Order for re-ordering any term with drag and drop $ composer require wpackagist-plugin/wp-term-order
  • WP User Avatars for allowing users to upload & select their own avatars $ composer require wpackagist-plugin/wp-user-avatars
  • WP User Profiles for a different way to edit users $ composer require wpackagist-plugin/wp-user-profiles
  • WP-Optimize for automatically cleaning your WordPress database $ composer require wpackagist-plugin/wp-optimize

Paid WordPress plugins

Utilities/Composer packages

Remove jquery Migrate logging

function remove_jquery_migrate( $scripts ) {
	
	if ( ! is_admin() && isset( $scripts->registered['jquery'] ) ) {
			
		$script = $scripts->registered['jquery'];
		
		if ( $script->deps ) { 
			$script->deps = array_diff( $script->deps, array( 'jquery-migrate' ) );
		}
	}
}
add_action( 'wp_default_scripts', 'remove_jquery_migrate' );

WP REST API – sort by menu_order

Sage 10:

In filters.php add:

// /**
// * The filter is named rest_{post_type}_collection_params. So you need to hook a new filter for each
// * of the custom post types you need to sort.
// * @link https://www.timrosswebdevelopment.com/wordpress-rest-api-post-order/
// */

// This enables the orderby=menu_order for Posts
add_filter( 'rest_post_collection_params', __NAMESPACE__ . '\\filter_add_rest_orderby_params', 10, 1 );
// And this for a custom post type called 'faq'
add_filter( 'rest_faq_collection_params', __NAMESPACE__ . '\\filter_add_rest_orderby_params', 10, 1 );

// /**
// * Add menu_order to the list of permitted orderby values
// */
function filter_add_rest_orderby_params( $params ) {
  $params['orderby']['enum'][] = 'menu_order';
   return $params;
}

Now you can use SITEURL/wp-json/wp/v2/faq?orderby=menu_order

Performance Lab

By WordPress Performance Group

https://wordpress.org/plugins/performance-lab/

Description

The Performance Lab plugin is a collection of modules focused on enhancing performance of your site, most of which should eventually be merged into WordPress core. The plugin allows to individually enable and test the modules to get their benefits before they become available in WordPress core, and to provide feedback to further improve the solutions.

Currently the plugin includes the following performance modules:

  • WebP Uploads: Creates WebP versions for new JPEG image uploads if supported by the server.
  • Persistent Object Cache Health Check: Adds a persistent object cache check for sites with non-trivial amounts of data in Site Health status.
  • Audit Autoloaded Options: Adds a check for autoloaded options in Site Health status.
  • Audit Enqueued Assets: Adds a CSS and JS resource check in Site Health status.
  • WebP Support: Adds a WebP support check in Site Health status.