Skip to content

Instantly share code, notes, and snippets.

@michael-cannon
Last active December 18, 2015 19:29
Show Gist options
  • Save michael-cannon/5833704 to your computer and use it in GitHub Desktop.
Save michael-cannon/5833704 to your computer and use it in GitHub Desktop.
Filter testimonials_widget_meta_box example
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;
}
@michael-cannon
Copy link
Author

Gist should be fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment