Skip to content

Commit

Permalink
Merge pull request #90 from codersaiful/2.8.5.4
Browse files Browse the repository at this point in the history
2.8.5.4
  • Loading branch information
codersaiful authored Apr 29, 2021
2 parents 66ec180 + 7865fcd commit e9b399f
Show file tree
Hide file tree
Showing 5 changed files with 83 additions and 30 deletions.
2 changes: 1 addition & 1 deletion admin/action-hook.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function wpt_admin_form_top(){
GitHub Repo</a></li>
<li><a target="_blank" href="https://demo.wooproducttable.com/">Demo</a></li>
<li><a target="_blank" href="https://github.com/codersaiful/woo-product-table/discussions">Forum on Repo</a></li>
<li><a target="_blank" href="https://wooproducttable.com/docs/">Basic Helps</a></li>
<li><a target="_blank" href="https://wooproducttable.com/documentation/">Basic Helps</a></li>
<li><a target="_blank" href="https://docs.codeastrology.com/woo-product-table-pro/#intro">Documentation</a></li>
<li><a target="_blank" href="https://codeastrology.com/support/">Get Support</a></li>

Expand Down
18 changes: 12 additions & 6 deletions admin/tabs/column_settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,14 @@
<?php
$enabled_column_array = $enabled_column_array_name;

$availe_column_list_file = __DIR__ . '/inc-column/available-column-list.php';
include $availe_column_list_file;


$column_list_file = __DIR__ . '/inc-column/column-list.php';
include $column_list_file;

$availe_column_list_file = __DIR__ . '/inc-column/available-column-list.php';
include $availe_column_list_file;

?>
</div>

Expand All @@ -91,11 +94,13 @@
$tablet_header_file = __DIR__ . '/inc-column/tablet-header.php';
include $tablet_header_file;

$availe_column_list_file = __DIR__ . '/inc-column/available-column-list.php';
include $availe_column_list_file;

$column_list_file = __DIR__ . '/inc-column/column-list.php';
include $column_list_file;

$availe_column_list_file = __DIR__ . '/inc-column/available-column-list.php';
include $availe_column_list_file;

?>
</div>

Expand All @@ -110,11 +115,12 @@
$tablet_header_file = __DIR__ . '/inc-column/mobile-header.php';
include $tablet_header_file;

$availe_column_list_file = __DIR__ . '/inc-column/available-column-list.php';
include $availe_column_list_file;

$column_list_file = __DIR__ . '/inc-column/column-list.php';
include $column_list_file;

$availe_column_list_file = __DIR__ . '/inc-column/available-column-list.php';
include $availe_column_list_file;

?>
</div>
Expand Down
4 changes: 1 addition & 3 deletions admin/tabs/inc-column/available-column-list.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
<!-- Enable Active Collumn -->
<div class="add_switch_col_wrapper">
<div class="section ultraaddons-panel add_new_column">
<h3 class="with-background dark-background slim-title"><?php echo esc_html__( 'Column Activation', 'wpt_pro' ); ?> <small style="color: orange; font-size: 12px;"></small></h3>

<?php


Expand All @@ -21,7 +19,7 @@

?>
<div class="section enable-available-cols switch-enable-available">
<p><?php echo esc_html__( 'Activate your Preferred Column.', 'wpt_pro' ); ?></p>
<h2><?php echo esc_html__( 'Click from Following list to add as Column.', 'wpt_pro' ); ?></h2>
<ul id="wpt-switch-list">
<?php
foreach( $columns_array as $keyword => $title ){
Expand Down
44 changes: 29 additions & 15 deletions assets/css/admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ ul#wpt_keyword_hide_mobile
.wpt_mobile_hide_keyword
{
width: 100%;
padding: 10px;
padding: 15px 10px;
}
.wpt_shortable_data
{
Expand Down Expand Up @@ -543,10 +543,11 @@ ul#wpt_column_sortable>li.wpt_sortable_peritem {
padding: 0;
}
ul#wpt_column_sortable>li.wpt_sortable_peritem.enabled {
border-top: 2px solid #007693;
/* border-top: 1px solid #607d8b40; */
box-shadow: 0px 1px 16px 0 #bbbbbb9c;
}
ul#wpt_column_sortable li.wpt_sortable_peritem.enabled>span.handle, ul#wpt_keyword_hide_mobile li>span.handle {
background: #007692 no-repeat center center;
background: #e8e8e840 no-repeat center center;
}
.checkbox_parent {
display: inline-block;
Expand Down Expand Up @@ -622,12 +623,12 @@ span.extra_all_on_off.off_now {

li.wpt_sortable_peritem {
margin-top: 5px;
margin-bottom: 15px;
margin-bottom: 20px;
padding-top: 10px;
padding-bottom: 10px;
}
li.wpt_sortable_peritem.enabled {
border: 1px solid #607D8B;
border: 0 none;
}


Expand Down Expand Up @@ -698,7 +699,7 @@ table.wp-list-table.widefat.plugins tr.active[data-slug='woo-product-table-pro']
.inside-column-settings-wrapper {}

.inside-column-settings-wrapper .inside_tab_content {
padding: 15px;
padding: 15px 20px;
width: 100%;
overflow: hidden;
box-sizing: border-box;
Expand Down Expand Up @@ -731,11 +732,11 @@ nav.inside-nav-tab-wrapper a.nav-tab.nav-tab-active:hover{

#inside-tablet ul#wpt_column_sortable li.wpt_sortable_peritem.enabled>span.handle,
#inside-tablet ul#wpt_keyword_hide_mobile li>span.handle {
background-color: #000000;
/*background-color: #000000;*/
}
#inside-mobile ul#wpt_column_sortable li.wpt_sortable_peritem.enabled>span.handle,
#inside-mobile ul#wpt_keyword_hide_mobile li>span.handle {
background-color: #4c4c4c;
/*background-color: #4c4c4c;*/
}

nav.inside-nav-tab-wrapper a:hover {
Expand Down Expand Up @@ -885,6 +886,7 @@ body.wpt_admin_bodys{background-color: white;}
.add_new_col_wrapper {
box-sizing: border-box;
display: flex;
padding: 0 15px 15px 15px;
}

div#wpt_configuration_form .add_new_col_wrapper .ultraaddons-panel {
Expand Down Expand Up @@ -1116,23 +1118,29 @@ ul#wpt_column_sortable>li.wpt_sortable_peritem.enabled{display: flex;}
width: 150px;
}
.add_switch_col_wrapper .enable-available-cols ul li.switch-enable-item {
/* border: 1px solid #ddd; */
/* height: 55px; */
margin-right: 2px;
margin-bottom: 2px;
margin-right: 8px;
margin-bottom: 8px;
padding: 5px;
cursor: pointer;
background: #e4e4e459;
color: black;
border-radius: 9px;
padding: 5px 8px;
border: 1px solid #ddd;
}
.add_switch_col_wrapper .enable-available-cols ul li.switch-enable-item.item-enabled {
background: #007694;
background: #07a7d0;
color: white;
border: 1px solid #007694;
}
.add_switch_col_wrapper .enable-available-cols ul li.switch-enable-item.item-disabled {
background: #e4e4e459;
color: black;
}
.add_switch_col_wrapper .enable-available-cols ul li.switch-enable-item:after {content: "+";float: right;font-weight: bold;/* font-size: 16px; */box-sizing: border-box;/* position: absolute; *//* right: 5px; */}

.add_switch_col_wrapper .enable-available-cols ul li.switch-enable-item.item-enabled:after {content: "-";}

svg.octicon.octicon-mark-github.v-align-middle {
margin-bottom: -3px;
Expand All @@ -1159,14 +1167,20 @@ span.fork-button-wpt>a:hover {
box-sizing: border-box;
display: flex;
}
div#wpt_configuration_form .add_switch_col_wrapper .ultraaddons-panel {
padding: 0;
border: 0 none;
margin-bottom: 0;
}

div#wpt_configuration_form #column_settings .ultraaddons-panel{width: 100%;}
ul#wpt_column_sortable>li.wpt_sortable_peritem {
background: #ffffff;
}
ul#wpt_column_sortable>li.wpt_sortable_peritem.ui-sortable-helper {
background: #eceff1;
box-shadow: -4px 9px 12px 5px #0000007a;
border-color: #100000;
/* background: #000000; */
box-shadow: 0 1px 12px 0 #00000057;
/* border-color: #100000;
}
/* Notice Style for UltraAddons*/
Expand Down
45 changes: 40 additions & 5 deletions woo-product-table.php
Original file line number Diff line number Diff line change
Expand Up @@ -326,11 +326,13 @@ class WPT_Product_Table{
const MINIMUM_PHP_VERSION = '5.6';

/**
* To check Minimum Plugin Version for Free version
* or Main Plugin/Module Version
* for our Pro Version
* check minimum Woo Product Table Pro Version
*
* @Since 2.8.5.4
* @by Saiful
* @date 28.4.2021
*/
const MINIMUM_WPT_VERSION = '2.6.1';
const MINIMUM_WPT_PRO_VERSION = '7.0.6';


/**
Expand Down Expand Up @@ -399,13 +401,26 @@ public function __construct() {
* @since 6.1.0.15
*/
$installed_plugins = get_plugins();

// var_dump($installed_plugins);
//Condition and check php verion and WooCommerce activation
if ( !is_plugin_active( 'woocommerce/woocommerce.php' ) ) {
add_action( 'admin_notices', [ $this, 'admin_notice_missing_main_plugin' ] );
return;
}

/**
* Checking Pro Version Compatibility If
* Installed
*/
$pro_v_loc = 'woo-product-table-pro/woo-product-table-pro.php';
$pro_installed = isset( $installed_plugins[$pro_v_loc] );
$pro_activated = is_plugin_active( $pro_v_loc );
$pro_version = isset( $installed_plugins[$pro_v_loc]['Version'] ) ? $installed_plugins[$pro_v_loc]['Version'] : false;
if( $pro_installed && $pro_activated && version_compare( $pro_version, self::MINIMUM_WPT_PRO_VERSION, '<' ) ){
add_action( 'admin_notices', [ $this, 'admin_notice_pro_version_need_update' ] );
return;
}

//Qty Plus/Minus Button Plugin Compulsory for Our Product Table Plugin
$plugin = 'wc-quantity-plus-minus-button/init.php';
$link_text = '<strong><a href="' . esc_url( 'https://wordpress.org/plugins/wc-quantity-plus-minus-button/' ) . '" target="_blank">' . esc_html__( 'Quantity Plus/Minus Button for WooCommerce', 'wpt_pro' ) . '</a></strong>';
Expand Down Expand Up @@ -653,6 +668,26 @@ public function admin_notice_missing_main_plugin() {
printf( '<div class="notice notice-error is-dismissible"><p>%1$s</p></div>', $message );

}

/**
* Pro version need to be update to latest version
*
* @since 2.8.5.4
* @by Saiful
* @Date 28.4.2021
*/
public function admin_notice_pro_version_need_update() {

$message = sprintf(
esc_html__( '"%1$s" requires "%2$s" to be update to minimum version:("%3$s"). Please update your [Woo Product Table Pro] version', 'wpt_pro' ),
'<strong>' . esc_html__( 'Woo Product Table', 'wpt_pro' ) . '</strong>',
'<strong>' . esc_html__( 'Pro Version of Woo Product Table Pro', 'wpt_pro' ) . '</strong>',
'<strong>' . self::MINIMUM_WPT_PRO_VERSION . '</strong>'
);

printf( '<div class="notice notice-error is-dismissible"><p>%1$s</p></div>', $message );

}



Expand Down

0 comments on commit e9b399f

Please sign in to comment.