db_obj->get_items(); $all_items = CBFunctions()->get_all_charts_count(); $chart_count_per_page = count($items) > 0 ? $all_items/$this->db_obj->get_pagination_count() : 0; $chart_paged = isset($_GET['paged']) && $_GET['paged'] != '' ? absint( sanitize_text_field($_GET['paged'])) : ''; $search = $this->db_obj->get_search_value(); $chart_max_id = Chart_Builder_Admin::get_max_id('charts'); $this->settings_obj = new Chart_Builder_Settings_DB_Actions($this->plugin_name); $chart_title_length = $this->settings_obj->get_listtables_title_length(); $filter_by_type = (isset($_GET['filterbytype']) && $_GET['filterbytype'] != "") ? intval(sanitize_text_field($_GET['filterbytype'])) : ''; $filter_by_source = (isset($_GET['filterbysource']) && $_GET['filterbysource'] != "") ? intval(sanitize_text_field($_GET['filterbysource'])) : ''; $filter_by_chart_source = (isset($_GET['filterbychartsource']) && $_GET['filterbychartsource'] != "") ? intval(sanitize_text_field($_GET['filterbychartsource'])) : ''; $filter_by_date = (isset($_GET['filterbydate']) && $_GET['filterbydate'] != "") ? sanitize_text_field($_GET['filterbydate']) : ''; $order_by = (isset($_GET['orderby']) && $_GET['orderby'] != "") ? sanitize_text_field($_GET['orderby']) : ''; $order = (isset($_GET['order']) && $_GET['order'] != "") ? sanitize_text_field($_GET['order']) : 'desc'; $chart_types = array( "Line Chart", "Bar Chart", "Pie Chart", "Column Chart", "Org Chart", "Donut Chart", ); $chart_sources = array( "Manual", "Quiz Maker", "File Import", "Google Sheet", "Database Query", "Woocommerce", ); $chart_source_types = array( "Google Charts", "Chart.js", ); $chart_dates = array( 'today' => __("Today", "chart-builder"), 'yesterday' => __("Yesterday", "chart-builder"), 'last_week' => __("Last Week", "chart-builder"), 'last_month' => __("Last Month", "chart-builder"), 'last_year' => __("Last Year", "chart-builder"), ); $order_by_values = array( 'title' => __("Title", "chart-builder"), 'date_created' => __("Date created", "chart-builder"), 'date_modified' => __("Date modified", "chart-builder"), ); $order_values = array( 'asc' => __("Ascending", "chart-builder"), 'desc' => __("Descending", "chart-builder"), ); $filter_by_author_data = $this->db_obj->get_searched_author_info(); $plus_icon_svg = ""; $youtube_icon_svg = ""; ?>

%s ' . __( 'Add New', "chart-builder" ) . '', esc_attr( $_REQUEST['page'] ), 'add', $plus_icon_svg); ?>
$item ): ?>
plugin_name . '-delete-item' ); }else{ $delete_nonce = wp_create_nonce( $this->plugin_name . '-trash-item' ); } $publish_nonce = wp_create_nonce( $this->plugin_name . '-publish-item' ); $unpublish_nonce = wp_create_nonce( $this->plugin_name . '-unpublish-item' ); $duplicate_nonce = wp_create_nonce( $this->plugin_name . '-duplicate-item' ); $chart_title = stripcslashes( $item['title'] ); $q = esc_attr( $chart_title ); $restitle = Chart_Builder_Admin::ays_restriction_string("word", $chart_title, $chart_title_length); $title = sprintf( '%s', esc_attr( $_REQUEST['page'] ), 'edit', absint( $item['id'] ), $q, $restitle); $actions = array(); if($item['status'] == 'trashed'){ $title = sprintf( '%s', $restitle ); $actions['restore'] = sprintf( ''. __('Restore', "chart-builder") .'', esc_attr( $_REQUEST['page'] ), 'restore', absint( $item['id'] ), $delete_nonce ); $actions['delete'] = sprintf( ''. __('Delete Permanently', "chart-builder") .'', $restitle, esc_attr( $_REQUEST['page'] ), 'delete', absint( $item['id'] ), $delete_nonce ); }else{ $actions['edit'] = sprintf( '', esc_attr( $_REQUEST['page'] ), 'edit', absint( $item['id'] ) ); $draft_text = ''; if( $item['status'] == 'draft' && !( isset( $_GET['fstatus'] ) && $_GET['fstatus'] == 'draft' )){ $draft_text = ' — ' . '' . __( "Draft", "chart-builder" ) . ''; $actions['publish'] = sprintf( '', esc_attr( $_REQUEST['page'] ), 'publish', absint( $item['id'] ), $publish_nonce ); } else { $actions['unpublish'] = sprintf( '', esc_attr( $_REQUEST['page'] ), 'unpublish', absint( $item['id'] ), $unpublish_nonce ); } $title = sprintf( '%s%s', esc_attr( $_REQUEST['page'] ), 'edit', absint( $item['id'] ), $q, $restitle, $draft_text ); $actions['duplicate'] = sprintf( '', esc_attr( $_REQUEST['page'] ), 'duplicate', absint( $item['id'] ), $duplicate_nonce ); $actions['delete'] = sprintf( '', esc_attr( $_REQUEST['page'] ), 'delete', absint( $item['id'] ), $delete_nonce ); } echo wp_kses_post($title); echo '

'; foreach ( $actions as $action => $action_html ){ $link_class = ''; // if( $action == 'delete' ){ // $link_class = 'link-danger'; // } echo '' . $action_html . ''; } echo '

'; ?>
"; echo "" . __('Line Chart', $this->plugin_name) . "

"; break; case 'bar_chart': echo "

"; echo "" . __('Bar Chart', "chart-builder") . "

"; break; case 'pie_chart': echo "

"; echo "" . __('Pie Chart', "chart-builder") . "

"; break; case 'column_chart': echo "

"; echo "" . __('Column Chart', "chart-builder") . "

"; break; case 'donut_chart': echo "

"; echo "" . __('Donut Chart', "chart-builder") . "

"; break; case 'org_chart': echo "

"; echo "" . __('Org Chart', $this->plugin_name) . "

"; break; } ?>
" . __('Quiz Maker', $this->plugin_name) . ""; break; case 'manual': default: echo "" . __('Manual', $this->plugin_name) . ""; break; } ?> " . __('Chart.js', $this->plugin_name) . ""; break; case 'google-charts': default: echo "" . __('Google Charts', $this->plugin_name) . ""; break; } ?>
">
" />
data->display_name; echo esc_html($author_name); } else { echo ''.__('Deleted user', 'chart-builder').''; } ?> " . $status . "

"; echo wp_kses_post( $html ); ?>
" . $date . "

"; echo wp_kses_post( $html ); ?>
1):?>

%s ' . __( 'Add New', "chart-builder" ) . '', esc_attr( $_REQUEST['page'] ), 'add', $plus_icon_svg); ?>

plugin_name ); ?>

plugin_name ); ?>
%s ' . __('Add New', $this->plugin_name) . '', esc_attr( $_REQUEST['page'] ), 'add', $plus_icon_svg);?>