Is it okay to make a plugin to the WordPress repo, but limit it’s actions to maximum N events?

Trialware is not permitted (props @jacob): https://developer.wordpress.org/plugins/wordpress-org/detailed-plugin-guidelines/#5-trialware-is-not-permitted With the only exception being Attempting to upsell the user on ad-hoc products and features is acceptable, provided it falls within bounds of guideline 11 (hijacking the admin experience). https://developer.wordpress.org/plugins/wordpress-org/detailed-plugin-guidelines/#11-plugins-should-not-hijack-the-admin-dashboard Sounds like the feature must be in a separate plugin itself to be within the guidelines for submitting … Read more

WordPress shortcode with a switch

Yes, you can pass shortcode parameters wihtout values. They just appear on $atts with numeric keys. You can see this when you do var_dump($atts). One option to check their existance is then to use in_array(). function info( $atts ) { // check if extended is passed in $atts with or without value $extended = isset( … Read more

The function called on the wp head hook becomes null

As an alternative you could try declaring it with $GLOBALS[‘a3’] in file2 to make sure it becomes a global: $GLOBALS[‘a3′] = Sample_Class::instance(); I’d guess the current $a3 declaration in file2’s top level scope doesn’t count as global because it gets inluded inside the test_loaded() scope. From the ‘include’ docs (which cover require and require_once too): … Read more