Questions tagged [autoloading]
The autoloading tag has no usage guidance.
14
questions
0
votes
1
answer
2k
views
Debugging deprecated/renamed PSR-0 classes being requested
After upgrading to 6.2 via WP-CLI I get an error regarding deprecated/renamed PSR-0 classes being requested.
The source comment from WP core says:
/*
* Integrators who cannot yet ...
1
vote
0
answers
180
views
WordPress Ajax load doesn't work
Hello I have set up custom Ajax load more without plugins, but it’s only showing 3 posts on home page, and when clicking on button to load more it’s not loading anything. As I am a beginner I am ...
0
votes
1
answer
1k
views
Adding google fonts to WordPress theme
I am trying to add google fonts to a custom WordPress theme. Therefore I tried to enqueue selected three font faces at once to make it fast loading. So, I use the below codes to register and enqueue ...
1
vote
1
answer
227
views
WP Optimization: Removing Orphaned wp_options (especially the autoload ones)
Is there no mechanism which purges old options from the DB? I tried a few plugins in the past and I found out that there are a few pretty long option strings which are set to autoload but IMHO not ...
0
votes
1
answer
202
views
Include Carbon Fields via Composer with Mozart [closed]
Coen Jacobs' Mozart is a tool to prevent namespace conflicts in Wordpress themes/plugins which utilize Composer for dependency management. It's similar to PHP Scoper but is described as simpler and ...
1
vote
0
answers
112
views
Connect Wordpress with SharePoint [closed]
I'm new here and I'm also new to WordPress.
I'm currently trying to connect my WP site to SharePoint and I'm stuck.
My approach to solve this was to search for php libraries that would help me with ...
0
votes
1
answer
368
views
How to call a WP Class inside my theme
I wrote a WP theme using namespaces and autoload. Everything went smooth until I started to use WP classes which I understand of course because I understand how namespacing works.
My question is, is ...
0
votes
1
answer
404
views
Autoloading Classes in Plugins
In a custom WordPress plugin I have a folder /classes with about 20 classes. Classes sometimes change, come and go. I want all those classes from the folder to be loaded automatically.
No my idea was ...
0
votes
1
answer
39
views
BuddyPress and namespacing
I'm using PSR-4 autoloading and namespacing for a new plugin. However, because my plugin is namespaced (and all it's classes are), I can't seem to extend a BuddyPress class (BP_Attachment) ...
0
votes
1
answer
276
views
Problem with autoloader and namespaces
I'm writing a simple plugin with oop and using namespaces and autoloading. Here is my main file:
add_action('plugins_loaded', array(My_Test_Plugin::get_instance(), 'plugin_setup'));
class ...
0
votes
1
answer
1k
views
Autoloader not finding classes from my plugin
I am trying to work with autoloader in my plugin.
In the main file of my plugin I have
use My_Plugin\Includes;
require_once( plugin_dir_path( __FILE__ ) . 'includes/class-autoloader.php' );
$...
1
vote
0
answers
28
views
Widgets Scripts don't load - but load when I reload the page
I've recently made my website and added facebook web plugin script and instagram script on the widget bar. But when I go from the Homepage to another Page it's not loading. It's just loading when I ...
0
votes
1
answer
55
views
Reorganization of namespaces
First of all thank You for Your time.
I use autoload in my 2 plugins. They have to different namespaces but i want to build one main plugin with autoload for this two plugins. In future i am going to ...
6
votes
1
answer
1k
views
Autoloading in Child Theme
I'm trying to autoload the vendor/autoload.php from my parent theme into my child theme.
heres what i have tried but to no avail:
function beast_theme_setup() {
$var1 = get_theme_root_uri() . '/...