sujin / wp-express
Quick Wordpress Development Module.
4.0.5
2020-07-08 22:28 UTC
Requires
- php: >=7.1
Requires (Dev)
- dealerdirect/phpcodesniffer-composer-installer: ^0.5.0
- johnpbloch/wordpress: 5.1.0
- mikey179/vfsstream: ^1.6
- php-coveralls/php-coveralls: ^2.1
- phpcompatibility/php-compatibility: ^9.1
- phpcompatibility/phpcompatibility-wp: *
- phpunit/phpunit: ^7
- squizlabs/php_codesniffer: ~3
- wp-coding-standards/wpcs: ^1.2
- wp-phpunit/wp-phpunit: 5.1
- dev-master
- 4.0.5
- 4.0.4
- 4.0.3
- 4.0.2
- 4.0.1
- 4.0.0
- 3.31
- 3.3.1
- 3.3
- 3.2.2
- 3.2.1
- 3.2
- 3.1
- 3.0
- dev-dependabot/npm_and_yarn/json5-1.0.2
- dev-dependabot/npm_and_yarn/express-4.18.2
- dev-dependabot/npm_and_yarn/qs-6.5.3
- dev-dependabot/npm_and_yarn/decode-uri-component-0.2.2
- dev-dependabot/npm_and_yarn/loader-utils-and-webpack-cli-1.4.2
- dev-dependabot/npm_and_yarn/terser-4.8.1
- dev-dependabot/npm_and_yarn/jsdom-16.5.0
- dev-dependabot/npm_and_yarn/ajv-6.12.6
- dev-dependabot/npm_and_yarn/node-sass-7.0.0
- dev-dependabot/npm_and_yarn/tmpl-1.0.5
- dev-dependabot/npm_and_yarn/path-parse-1.0.7
- dev-dependabot/npm_and_yarn/postcss-7.0.36
- dev-dependabot/npm_and_yarn/browserslist-4.16.6
- dev-dependabot/npm_and_yarn/hosted-git-info-2.8.9
- dev-dependabot/npm_and_yarn/lodash-4.17.21
- dev-dependabot/npm_and_yarn/handlebars-4.7.7
- dev-dependabot/npm_and_yarn/ssri-6.0.2
- dev-dependabot/npm_and_yarn/y18n-3.2.2
- dev-dependabot/npm_and_yarn/elliptic-6.5.4
- dev-dependabot/npm_and_yarn/ini-1.3.7
- dev-dependabot/npm_and_yarn/acorn-5.7.4
- dev-#27-Non-Single-Value
- dev-feature-gutenberg
This package is auto-updated.
Last update: 2024-04-07 08:25:25 UTC
README
Quick Wordpress Development Module which helps you to make new admin pages, custom post types, and taxonomies.
Initialize
Include autoload.php, and you are ready.
include_once( $your_path_to . '/wp_express/autoload.php' );
Usage
use Sujin\Wordpress\WP_Express\Admin; use Sujin\Wordpress\WP_Express\Settings_Section; use Sujin\Wordpress\WP_Express\Fields\Settings\Input; // Create a new admin page in the root of admin menu $admin_page_root = Admin::get_instance( 'Admin Root'); // Change position by position id $admin_page_root->position( 200 ); // Create another admin page under $test_admin_page_1 $admin_page_child = Admin::get_instance( 'Admin Child' ) ->position( $root ); // Change position under Settings $admin_page_child->position( 'settings' ); // Change position under other menu $admin_page_child->position( 'Plugin Name' ); // Add a link in the Plugins list $admin_page_child->plugin( 'Akismet' ); // Set menu icon (use WP Dashicons) $admin_page_child->icon( 'dashicons-buddicons-activity' ); // Create a new setttings section (default location is settings page) $settings_section = Settings_Section::get_instance( 'Settings Section' ); // Append the settings section into the admin page $admin_page_child->append( $settings_section ); // Create a new settting field `headline` $headline = Input::get_instance( 'Headline' ); // Append the input into the settings section $settings_section->append( $headline ); // Change the input type to date $headline->type( 'date' ); // Change the input to the multiple value $headline->single( false ); // Settngs could be the chaining assignment $headline ->show_in_rest( true ) ->single( true ) ->append_to( $settings_section );
This is the example of creating a new admin page and set the setting block and its text input. You can create a new post type, taxonomy, and its fields.
Admin Items
Form Fields
helpers