Exemplo n.º 1
0
 /**
  * Removes a previously set slide custom image
  */
 public function remove_slide_image()
 {
     $action = $this->get_action_data('remove_slide_image');
     check_ajax_referer($action['nonce']['action'], $action['nonce']['name']);
     $post_id = isset($_POST['post_id']) ? absint($_POST['post_id']) : -1;
     if (!current_user_can('edit_fa_items', $post_id)) {
         wp_die(-1);
     }
     // update the image option
     fa_update_slide_options($post_id, array('image' => ''));
     ob_start();
     // get the image output
     the_fa_slide_image($post_id);
     // capture the output
     $output = ob_get_clean();
     wp_send_json_success($output);
     die;
 }
Exemplo n.º 2
0
_e('Background color', 'fapro');
?>
:</label></th>
			<td>
				<?php 
fa_option_not_available();
?>
			</td>
		</tr>
		<?php 
if ('attachment' != $post->post_type) {
    ?>
		<tr>
			<th valign="top"><label for="slide_image"><?php 
    _e('Slide image', 'fapro');
    ?>
:</label></th>
			<td>
				<?php 
    the_fa_slide_image($post->ID);
    ?>
			
			</td>
		</tr>
		<?php 
}
?>
				
	</tbody>
</table>