Making WordPress.org

Changeset 8764


Ignore:
Timestamp:
05/09/2019 08:05:20 PM (8 years ago)
Author:
coffee2code
Message:

Markdown Importer: Ensure CSS is only output once regardless of the number of imported handbooks.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-markdown/inc/class-editor.php

    r8197 r8764  
    1414                add_filter( 'get_edit_post_link', array( $this, 'redirect_edit_link_to_github' ), 10, 3 );
    1515                add_filter( 'o2_filter_post_actions', array( $this, 'redirect_o2_edit_link_to_github' ), 11, 2 );
    16                 add_action( 'wp_head', array( $this, 'render_edit_button_style' ) );
    1716                add_action( 'edit_form_top', array( $this, 'render_editor_warning' ) );
     17
     18                if ( ! has_action( 'wp_head', array( __CLASS__, 'render_edit_button_style' ) ) ) {
     19                        add_action( 'wp_head', array( __CLASS__, 'render_edit_button_style' ) );
     20                }
    1821        }
    1922
    20         public function render_edit_button_style() {
     23        public static function render_edit_button_style() {
    2124                ?>
    2225                <style>
Note: See TracChangeset for help on using the changeset viewer.