Skip to content

Commit

Permalink
Merge pull request #298 from codersaiful/3.4.2.2
Browse files Browse the repository at this point in the history
3.4.2.2
  • Loading branch information
codersaiful committed Aug 19, 2023
2 parents 43dc3f1 + bdbc68a commit 2d8bf74
Show file tree
Hide file tree
Showing 50 changed files with 4,491 additions and 862 deletions.
1,965 changes: 1,510 additions & 455 deletions admin/action-hook.php

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions admin/admin-enqueue.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ function wpt_admin_enqueue(){
* @since 3.1.8.2
*/
wp_enqueue_style( 'wpt-fontello', WPT_Product_Table::getPath('BASE_URL') . 'assets/fontello/css/fontello.css', array(), WPT_Product_Table::getVersion(), 'all' );
wp_enqueue_style( 'wpt-fontello-animate', WPT_Product_Table::getPath('BASE_URL') . 'assets/fontello/css/animation.css', array(), WPT_Product_Table::getVersion(), 'all' );


/**
Expand Down
24 changes: 23 additions & 1 deletion admin/admin-loader.php
Original file line number Diff line number Diff line change
@@ -1,22 +1,44 @@
<?php
namespace WOO_PRODUCT_TABLE\Admin;

use WOO_PRODUCT_TABLE\Admin\Page_Loader;
use WOO_PRODUCT_TABLE\Core\Base;
use WOO_PRODUCT_TABLE\Admin\Handle\Tracker;
use WOO_PRODUCT_TABLE\Admin\Handle\Feature_Loader;
use WOO_PRODUCT_TABLE\Admin\Handle\Pro_Version_Update;
use WOO_PRODUCT_TABLE\Admin\Handle\Deactive_Form as Old_Deactive_Form;
use WOO_PRODUCT_TABLE\Admin\Handle\Plugin_Deactive\Deactive_Form;
class Admin_Loader extends Base{
public function __construct(){


$main_page = new Page_Loader();
$main_page->run();



$deactive_form = new Deactive_Form();
$deactive_form->run();

/**
* This is only for Notice for pro user,
* Actually on free version and pro version combination
* need min request pro for latest free version,
* that's why, we have added this notice.
*/
$pro_update_ntc = new Pro_Version_Update();
$pro_update_ntc->run();

$features = new Feature_Loader();
$features->run();


add_action('admin_init', [$this, 'admin_init']);
}

public function admin_init(){

$tracker = new Tracker();
$tracker->run();

}
}
4 changes: 2 additions & 2 deletions admin/configuration_page.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php


//##Unused totally unused page
if( !function_exists( 'wpt_configuration_page' ) ){
/**
* For Configuration Page
Expand Down Expand Up @@ -65,7 +65,7 @@ function ($field){
<?php
// do_action( 'wpt_offer_here' );
?>
<form action="" method="POST">
<form action="" method="POST" id="wpt-main-configuration-form">

<?php
/**
Expand Down
6 changes: 3 additions & 3 deletions admin/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ function wpt_datewise_validation(){
$prev_args = array(
'post_type' => 'wpt_product_table',
'date_query' => array(
'before' => '2022-3-15'
'before' => '2022-3-15' //2022-3-15 //2014-3-15
),
);

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

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

/**
Expand Down Expand Up @@ -399,7 +399,7 @@ function wpt_add_tabs(){

}
}
add_action( 'current_screen', 'wpt_add_tabs', 50 );
// add_action( 'current_screen', 'wpt_add_tabs', 50 );

function wpt_social_links(){
?>
Expand Down
7 changes: 7 additions & 0 deletions admin/handle/feature-loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ class Feature_Loader
{
public function run()
{
/**
* It's Admin panel Table's Action column feature
* Actually adding third-party plugin supported feature
* checkbox added by this Class/Object.
*
* @author Saiful Islam <codersaiful@gmail.com>
*/
$action = new Action_Feature();
$action->run();
}
Expand Down
13 changes: 11 additions & 2 deletions admin/handle/plugin-deactive/deactive-form.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class Deactive_Form
protected $assignScreen = false;
protected $screen;
protected $screenID;
public $dev_version = '1.0.0';
public $dev_version = WPT_DEV_VERSION;

protected $form_top_message;

Expand Down Expand Up @@ -211,6 +211,11 @@ public function form()
$site_url = get_site_url();
$blog_name = get_bloginfo( 'name' );
$plugin_name = $this->data['name'] ?? 'CA Plugin';
$email = '';
if(function_exists('wp_get_current_user')){
$current_user = wp_get_current_user();
// $email = $current_user->user_email; //Has been removed
}
?>
<div id="<?php echo esc_attr( $this->prefix ); ?>-survey-form-wrap" class="ca-survey-form-wrap">
<div id="<?php echo esc_attr( $this->prefix ); ?>-survey-form" class="ca-survey-form">
Expand All @@ -231,11 +236,15 @@ public function form()
<p>For support queries <a href="<?php echo esc_url( $this->support_url ); ?>" target="_blank">Submit Ticket</a></p>
</div>
<div class="ca-email common-target" style="display:none;">
<input type="email" id="ca_email" name="Email" value="" placeholder="(Optional) Please write your email, We will contact with you.">
<input type="email" id="ca_email" name="Email" value="<?php echo esc_attr( $email ); ?>" placeholder="(Optional) Please write your email, We will contact with you.">
</div>
<div class="ca-display-message common-target" style="display:none;" data-target_msg="<?php echo esc_attr( $this->common_target_msg ); ?>">
<?php echo wp_kses_post( $this->common_target_msg ); ?>
</div>
<p style="color: #5c5c5c;padding:0;margin: 0 0 8px 0;font-size: 13px;">
Submission will send some basic data to Plugin Author as a servey.
Such: <b>your site url, site title, this plugin version</b> etc. <i>You can <b>Skip & Deactivate</b> by click skip button.</i>
</p>
<div class="ca-msg-button-wrapper">
<button type="submit" class="ca_button ca-deactive ca-submit-form" id="ca_deactivate">Submit & Deactivate</button>
<a href="#" class="ca_button ca_cancel" id="ca_cancel">Keep</a>
Expand Down
6 changes: 4 additions & 2 deletions admin/handle/plugin-deactive/message.css
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ div.ca-survey-form p.motivational-speek {
display: flex;
gap: 10px;
align-items: center;
justify-content: space-around;
}
.ca-survey-form .ca_button {
margin: 0;
Expand Down Expand Up @@ -70,10 +71,11 @@ div.ca-survey-form p.motivational-speek {
float: left;
}
.ca-survey-form .ca_button#ca_skip {
background: #9e9e9e;
background: #9e9e9e52;
border: none;
color: #ffffff;
font-weight: normal;
margin-left: auto;
}
.ca-survey-form .ca_button#ca_skip:hover {
background: #2a2929;
Expand Down Expand Up @@ -106,7 +108,7 @@ div.ca-survey-form p.motivational-speek {
background-color: #0093b8;
line-height: 1.14285714;
}
.ca-email.common-target input {
.common-target input {
width: 100%;
margin-bottom: 10px;
}
Expand Down
2 changes: 1 addition & 1 deletion admin/handle/pro-version-update.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* @author Saiful Islam <codersaiful@gmail.com>
*/
class Pro_Version_Update{
protected $request_min_pro = '8.1.7';
protected $request_min_pro = '8.2.4';
public function run(){
if( ! defined( 'WPT_PRO_DEV_VERSION' ) ) return;

Expand Down

0 comments on commit 2d8bf74

Please sign in to comment.