tuend-work / wp-codestar-framework
Composer package for the Codestar Framework
Installs: 48
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/tuend-work/wp-codestar-framework
README
wp-codestar-framework
Import this library to your project with Composer command:
composer require tuend-work/wp-codestar-framework
Example Using:
/**
* Plugin Name: My Basics Plugin
* Plugin URI: https://example.com/plugins/the-basics/
* Description: Handle the basics with this plugin.
* Version: 1.10.3
* Requires at least: 5.2
* Requires PHP: 7.2
* Author: John Smith
* Author URI: https://author.example.com/
* License: GPL v2 or later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Update URI: https://example.com/my-plugin/
* Text Domain: my-basics-plugin
* Domain Path: /languages
*/
require __DIR__ . '/vendor/autoload.php';
// Control core classes for avoid errors
if( class_exists( 'CSF' ) ) {
//
// Set a unique slug-like ID
$prefix = 'my_framework';
//
// Create options
CSF::createOptions( $prefix, array(
'menu_title' => 'My Framework',
'menu_slug' => 'my-framework',
) );
//
// Create a section
CSF::createSection( $prefix, array(
'title' => 'Tab Title 1',
'fields' => array(
//
// A text field
array(
'id' => 'opt-text',
'type' => 'text',
'title' => 'Simple Text',
),
)
) );
//
// Create a section
CSF::createSection( $prefix, array(
'title' => 'Tab Title 2',
'fields' => array(
// A textarea field
array(
'id' => 'opt-textarea',
'type' => 'textarea',
'title' => 'Simple Textarea',
),
)
) );
}
Get more element Here: https://codestarframework.com/documentation/#/configurations View live demo in wordpress website: http://codestarthemes.com/plugins/codestar-framework/wp-login.php