ordPress.Security.NonceVerification.Recommended -- This is a view, not a model or controller. $module_tag = sanitize_text_field( wp_unslash( $_REQUEST['module_tag'] ) ); if ( ! in_array( $module_tag, array_map( 'jetpack_get_module_i18n_tag', $module['module_tags'] ), true ) ) { return false; } } // If nothing rejected it, include it! return true; } /** * Sort callback to put modules with `requires_connection` last. * * @param array $module1 Module data. * @param array $module2 Module data. * @ch ( Jetpack::get_available_modules() as $slug ) { $return[ "{$prefix}module-{$slug}" ] = Jetpack::is_module_active( $slug ) ? 'on' : 'off'; } return $return; } /** * Add Jetpack Stats array to Heartbeat if Jetpack