function register_modules_views_items($items) { $views = $this->get_views(); foreach ($views as $view) { $summary = ''; $view_settings = $this->get_view_settings($view->ID); if (!isset($view_settings['view-query-mode'])) { // Old views may not have this setting $view_settings['view-query-mode'] = 'normal'; } switch ($view_settings['view-query-mode']) { case 'normal': $summary .= '<h5>' . __('Content to load', 'wpv-views') . '</h5><p>' . apply_filters('wpv-view-get-content-summary', $summary, $view->ID, $view_settings) . '</p>'; $summary .= '<h5>' . __('Filter', 'wpv-views') . '</h5>'; $summary .= wpv_create_summary_for_listing($view->ID); break; case 'archive': case 'layout-loop': $summary .= '<h5>' . __('Content to load', 'wpv-views') . '</h5><p>' . __('This View displays results for an <strong>existing WordPress query</strong>', 'wpv-views') . '</p>'; break; } $items[] = array('id' => _VIEWS_MODULE_MANAGER_KEY_ . $view->ID, 'title' => $view->post_title, 'details' => '<div style="padding:0 5px 5px;">' . $summary . '</div>'); } return $items; }
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; } } }