Guest User

Untitled

a guest
Jul 11th, 2018
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.33 KB | None | 0 0
  1. public function applyFilter( $form_fields, $post ) {
  2.        
  3.         $form_fields['post_title']  =   array(
  4.             'label' => __('Title', 'rt-slider'),
  5.             'html'  =>  "<input type='text' class='text slide_url' value='" . get_the_title( $post->ID ) . "' /><br />",
  6.             'input' => 'text',
  7.         );
  8.        
  9.         $form_fields['post_content']    =   array(
  10.             'label' => __('Description', 'rt-slider'),
  11.             'html'  => "<textarea style='width: 100%'></textarea>",
  12.             'value' => $post->post_content
  13.         );
  14.        
  15.         $form_fields['rtslider_link']   =   array(
  16.             'label' =>  __( 'Slide link', 'rt-slider' ),
  17.             'helps' => __('Add the URL for the Slide', 'rt-slider' ),
  18.             'input' => 'text',
  19.             'value' => get_post_meta( $post->ID, 'rtslider_link', true ),
  20.             'html'  => "<input type='text' class='text rtslider_link' value='" . get_post_meta( $post->ID, 'rtslider_link', true ) . "' /><br />",
  21.         );
  22.        
  23.         $form_fields['cta_button']  =   array(
  24.             'label' => __( 'Call To Action Button', 'rt-slider'),
  25.             'helps' => __( 'Enter the text to be displayed in Call To Action Button', 'rt-slider' ),
  26.             'input' => 'text',
  27.             'html'  => "<input type='text' class='text cta_button' value='" . get_post_meta( $post->ID, 'cta_button', true ) . "' /><br />",
  28.             'value' => get_post_meta( $post->ID, 'cta_button', true )
  29.         );
  30.      
  31.         // We return the completed $form_fields array
  32.         return $form_fields;
  33.     }
Add Comment
Please, Sign In to add comment