oute(); } $plugin_textdomain = \method_exists($this->plugin, 'plugin_data') && \method_exists($this->plugin->plugin_data(), 'get_textdomain') ? $this->plugin->plugin_data()->get_textdomain() : (\method_exists($this->plugin, 'get_textdomain') ? $this->plugin->get_textdomain() : ''); return ['restNonce' => \wp_create_nonce('wp_rest'), 'steps' => $steps, 'installer' => $this->installer->get_api_route(), 'commonApi' => $routes, 'config' => $this->get_configuration($this->config), 'pluginSlug' => $this->plugin->get_slug(), 'pluginTextdomain' => $plugin_textdomain, 'hasExtraFields' => !empty($this->extra_fields), 'isWizardMode' => isset($_GET['wizard']) && $_GET['wizard'] === '1']; } /** * Register a custom column to be used in tables. * * @param string $column_key The unique identifier for the column * @param array $args { * Array of arguments for registering a custom column. * * @type string $heading The column heading to display in the table * @type mixed $content The content to display in the column (can be HTML or callback) * } * @return self */ public function register_custom_column(string $column_key, array $args) { $defaults = ['heading' => '', 'content' => '']; $args = \wp_parse_args($args, $defaults); $this->custom_columns[$column_key] = $args; return $this; } /** * Get all registered custom columns. * * @return array */ public function get_custom_columns() { return $this->custom_columns; } }