Include Carbon Fields via Composer with Mozart [closed]

So, Mozart doesn’t yet support fields autoloading, but there’s a fork of it that does (which will perhaps be merged into Mozart master at some point.) So here’s the composer file by which I have been able to manage Carbon Fields (and also Eric Mann’s Sessionz and WP Session Manager.): “type”: “wordpress-plugin”, “scripts”: { “lint”: … Read more

Autoloader not finding classes from my plugin

Given the first PHP code snippet you posted, I don’t see that you’re using the class yet, which explains why you’re not seeing your classes in the autoload error log that you’re debugging with. Note that use will not trigger PHP’s autoloader. use My_Plugin\Includes; You need to actually instantiate a class, check that it exists, … Read more

WP Optimization: Removing Orphaned wp_options (especially the autoload ones)

Do you have access to a SQL client program like phpmyadmin or something similar? If so give this query SELECT option_id, option_name, LENGTH(option_value) FROM wp_options WHERE autoload = ‘yes’ AND option_name NOT LIKE ‘_transient%’ ORDER BY 3 DESC LIMIT 20; You’ll see the top twenty auto loaded options in descending order of length. Eyeball the … Read more

Autoloading in Child Theme

So there are one or two things to keep in mind: There should only be 1 vendor folder There should be a primary composer.json that’s in your project root, that would pull in all the dependencies You always check for and load the autoloader in the current directory, there’s no guarantee it is or isn’t … Read more

tech