Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.1.0.1 #182

Merged
merged 17 commits into from
Mar 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions admin/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ function wpt_datewise_validation(){
$prev_args = array(
'post_type' => 'wpt_product_table',
'date_query' => array(
'before' => '2021-10-14'
'before' => '2022-3-15'
),
);

Expand All @@ -160,7 +160,7 @@ function wpt_datewise_validation(){
$query = new WP_Query( $args );
$total = $query->found_posts;

return $total <= 4; //Limitation upto 4
return $total <= 2; //Limitation upto 4 //limitation has changed upto 2
}

/**
Expand Down
Binary file removed admin/notice/offeres/images/Black-Friday.png
Binary file not shown.
Binary file removed admin/notice/offeres/images/Cyber-Monday-Offer.png
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions admin/notice/offeres/offer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"offer": {
"status": false,
"target_function": "prepend",
"target_link": "https://codecanyon.net/item/woo-product-table-pro/20676867",
"target_link": "https://1.envato.market/e4Jjvz",
"image_url": "https://raw.githubusercontent.com/codersaiful/woo-product-table/master/admin/notice/offeres/images/Black-Friday.png",
"display_to": "#wpbody-content",
"display_wrapper": ".wpt_admin_body",
Expand All @@ -19,7 +19,7 @@
"notice": {
"status": false,
"target_function": "append",
"target_link": "https://codecanyon.net/item/woo-product-table-pro/20676867",
"target_link": "https://1.envato.market/e4Jjvz",
"image_url": "https://raw.githubusercontent.com/codersaiful/woo-product-table/master/admin/notice/offeres/images/Black-Friday.png",
"display_to": "#wpbody-content",
"display_wrapper": ".wpt_admin_body",
Expand Down
28 changes: 22 additions & 6 deletions admin/tabs/conditions.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php
$meta_conditions = get_post_meta( $post->ID, 'conditions', true );
$access = wpt_user_can_edit();

?>
<div class="section ultraaddons-panel">
<div class="wpt_column">
Expand Down Expand Up @@ -30,22 +32,36 @@
<select name="conditions[sort_order_by]" data-name='sort_order_by' id="wpt_table_sort_order_by" class="wpt_fullwidth wpt_data_filed_atts ua_input" >
<option value="name" <?php echo isset( $meta_conditions['sort_order_by'] ) && $meta_conditions['sort_order_by'] == 'name' ? 'selected' : ''; ?>><?php esc_html_e( 'Name (Default)', 'wpt_pro' ); ?></option>
<option value="menu_order" <?php echo isset( $meta_conditions['sort_order_by'] ) && $meta_conditions['sort_order_by'] == 'menu_order' ? 'selected' : ''; ?>><?php esc_html_e( 'Menu Order', 'wpt_pro' ); ?></option> <!-- default menu_order -->
<option value="title" <?php echo isset( $meta_conditions['sort_order_by'] ) && $meta_conditions['sort_order_by'] == 'title' ? 'selected' : ''; ?>><?php esc_html_e( 'Product Title', 'wpt_pro' ); ?></option>

<option value="date" <?php echo isset( $meta_conditions['sort_order_by'] ) && $meta_conditions['sort_order_by'] == 'date' ? 'selected' : ''; ?>><?php esc_html_e( 'Date', 'wpt_pro' ); ?></option>
<option value="meta_value" <?php echo isset( $meta_conditions['sort_order_by'] ) && $meta_conditions['sort_order_by'] == 'meta_value' ? 'selected' : ''; ?>><?php esc_html_e( 'Custom Meta Value', 'wpt_pro' ); ?></option>


<?php
if( $access ){
?>
<option value="meta_value_num" <?php echo isset( $meta_conditions['sort_order_by'] ) && $meta_conditions['sort_order_by'] == 'meta_value_num' ? 'selected' : ''; ?>><?php esc_html_e( 'Custom Meta Number (if numeric data)', 'wpt_pro' ); ?></option>
<option value="date" <?php echo isset( $meta_conditions['sort_order_by'] ) && $meta_conditions['sort_order_by'] == 'date' ? 'selected' : ''; ?>><?php esc_html_e( 'Date', 'wpt_pro' ); ?></option>

<option value="ID" <?php echo isset( $meta_conditions['sort_order_by'] ) && $meta_conditions['sort_order_by'] == 'ID' ? 'selected' : ''; ?>><?php esc_html_e( 'ID', 'wpt_pro' ); ?></option>

<option value="author" <?php echo isset( $meta_conditions['sort_order_by'] ) && $meta_conditions['sort_order_by'] == 'author' ? 'selected' : ''; ?>><?php esc_html_e( 'Author', 'wpt_pro' ); ?></option>
<option value="title" <?php echo isset( $meta_conditions['sort_order_by'] ) && $meta_conditions['sort_order_by'] == 'title' ? 'selected' : ''; ?>><?php esc_html_e( 'Product Title', 'wpt_pro' ); ?></option>


<option value="type" <?php echo isset( $meta_conditions['sort_order_by'] ) && $meta_conditions['sort_order_by'] == 'type' ? 'selected' : ''; ?>><?php esc_html_e( 'Type', 'wpt_pro' ); ?></option>

<option value="modified" <?php echo isset( $meta_conditions['sort_order_by'] ) && $meta_conditions['sort_order_by'] == 'modified' ? 'selected' : ''; ?>><?php esc_html_e( 'Modified', 'wpt_pro' ); ?></option>
<option value="parent" <?php echo isset( $meta_conditions['sort_order_by'] ) && $meta_conditions['sort_order_by'] == 'parent' ? 'selected' : ''; ?>><?php esc_html_e( 'Parent', 'wpt_pro' ); ?></option>

<option value="rand" <?php echo isset( $meta_conditions['sort_order_by'] ) && $meta_conditions['sort_order_by'] == 'rand' ? 'selected' : ''; ?>><?php esc_html_e( 'Rand', 'wpt_pro' ); ?></option>

<?php }else{ ?>
<option disabled>Custom Meta Number(Pro)</option>
<option disabled>Author(Pro)</option>
<option disabled>Type(Pro)</option>
<option disabled>Modified(Pro)</option>
<option disabled>Rand(Pro)</option>
<?php } ?>
<option value="parent" <?php echo isset( $meta_conditions['sort_order_by'] ) && $meta_conditions['sort_order_by'] == 'parent' ? 'selected' : ''; ?>><?php esc_html_e( 'Parent', 'wpt_pro' ); ?></option>
<option value="comment_count" <?php echo isset( $meta_conditions['sort_order_by'] ) && $meta_conditions['sort_order_by'] == 'comment_count' ? 'selected' : ''; ?>><?php esc_html_e( 'Reviews/Comment Count', 'wpt_pro' ); ?></option>
<option value="relevance" <?php echo isset( $meta_conditions['sort_order_by'] ) && $meta_conditions['sort_order_by'] == 'relevance' ? 'selected' : ''; ?>><?php esc_html_e( 'Relevance', 'wpt_pro' ); ?></option>
<option value="ID" <?php echo isset( $meta_conditions['sort_order_by'] ) && $meta_conditions['sort_order_by'] == 'ID' ? 'selected' : ''; ?>><?php esc_html_e( 'ID', 'wpt_pro' ); ?></option>
<option value="none" <?php echo isset( $meta_conditions['sort_order_by'] ) && $meta_conditions['sort_order_by'] == 'none' ? 'selected' : ''; ?>><?php esc_html_e( 'None', 'wpt_pro' ); ?></option>
</select>
<p>Chose 'Custom_meta or custom_meta_value' - if you want to sort by price, model, sku, color itc. <b>For price or any number, Please chose <span>Custom Meta value(if number)</span></b></p>
Expand Down
16 changes: 16 additions & 0 deletions assets/css/admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -1490,4 +1490,20 @@ body.post-type-wpt_product_table #stick_on_scroll-on {
font-size: 17px;
font-weight: normal;
border-radius: 3px 8px 24px 7px;
}

.wpt-pro-only-featues.enable_gallery {
position: relative;
display: inline-block;
}
.wpt-pro-only-featues.enable_gallery:before {
content: 'Pro';
position: absolute;
right: -20px;
top: -13px;
background: #f44336;
border: 0 none;
font-size: 8px;
padding: 0 6px;
color: #fff;
}
Binary file added assets/images/pro-features/enable_gallery.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading