Scenario 1 – Using parent plugin features

This is commonly used in addon development, as we rely on the features of the main plugin. In addon development, we have to use constants, functions, classes, global objects from the main plugin. Unless we use the proper WordPress actions, these features may not be accessible within the addon. Assume that we have an addon plugin that gets loaded before the parent plugin. We can think of the WPQPA Post Attachments plugin as the main plugin and WPQAL Action Loading as the addon plugin to check this scenario. The WPQPA Post Attachments plugin is loaded after WPQAL Action Loading plugin. So, we can add the following line of code to main file of WPQAL Action Loading plugin and check the output by refreshing ...

Get WordPress Development Quick Start Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.