PHP code example of alexrah / wp-admin-settings

1. Go to this page and download the library: Download alexrah/wp-admin-settings 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/ */

    

alexrah / wp-admin-settings example snippets


use WpAdminSettings\WpAdminSettings;

const OPTION_NAME = 'wp_option_name';

$oSettings = new WpAdminSettings([
	'label' => 'Option Panel Heading',
	'options_name' => OPTION_NAME,
	'capability' => 'update_themes'
]);

$oSettings->set_option(['name' => 'single_option_name','label' => 'Paypal Client ID','

WpAdminSettings\WpAdminSettings::get_stored_option(OPTION_NAME,'single_option_name');

WpAdminSettings\WpAdminSettings::get_stored_option(OPTION_NAME);