The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
0answers
13 views

How to check for dependencies for a specific page and enqueue them

I am creating a one page site where the content of the sections (separate pages) above and under the actual page section are lazy loaded via AJAX. Say in one of the pages a shortcode for a gallery ...
0
votes
0answers
14 views

Wordpress with Composer and different plugins for dev/live.

I'm using a Bedrock-like setup where I handle Wordpress core & plugins with Composer. I have my usual plugins in my composer.json within the "require" block, and some dev related plugins in ...
1
vote
1answer
87 views

Check for dependent plugin and if false dont activate plugin

I am creating a plugin for WordPress and this plugin depends on another plugin with a specific version. If I enable my plugin without dependent plugin there are fatal error. Is there a way to check ...
0
votes
0answers
40 views

RequireJS in custom theme. Working Example

I try to add to my custom wordpress Theme requirejs because I do not want to use wp_enqueue over and over to inject used plugins and on the other side I do not want to mess the DOM from the beginning. ...
6
votes
1answer
602 views

Concatenate and minify dependencies for enqueued JavaScript files

I'm loading a JavaScript file using wp_enqueue_script into my theme. However, along with it, I'm loading several jQuery files as well, as dependencies for the enqueued script (which has already been ...
0
votes
1answer
68 views

How to enqueue default scripts with dependency?

I'm developing a plugin and for that I need jQuery and jQuery datepicker. I's taught that WordPress already enqueued some scripts, and I found 'jquery' and 'jquery-ui-datepicker' there. Where the ...
0
votes
0answers
43 views

Proper Failure of Plugin Activation

I am currently developing a plugin, which depends on another plugin (json-api). I use the following code to check for the presence during startup and in the constructor, in case the json-api plugin is ...
1
vote
2answers
46 views

JavaScript added as link/stylesheet

I am just trying to create a plugin that will add some JS to the header and custom CSs. I have this below but it adds the css wrong and shows as JS. This is first plugin i have attempted. <?php ...
1
vote
1answer
79 views

How to get list of Scripts in Order of Dependencies

I was writing plugin for combining JS and CSS as three plugins I tried has not worked for me. Dependency problem is where I stopped. It look tough. Then I thought Wordpress can itself help. How to ...
1
vote
0answers
219 views

WordPress deployment strategy: Dealing with dependencies [closed]

The main question is: How do you deploy your WordPress sites, taking into account dependency management and database migrations? Details I've been reading around this issue both on Stack Exchange ...
3
votes
1answer
228 views

How to modify/extend/override a core method?

This is my first post. In advance, thank you for welcoming me... Context When you enqueue style, you can output your css link into conditional comments. global $wp_styles; ...
3
votes
2answers
282 views

Add a script as a dependency to a registered script

wp_register_script() (see codex) allows you to specify dependencies: scripts that must be loaded before the one being registered is loaded (if it is loaded). But suppose the script is a third-party ...
7
votes
1answer
542 views

Is there any sort of theme dependency management?

I'm developing a Wordpress theme with a few other individuals and am running into a problem where I add a plugin and then I have tell the other developers about the plugin I installed and the settings ...
27
votes
2answers
4k views

Should 3rd Parties Use $wp_scripts/$wp_styles->add_data?

Within the WP_Dependencies class exists a method named add_data. This function adds data to scripts/styles that have been enqueued during the WordPress load. A commonly cited use for this function is ...