register_settings( aiou()->settings() ); ( new Feature() )->register(); } /** * Register the Admin tab and its "Show IDs" section. * * @param SettingsRegistry $settings The settings registry. * @return void */ private function register_settings( SettingsRegistry $settings ): void { $settings->add_tab( 'admin', __( 'Admin', 'all-in-one-utilities' ), __( 'Make wp-admin your own: the Dashboard, footer, toolbar, and how the admin screens look and behave.', 'all-in-one-utilities' ), 40 ); $settings->add_section( 'admin', 'show_ids', __( 'Show IDs', 'all-in-one-utilities' ), __( 'Add an "ID" column to admin list tables, for easy access to the numeric ID WordPress uses internally for each item.', 'all-in-one-utilities' ), 10 ); $settings->add_field( 'admin', 'show_ids', new Field( id: 'enabled', label: __( 'Show IDs', 'all-in-one-utilities' ), type: 'checkbox', default: 0, args: array( 'toggle_label' => __( 'Add an ID column to Posts, Pages, Media, Users, Comments, and taxonomy list tables', 'all-in-one-utilities' ) ), priority: 10 ) ); } }