The WPFolks app is out on iPhone and Android. Free, no ads. Download on the App Store Get it on Google Play
Skip to main content
Login Join

Hooks

Per-Post-Type Revision Limits

Reduces database bloat by setting different revision limits based on post type instead of applying a static global limit in wp-config.php.


Automatically Assign a Role After Registration

This code hooks into WordPress user creation to safely grant your custom wpfolks role to new users. It checks if they already have the role to prevent unnecessary database work. By using add_role, it adds your role without wiping out existing roles.






Fallback Table Creation Using plugins_loaded When Activation Hook Fails

WordPress activation hook does not always fire reliably in certain environments like LocalWP, multisite setups, or some managed hosting configurations. If the activation hook is missed, your custom database table never gets created and the plugin breaks silently. This snippet adds a safety net. On every page load, maybe_install() checks if the table exists. If […]




Enable WooCommerce Product Attributes in Search Appearance

By default, AIOSEO does not include support for WooCommerce Product Attributes in our Search Appearance settings, because this could cause performance issues on larger sites. If you want to enable this feature, just add this handy snippet!


Proudly supported by