Changeset 12747 for sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-plugin.php
- Timestamp:
- 07/18/2023 05:41:27 AM (18 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-plugin.php
r12292 r12747 42 42 43 43 /** 44 * Define whether this is the global forums, or a locale forum. 45 * ie. https://wordpress.org/support/ 46 * 47 * @var bool 48 */ 49 public $is_main_forums = false; 50 51 /** 44 52 * Always return the same instance of this plugin. 45 53 * … … 67 75 $this->audit_log = new Audit_Log; 68 76 77 // Set a flag to indicate whether this is the global forums, or a locale forum. 78 $this->is_main_forums = ( 79 defined( 'WPORG_SUPPORT_FORUMS_BLOGID' ) && 80 WPORG_SUPPORT_FORUMS_BLOGID == get_current_blog_id() 81 ); 82 69 83 // These modifications are specific to https://wordpress.org/support/ 70 $blog_id = get_current_blog_id(); 71 if ( $blog_id && defined( 'WPORG_SUPPORT_FORUMS_BLOGID' ) && WPORG_SUPPORT_FORUMS_BLOGID == $blog_id ) { 84 if ( $this->is_main_forums ) { 72 85 $this->dropin = new Dropin; 73 86 $this->support_compat = new Support_Compat; 74 87 75 88 // Only load Performance_Optimizations if necessary. 76 $this->performance = new Performance_Optimizations;89 $this->performance = new Performance_Optimizations; 77 90 78 91 // Ratings_Compat is loaded by Theme_Directory_Compat or … … 82 95 } 83 96 97 // Only load the Block Support if the Blocks Everywhere plugin is available. 84 98 if ( class_exists( 'Automattic\Blocks_Everywhere\Blocks_Everywhere' ) ) { 85 $this->blocks = new Blocks;99 $this->blocks = new Blocks; 86 100 } 87 101
Note: See TracChangeset
for help on using the changeset viewer.