Making WordPress.org


Ignore:
Timestamp:
09/20/2016 10:43:21 AM (10 years ago)
Author:
ocean90
Message:

o2 Posting Access: Change init actions so it can be used as a plugin.

See #2059.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-o2-posting-access/wporg-o2-posting-access.php

    r4105 r4106  
    1717         */
    1818        public function init() {
     19                if ( ! defined( 'O2__PLUGIN_LOADED' ) ) {
     20                        return;
     21                }
     22
    1923                add_filter( 'user_has_cap', [ $this, 'add_post_capabilities' ], 10, 4 );
    2024                add_action( 'admin_bar_menu', [ $this, 'remove_non_accessible_menu_items' ], 100 );
    … …  
    195199}
    196200
    197 add_action( 'o2_loaded', [ new Plugin(), 'init' ] );
     201add_action( 'plugins_loaded', [ new Plugin(), 'init' ] );
Note: See TracChangeset for help on using the changeset viewer.