1. Go to this page and download the library: Download sofyansitorus/wp-yes 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/ */
sofyansitorus / wp-yes example snippets
if ( ! function_exists( 'wp_yes_simple' ) ) {
function wp_yes_simple() {
$settings = new WP_Yes( 'wp_yes_simple' ); // Initialize the WP_Yes class.
$settings->add_field(
array(
'id' => 'field_1',
'label' => 'Field 1',
'tings->init(); // Run the WP_Yes class.
}
}
add_action( 'init', 'wp_yes_simple' );
if ( ! function_exists( 'wp_yes_simple_bulk' ) ) {
function wp_yes_simple_bulk() {
$settings = new WP_Yes( 'wp_yes_simple_bulk' ); // Initialize the WP_Yes class.
$settings->add_fields(
array(
array(
'id' => 'field_1',
'label' => 'Field 1',
'
add_action( 'init', 'wp_yes_simple_bulk' );