common->get_component( 'connect' ); $app_slug = $_GET['app']; $app = $manager->get_app( $app_slug ); $nonce_action = $_GET['app'] . $_GET['action']; if ( ! $app ) { wp_die( 'Unknown app: ' . esc_attr( $app_slug ) ); } if ( empty( $_GET['nonce'] ) || ! wp_verify_nonce( $_GET['nonce'], $nonce_action ) ) { wp_die( 'Invalid Nonce', 'Invalid Nonce', [ 'back_link' => true, ] ); } $method = 'action_' . $_GET['action']; if ( method_exists( $app, $method ) ) { call_user_func( [ $app, $method ] ); } } } /** * @since 2.3.0 * @access public */ public function render_page() { $apps = Plugin::$instance->common->get_component( 'connect' )->get_apps(); ?>