ss_user_capability

ss_user_capability controls the WordPress capability Simply Static checks for a particular operation. It receives the default capability and a context string. For example, generate commonly starts with publish_pages, settings with manage_options, and the network cron context with manage_network.

Restrict who can start a push

add_filter( 'ss_user_capability', function ( $capability, $context ) {
    if ( 'generate' === $context ) {
        return 'manage_options';
    }
    return $capability;
}, 10, 2 );

The final 2 makes WordPress pass both arguments. Return a capability name for each code path. Test with an account that has the capability and one that does not. Check the publishing control and the settings screen separately. Pro users can also manage role assignments through User Access Management.


Keep WordPress on your own host and add incremental publishing, forms and search with Simply Static Pro. Get managed WordPress and CDN hosting for your static site with Simply Static Studio.