mount( self::MOUNT_LOGS ); } /** * Render the Redirects admin page. * * @since 4.0.0 * * @return void */ public function renderRedirects(): void { $this->mount( self::MOUNT_REDIRECTS ); } /** * Render the Settings admin page. * * @since 4.0.0 * * @return void */ public function renderSettings(): void { $this->mount( self::MOUNT_SETTINGS ); } /** * Render a cross-promotion landing page. * * @since 4.0.4 * * @return void */ public function renderPromo(): void { $this->mount( self::MOUNT_PROMO ); } /** * Render the About Us page. * * @since 4.0.4 * * @return void */ public function renderAbout(): void { $this->mount( self::MOUNT_ABOUT ); } /** * Emit the React mount-point div. * * Every admin screen rendered by this plugin is just an empty div * the React app attaches to — printing the markup here is cheaper * (and easier to audit) than including a one-line template file. * * @since 4.0.0 * * @param string $mountId DOM id the React app attaches to. * * @return void */ private function mount( string $mountId ): void { printf( '
', esc_attr( $mountId ) ); } }