%s
['label' => ..., 'callback' => callable]]. * @type bool $support_module Si true, ajoute auto un onglet 'support' avec Support+Avis 2 colonnes. * @type string $logo_url URL du logo AIFORYA (défaut : auto depuis assets/). * @type string $plugin_basename Basename du plugin (ex: 'aiforya-cart-recovery-ai/aiforya-cart-recovery-ai.php') * utilisé pour Support form. * } */ public static function render_admin_page( array $args ): void { $defaults = [ 'slug' => '', 'title' => '', 'description' => '', 'tabs' => [], 'support_module' => false, 'logo_url' => self::get_assets_base_url() . 'assets/aiforya-logo.svg', 'plugin_basename' => '', ]; $args = array_merge( $defaults, $args ); // Onglet actif : depuis $_GET['tab'] ou premier tab. $first_tab = $args['tabs'] ? array_key_first( $args['tabs'] ) : ''; // Read-only tab navigation: the value is sanitized with sanitize_key() and then // validated against the whitelist of declared tabs below. Nothing is written, and a // nonce here would break every admin tab link and bookmark. // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- read-only tab navigation, sanitized with sanitize_key() and validated against the declared tabs; no state change. $active_tab = isset( $_GET['tab'] ) ? sanitize_key( wp_unslash( $_GET['tab'] ) ) : $first_tab; if ( ! isset( $args['tabs'][ $active_tab ] ) ) { $active_tab = $first_tab; } ?>
%s
%s