Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function applyFilter( $form_fields, $post ) {
- $form_fields['post_title'] = array(
- 'label' => __('Title', 'rt-slider'),
- 'html' => "<input type='text' class='text slide_url' value='" . get_the_title( $post->ID ) . "' /><br />",
- 'input' => 'text',
- );
- $form_fields['post_content'] = array(
- 'label' => __('Description', 'rt-slider'),
- 'html' => "<textarea style='width: 100%'></textarea>",
- 'value' => $post->post_content
- );
- $form_fields['rtslider_link'] = array(
- 'label' => __( 'Slide link', 'rt-slider' ),
- 'helps' => __('Add the URL for the Slide', 'rt-slider' ),
- 'input' => 'text',
- 'value' => get_post_meta( $post->ID, 'rtslider_link', true ),
- 'html' => "<input type='text' class='text rtslider_link' value='" . get_post_meta( $post->ID, 'rtslider_link', true ) . "' /><br />",
- );
- $form_fields['cta_button'] = array(
- 'label' => __( 'Call To Action Button', 'rt-slider'),
- 'helps' => __( 'Enter the text to be displayed in Call To Action Button', 'rt-slider' ),
- 'input' => 'text',
- 'html' => "<input type='text' class='text cta_button' value='" . get_post_meta( $post->ID, 'cta_button', true ) . "' /><br />",
- 'value' => get_post_meta( $post->ID, 'cta_button', true )
- );
- // We return the completed $form_fields array
- return $form_fields;
- }
Add Comment
Please, Sign In to add comment