PHP code example of kuuak / wordpress-setting-fields
1. Go to this page and download the library: Download kuuak/wordpress-setting-fields library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
kuuak / wordpress-setting-fields example snippets
add_action( 'admin_init', function() {
add_settings_field(
'my-setting-id',
__('My setting', 'my-setting-domain'),
'Kuuak\WordPressSettingFields\Fields::text',
'setting-page-id',
'setting-section-id',
[
'label_for' => 'my-setting-id',
'name' => 'my-setting-name',
'value' => 'Value',
'help' => 'This is a text to help the user to understand the setting',
'attrs' => [
'class' => 'large-text'
],
]
);
} );