Making WordPress.org

Changeset 3994


Ignore:
Timestamp:
09/07/2016 05:34:29 PM (8 years ago)
Author:
Otto42
Message:

Disable inline-terms and mentions on the support forums

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-hooks.php

    r3946 r3994  
    1616        add_filter( 'oembed_discovery_links', array( $this, 'disable_oembed_discovery_links' ) );
    1717        add_filter( 'oembed_response_data', array( $this, 'disable_oembed_response_data' ), 10, 2 );
     18
     19        add_action( 'plugins_loaded', array( $this, 'disable_inline_terms' ) );
    1820    }
    1921
     
    6163        return $data;
    6264    }
     65
     66    /**
     67     * Disable the inline terms and mentions, if they are enabled.
     68     * Inline terms and mentions are for O2 and should not be running on the support forums.
     69     * If this plugin is moved out of mu-plugins, this function can be removed as well.
     70     *
     71     * This fixes the post editing screens in the admin area on the support forums.
     72     */
     73    public function disable_inline_terms() {
     74        remove_action( 'init', array( 'Jetpack_Inline_Terms', 'init' ) );
     75        remove_action( 'init', array( 'Jetpack_Mentions', 'init' ) );
     76    }
     77
     78
    6379}
Note: See TracChangeset for help on using the changeset viewer.