Questions tagged [autoloading]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
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 ...
RafaSashi's user avatar
  • 437
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 ...
Ferdal Karaman's user avatar
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 ...
user2584538's user avatar
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 ...
tim's user avatar
  • 154
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 ...
MikeiLL's user avatar
  • 559
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 ...
Fábio Carvalho's user avatar
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 ...
Amir Rami's user avatar
  • 123
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 ...
Blackbam's user avatar
  • 535
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) ...
mrpritchett's user avatar
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 ...
Amirition's user avatar
  • 345
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' ); $...
dingo_d's user avatar
  • 1,919
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 ...
eldorado23's user avatar
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 ...
sebastian_aps's user avatar
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() . '/...
Henshall's user avatar
  • 113