PHP code example of wp-media / options
1. Go to this page and download the library: Download wp-media/options 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/ */
wp-media / options example snippets
use WPMedia\Options;
$option = new Options( 'wp_media_' ); // optional prefix
$option->get( 'setting' );
use WPMedia\SiteOptions;
$option = new SiteOptions( 'wp_media_' ); // optional prefix
$option->get( 'setting' );
use WPMedia\Options;
use WPMedia\OptionArray;
$option = new Options( 'wp_media_' ); // optional prefix
$data = new OptionArray( $option->get( 'setting' ), 'wpmedia' );
$data->get( 'setting_key' );