Reorganization of namespaces

Ok. Problem solved. I added plugin as i said to manage autoloader and other stuff. I changed my autoloader and thanks to that i have one in place of 3. Solution was to change one piece of directory with plugin name.This is my autoloader now: public function xx_main_plugin( $class ) { $array = explode(‘\\’, $class); … Read more

How to call a WP Class inside my theme

You should be able to do something like this: $wp_customize = new \WP_Customize_Manager(); …since, as I understand it, WordPress core puts all its classes, functions, etc. in the global namespace. Edit It appears that $wp_customize may be a bad example, as it’s a global variable (so, in your theme, all you should need to do … Read more

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