Skip to content
Permalink
Browse files

Added welcome message, removed search bar, fixed shortcode display in…

… table
  • Loading branch information...
MJGrant committed Jun 23, 2019
1 parent fb5c537 commit bd71548d03eb5c2e638ab0c6aff62cfd9d7f5aaa
@@ -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 );;
@@ -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;
@@ -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">-->

@@ -14,7 +16,6 @@
}
echo $message;
$list_table->search_box( 'search', 'search_id' );
$list_table->display();
?>
</form>

0 comments on commit bd71548

Please sign in to comment.
You can’t perform that action at this time.