Plugins Handbook Functions Q
I’m reading the WP Plugins Handbook, starts w register_activation_hook and register_deactivation_hook, but i’ve noticed not all plugins use these.
1): Why do some plugins (Lightweight Social Icons by GeneratePress) only use ‘plugins_loaded’ hook and neither of the register hooks above and under what conditions would I use one or the other or both?
I’m guessing the social icon plugin doesn’t need additional functionality that comes with the register hooks. Whereas, a more complicated plugin, like CoBlocks by GoDaddy needs the added functionality.
2): Am i on the right track by surmising that if a plugin provides CPT functionality, for example, it would require using the activation hooks to assist w the rewrite rules, etc.?
- The topic ‘Plugins Handbook Functions Q’ is closed to new replies.