admin-settings.php
Admin Settings Page
Registers the settings page under Settings menu and handles post type activation.
Tags
Table of Contents
Functions
- jpkcom_simplelang_sanitize_post_types() : array<int, string>
- Sanitize post types array
- jpkcom_simplelang_enabled_post_types_field() : void
- Render enabled post types field
- jpkcom_simplelang_settings_page() : void
- Render settings page
Functions
jpkcom_simplelang_sanitize_post_types()
Sanitize post types array
jpkcom_simplelang_sanitize_post_types(array<int, string>|null $value) : array<int, string>
Ensures only valid post types are saved in the settings.
Parameters
- $value : array<int, string>|null
-
The post types array to sanitize.
Tags
Return values
array<int, string> —Sanitized array of valid post types.
jpkcom_simplelang_enabled_post_types_field()
Render enabled post types field
jpkcom_simplelang_enabled_post_types_field() : void
Displays checkboxes for all public post types.
Tags
jpkcom_simplelang_settings_page()
Render settings page
jpkcom_simplelang_settings_page() : void
Displays the admin settings page for Simple Lang plugin.