publishpress / PublishPress-Future

This plugin was known as "Post Expirator", and now it is called "PublishPress Future".
https://wordpress.org/plugins/post-expirator/
7 stars 11 forks source link

Add the plugin capabilities to PublishPress Capabilities #301

Closed andergmartins closed 8 months ago

andergmartins commented 2 years ago

Related to publishpress/PublishPress-Capabilities#228.

We have been using the following snippet:

add_filter('cme_plugin_capabilities', [$this, 'filterCMECapabilities'], 20);

.... 

public function filterCMECapabilities($capabilities)
    {
        $capabilities = array_merge(
            $capabilities,
            [
                'publishpress_future_expire_post',
            ]
        );

        return $capabilities;
    }

But it might be better to check the discussion on the capabilities ticket referenced above.

andergmartins commented 8 months ago

I just double-checked and this was already implemented in the plugin.