function wpv_manage_views_table_row($column_name, $post_id) { static $quick_edit_removed = false; $wpv_options = get_option('wpv_options'); switch ($column_name) { case 'wpv_query': // DEPRECATED $summary = wpv_create_content_summary_for_listing($post_id); echo $summary; break; case 'wpv_filter': // DEPRECATED //$wpv_layout_settings = get_post_meta($post_id, '_wpv_layout_settings', true); // var_dump($wpv_layout_settings); $summary = wpv_create_summary_for_listing($post_id); echo $summary; break; case 'wpv_display': // DEPRECATED $wpv_layout_settings = get_post_meta($post_id, '_wpv_layout_settings', true); echo wpv_get_layout_label_by_slug($wpv_layout_settings); break; case 'wpv_fields': echo wpv_get_view_template_fields_list($post_id); break; case 'wpv_default': echo wpv_get_view_template_defaults($wpv_options, $post_id); break; default: } switch ($column_name) { // DEPRECATED case 'wpv_query': case 'wpv_fields': // Let's disable the quick edit at this point as well. // This should probaby be done in a JS file but I don't think // we have one for the Views list page. if (!$quick_edit_removed) { ?> <script type="text/javascript"> jQuery(document).ready(function(){ jQuery('.editinline').parent().hide(); }); </script> <?php $quick_edit_removed = true; } } }
/** * DEPRECATED. * * This is not used anywhere in Views. */ function wpv_admin_menu_views_listing_row($post_id) { ob_start(); $post = get_post($post_id); $meta = get_post_meta($post_id, '_wpv_settings'); $view_description = get_post_meta($post_id, '_wpv_description', true); ?> <tr id="wpv_view_list_row_<?php echo $post->ID; ?> " class="js-wpv-view-list-row"> <td class="post-title page-title column-title"> <span class="row-title"> <a href="admin.php?page=views-editor&view_id=<?php echo $post->ID; ?> "><?php echo $post->post_title; ?> </a> </span> <?php if (isset($view_description) && '' != $view_description) { ?> <p class="desc"> <?php echo nl2br($view_description); ?> </p> <?php } ?> </td> <td> <?php echo wpv_create_content_summary_for_listing($post->ID); ?> </td> <td> <select class="js-views-actions" name="list_views_action_<?php echo $post->ID; ?> " id="list_views_action_<?php echo $post->ID; ?> " data-view-id="<?php echo $post->ID; ?> "> <option value="0"><?php _e('Choose', 'wpv-views'); ?> …</option> <option value="delete"><?php _e('Delete', 'wpv-views'); ?> </option> <option value="duplicate"><?php _e('Duplicate', 'wpv-views'); ?> </option> </select> </td> <td> <button class="button js-scan-button" data-view-id="<?php echo $post->ID; ?> "><?php _e('Scan', 'wp-views'); ?> </button> <span class="js-nothing-message hidden"><?php _e('Nothing found', 'wpv-views'); ?> </span> </td> <td> <?php echo get_the_time(get_option('date_format'), $post->ID); ?> </td> </tr> <?php $row = ob_get_contents(); ob_end_clean(); return $row; }