Tagged: plugin
- This topic has 3 replies, 2 voices, and was last updated 6 years, 1 month ago by
Steve.
-
AuthorPosts
-
-
January 4, 2016 at 10:42 am #5476
dameerMemberHi!
Is there any example of how to use Piklist in the plugin that does not extend Piklist itself?
1. I have Piklist installed as a plugin on my WP 4.4.
2. I’ve created new plugin files and folders and added checker to my plugin file, like so:function e_init_piklist() { if( is_admin() ) { require_once( 'includes/class-piklist-checker.php' ); if( ! piklist_checker::check( __FILE__ ) ) return; } } add_action( 'init', 'e_init_piklist' );3. I’ve created Piklist required folder structure in my plugin like so
my-plugin
– parts
— meta-boxes ( with “e-meta-boxes.php” inside )4. “e-meta-boxes.php” looks like this:
/* Title: Info Description: Whatever description Post Type: event Collapse: false Context: normal Priority: high Order: 1 */ // WP's default date format // $wp_date_format = get_option( 'date_format' ); // still not working in Piklist piklist( 'field', array( 'type' => 'datepicker', 'scope' => 'post_meta', 'field' => 'event_from', 'label' => esc_attr__( 'Start date' ), 'attributes' => array( 'class' => 'text' ), 'options' => array( 'dateFormat' => 'd M, yy', ), ) );No matter what I do, meta-box doesn’t show up in my “event” post type.
Any help is appreciated!
-
January 4, 2016 at 11:21 am #5477
SteveKeymasterMake sure you add this to the comment block of your plugin:
Plugin type: Piklist -
January 4, 2016 at 1:32 pm #5478
dameerMemberHoly smoke, I obviously overlooked that one! And of course, it works now. Thanks a zillion Steve, I appreciate your speedy response.
On a side note, just wanted to say THANKS for all of your efforts in regards to Piklist! Amazing framework, the best I ever met, great documentation and support, everything is just right.
Love ya guys, all the best in 2016!
-
January 4, 2016 at 2:44 pm #5479
SteveKeymaster@dameer– We really appreciate you using Piklist!
Your kind words are also appreciated. If you have a few minutes, it would be great if you could give Piklist a 5 Star review on WordPress.org. It really does help the project.
-
-
AuthorPosts
- You must be logged in to reply to this topic.