/home/desid573/verdenaturopathy.com.au/site3/wp-content/plugins/popup-builder/com/libs
NameSizeModeActions
EDD_SL_Plugin_Updater.php146610644editdlrm
Importer.php426140644editdlrm
ListTable.php368650644editdlrm
parsers.php245310644editdlrm
Reports.php28930644editdlrm
Table.php97140644editdlrm
Edit: /home/desid573/verdenaturopathy.com.au/site3/wp-content/plugins/popup-builder/com/libs/Table.php (9714B)
id = $id; $this->previewPopup = $popupPreviewId; parent::__construct(array( 'singular'=> 'wp_'.$id, //singular label 'plural' => 'wp_'.$id.'s', //plural label 'ajax' => false )); } public function setId($id) { $this->id = $id; } public function setRowsPerPage($rowsPerPage) { $this->rowsPerPage = $rowsPerPage; } public function setColumns($columns) { $this->columns = $columns; } public function getColumns() { return $this->columns; } public function setDisplayColumns($displayColumns) { $this->displayColumns = $displayColumns; } public function setSortableColumns($sortableColumns) { $this->sortableColumns = $sortableColumns; } public function setTablename($tablename) { $this->tablename = $tablename; } public function setInitialSort($orderableColumns) { $this->initialOrder = $orderableColumns; } public function get_columns() { return $this->displayColumns; } public function setIsVisibleExtraNav($isVisibleExtraNav) { $this->isVisibleExtraNav = $isVisibleExtraNav; } public function getIsVisibleExtraNav() { return $this->isVisibleExtraNav; } public function getNavPopupsConditions() { return ''; } public function prepare_items() { global $wpdb; $table = $this->tablename; $query = 'SELECT '.implode(', ', $this->columns).' FROM '.$table; $this->customizeQuery($query); $totalItems = count($wpdb->get_results($query)); //return the total number of affected rows if ($this->previewPopup) { $totalItems -= 1; } $perPage = $this->rowsPerPage; $totalPages = ceil($totalItems/$perPage); $orderby = isset($_GET['orderby']) ? sanitize_sql_orderby($_GET['orderby']) : 'ASC'; $order = isset($_GET['order']) ? sanitize_sql_orderby($_GET['order']) : ''; if (isset($this->initialOrder) && empty($order)) { foreach ($this->initialOrder as $key => $value) { $order = $value; $orderby = $key; } } if (!empty($orderby) && !empty($order)) { $query .= ' ORDER BY '.$orderby.' '.$order; } $paged = isset($_GET["paged"]) ? (int)$_GET["paged"] : ''; if (empty($paged) || !is_numeric($paged) || $paged <= 0) { $paged = 1; } //adjust the query to take pagination into account if (!empty($paged) && !empty($perPage)) { $offset = ($paged - 1) * $perPage; $query .= ' LIMIT '.(int)$offset.','.(int)$perPage; } $this->set_pagination_args(array( "total_items" => $totalItems, "total_pages" => $totalPages, "per_page" => $perPage, )); $columns = $this->get_columns(); $hidden = array(); $sortable = $this->get_sortable_columns(); $this->_column_headers = array($columns, $hidden, $sortable); $items = $wpdb->get_results($query, ARRAY_N); /*Remove popup data when its class does not exist.*/ $this->customizeRowsData($items); $this->items = $items; } public function customizeRowsData(&$items) { } public function get_sortable_columns() { return $this->sortableColumns; } public function display_rows() { //get the records registered in the prepare_items method $records = $this->items; //get the columns registered in the get_columns and get_sortable_columns methods list($columns, $hidden) = $this->get_column_info(); foreach($records as $key => $rec) { echo ''; $this->customizeRow($rec); foreach ($rec as $k => $item) { if (0 === $k) { echo ''.$item.''; } else { echo ''.stripslashes($item).''; } } echo ''; } } public function customizeRow(&$row) { } public function customizeQuery(&$query) { } public function __toString() { $this->prepare_items(); ?>
display();?>
getIsVisibleExtraNav(); if (!$isVisibleExtraNav) { return ''; } ?>
getNavPopupsConditions(); ?> getNavDateConditions(); ?>
has_items() ) return; $input_id = $input_id . '-search-input'; if ( ! empty( $_REQUEST['orderby'] ) ) echo ''; if ( ! empty( $_REQUEST['order'] ) ) echo ''; if ( ! empty( $_REQUEST['post_mime_type'] ) ) echo ''; if ( ! empty( $_REQUEST['detached'] ) ) echo ''; ?> _args['singular']; $this->display_tablenav( 'top' ); ?> print_column_headers(); ?> > display_rows_or_placeholder(); ?>
display_tablenav( 'bottom' ); } public function display_rows_or_placeholder() { if ( $this->has_items() ) { $this->display_rows(); } else { echo ''; $this->no_items(); echo ''; } } public function no_items() { _e( 'No items found.' ); } public function has_items() { return !empty( $this->items ); } public function print_column_headers( $with_id = true ) { list( $columns, $hidden, $sortable, $primary ) = $this->get_column_info(); $current_url = set_url_scheme( 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] ); $current_url = remove_query_arg( 'paged', $current_url ); if ( isset( $_GET['orderby'] ) ) $current_orderby = sanitize_text_field($_GET['orderby']); else $current_orderby = ''; if ( isset( $_GET['order'] ) && 'desc' == $_GET['order'] ) $current_order = 'desc'; else $current_order = 'asc'; /* TODO check this part of code in each imported table file */ /*if ( ! empty( $columns['bulk'] ) ) { static $cb_counter = 1; $columns['bulk'] = '' . ''; $cb_counter++; }*/ foreach ( $columns as $column_key => $column_display_name ) { $class = array( 'manage-column', "column-$column_key", 'table__head' ); if ( in_array( $column_key, $hidden ) ) { $class[] = 'hidden'; } if ( 'bulk' == $column_key ) $class[] = 'check-column'; elseif ( in_array( $column_key, array( 'posts', 'comments', 'links' ) ) ) $class[] = 'num'; if ( $column_key === $primary ) { $class[] = 'column-primary'; } if ( isset( $sortable[$column_key] ) ) { list( $orderby, $desc_first ) = $sortable[$column_key]; if ( $current_orderby == $orderby ) { $order = 'asc' == $current_order ? 'desc' : 'asc'; $class[] = 'sorted'; $class[] = $current_order; } else { $order = $desc_first ? 'desc' : 'asc'; $class[] = 'sortable'; $class[] = $desc_first ? 'asc' : 'desc'; } $column_display_name = '' . $column_display_name . ''; } $tag = ( 'bulk' === $column_key ) ? 'td' : 'th'; $scope = ( 'th' === $tag ) ? 'scope="col"' : ''; $id = $with_id ? "id='$column_key'" : ''; if ( !empty( $class ) ) $class = "class='" . join( ' ', $class ) . "'"; echo "<$tag $scope $id $class>$column_display_name"; } } }