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; } } }
function register_modules_view_templates_items($items) { $viewtemplates = $this->get_view_templates(); $wpv_options = get_option('wpv_options'); foreach ($viewtemplates as $view) { $summary = ''; $used_as = wpv_get_view_template_defaults($wpv_options, $view->ID); if ($used_as != '<div class="view_template_default_box"></div>') { $summary .= '<h5>' . __('How this Content Template is used', 'wpv-views') . '</h5><p>' . $used_as . '</p>'; } $fields_used = wpv_get_view_template_fields_list($view->ID); if ($fields_used != '<div class="view_template_fields_box"></div>') { $summary .= '<h5>' . __('Fields used', 'wpv-views') . '</h5><p>' . $fields_used . '</p>'; } if ('' == $summary) { $summary = '<p>' . __('Content template', 'wpv-views') . '</p>'; } $items[] = array('id' => _VIEW_TEMPLATES_MODULE_MANAGER_KEY_ . $view->ID, 'title' => $view->post_title, 'details' => '<div style="padding:0 5px 5px;">' . $summary . '</div>'); } return $items; }
function register_modules_view_templates_items( $items ) { global $WPV_settings; $viewtemplates = $this->get_view_templates(); foreach ( $viewtemplates as $view ) { $summary = ''; $used_as = wpv_get_view_template_defaults( $WPV_settings, $view->ID ); if ( ! empty( $used_as ) ) { $summary .= '<h5>' . __('How this Content Template is used', 'wpv-views') . '</h5><p>' . $used_as . '</p>'; } $description = get_post_meta( $view->ID, '_wpv-content-template-decription', true ); if ( ! empty( $description ) ) { $summary .= '<h5>' . __('Description', 'wpv-views') . '</h5><p>' . $description . '</p>'; } if ( empty( $summary ) ) { $summary = '<p>' . __('Content template', 'wpv-views') . '</p>'; } $items[] = array( 'id' => _VIEW_TEMPLATES_MODULE_MANAGER_KEY_ . $view->ID, 'title' => esc_html( $view->post_title ), 'details' => '<div style="padding:0 5px 5px;">' . $summary . '</div>' ); } return $items; }