Making WordPress.org

Ticket #2934: 2934-partial.diff

File 2934-partial.diff, 1.5 KB (added by RMarks, 6 years ago)
  • wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/classes/wordcamp-coming-soon-page.php

    diff --git wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/classes/wordcamp-coming-soon-page.php wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/classes/wordcamp-coming-soon-page.php
    index 6ccb5b4..da3385c 100644
    class WordCamp_Coming_Soon_Page { 
    1212                add_action( 'wp_enqueue_scripts', array( $this, 'manage_plugin_theme_stylesheets' ), 99 );    // (hopefully) after all plugins/themes have enqueued their styles
    1313                add_action( 'wp_head',            array( $this, 'render_dynamic_styles' ) );
    1414                add_filter( 'template_include',   array( $this, 'override_theme_template' ) );
     15                add_action( 'wp_loaded',          array( $this, 'disable_jetpacks_open_graph' ) );
    1516
    1617                add_image_size( 'wccsp_image_medium_rectangle', 500, 300 );
    1718        }
    class WordCamp_Coming_Soon_Page { 
    105106        }
    106107
    107108        /**
     109         * Disable Jetpack's Open Graph meta tags when the Coming Soon page is active
     110         */
     111        public function disable_jetpacks_open_graph() {
     112                if ( $this->override_theme_template ) {
     113                        add_filter( 'jetpack_enable_open_graph', '__return_false' );
     114                }
     115        }
     116
     117        /**
    108118         * Collect all of the variables the Coming Soon template will need
    109119         * Doing this here keeps the template less cluttered and more of a pure view
    110120         *