base === 'dashboard' || Helpers::is_our_screen() ) { return; } // Get all docs for the current screen, organized by location $this->screen_docs = Helpers::get_current_screen_docs( $screen ); if ( empty( $this->screen_docs ) ) { return; } // Render each doc in its appropriate location $page_locations = HelpDocs::page_locations(); foreach ( $page_locations as $key => $label ) { if ( empty( $this->screen_docs[ $key ] ) ) { continue; } $class_name = ucfirst( $key ); $class_fqn = __NAMESPACE__ . '\\' . $class_name; if ( class_exists( $class_fqn ) ) { new $class_fqn( $this->screen_docs[ $key ] ); } } // Also render any docs that are hooked in do_action( 'helpdocs_render_screen_docs', $this->screen_docs ); } // End bootstrap_docs() /** * Prevent cloning and unserializing */ public function __clone() {} public function __wakeup() {} } Controller::instance();