Last active
December 18, 2015 19:29
-
-
Save michael-cannon/5833704 to your computer and use it in GitHub Desktop.
Filter testimonials_widget_meta_box example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_filter( 'testimonials_widget_meta_box', 'my_meta_box' ); | |
| function my_meta_box( $fields ) { | |
| $read_more_link = array( | |
| 'name' => __( 'Read More Link', 'testimonials-widget-premium' ), | |
| 'id' => 'testimonials-widget-read-more-link', | |
| 'type' => 'text', | |
| 'desc' => __( 'Alternate destination for "Read more" link. Leave blank for normal linking to full testimonial.', 'testimonials-widget-premium' ), | |
| ); | |
| $fields[] = $read_more_link; | |
| $is_nurse = array( | |
| 'name' => __( 'Nurse?', 'testimonials-widget-premium' ), | |
| 'id' => 'testimonials-widget-is-nurse', | |
| 'type' => 'select', | |
| 'options' => array( | |
| 0 => __( 'No' ), | |
| 1 => __( 'Yes' ), | |
| ), | |
| 'std' => 0, | |
| ); | |
| $fields[] = $is_nurse; | |
| return $fields; | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Gist should be fixed now.