Skip to content

Commit

Permalink
Added welcome message, removed search bar, fixed shortcode display in…
Browse files Browse the repository at this point in the history
… table
  • Loading branch information
manderly committed Jun 23, 2019
1 parent fb5c537 commit bd71548
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function column_default( $item, $column_name ) {
return 'Name here'; //$item->post_title;

case 'shortcode':
return $item->ID;
return '[amazin-product-box id="'.$item->ID.'"]';

case 'author':
return get_the_author_meta( 'display_name', $item->post_author );;
Expand Down Expand Up @@ -99,7 +99,7 @@ function column_name($item){
*/
function get_sortable_columns() {
$sortable_columns = array(
'name' => array( 'name', true ),
'name' => array( 'post_title', true ),
);

return $sortable_columns;
Expand Down
5 changes: 3 additions & 2 deletions amazin-product-box/includes/views/product-box-list.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<div class="wrap">
<h2><?php _e( 'Amazin\' Product Boxes', 'apb' ); ?> <a href="<?php echo admin_url( 'admin.php?page=amazinProductBox&action=new' ); ?>" class="add-new-h2"><?php _e( 'Add New', 'apb' ); ?></a></h2>

<div class="notice notice-info not-dismissible">
<p><strong>Welcome!</strong><br>This is your list of product boxes. Here you can create, edit, and manage your product boxes. Copy and paste a shortcode into the editor to add a product box to your post.</p>
</div>
<form method="get">
<input type="hidden" name="page" value="<?php echo $_REQUEST['page'] ?>"/> <!-- value="ttest_list_table">-->

Expand All @@ -14,7 +16,6 @@
}
echo $message;

$list_table->search_box( 'search', 'search_id' );
$list_table->display();
?>
</form>
Expand Down

0 comments on commit bd71548

Please sign in to comment.