Skip to content

Commit

Permalink
Merge pull request #242 from codersaiful/3.2.5.9
Browse files Browse the repository at this point in the history
3.2.5.9
  • Loading branch information
codersaiful committed Oct 23, 2022
2 parents 013c346 + 8c2b9e6 commit 5629cf9
Show file tree
Hide file tree
Showing 126 changed files with 6,806 additions and 7,938 deletions.
101 changes: 95 additions & 6 deletions admin/action-hook.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,20 @@ function wpt_ctrl_s_text_at_top(){

if( !function_exists( 'wpt_configuration_page_head' ) ){
function wpt_configuration_page_head(){
$brand_logo = WPT_ASSETS_URL . 'images/brand/social/wpt.png';
?>
<div class="fieldwrap ultraaddons-head">
<div class="fieldwrap ultraaddons-head wpt-config-header-area">
<div class="ultraaddons-panel border-with-shadow">
<h1 class="wp-heading-inline plugin_name plugin-name"><?php echo WPT_Product_Table::getName(); ?> <span class="plugin-version">v <?php echo WPT_Product_Table::getVersion(); ?></span></h1>

<h1 class="wp-heading-inline plugin_name plugin-name">
<img src="<?php echo esc_url( $brand_logo ); ?>" class="wpt-brand-logo">
Woo Product Table

<span class="plugin-version">v <?php echo WPT_Product_Table::getVersion(); ?></span>
<?php if(method_exists('WOO_Product_Table', 'getVersion')){ ?>
<span class="plugin-version" title="Pro Version">v <?php echo WOO_Product_Table::getVersion(); ?></span></h1>
<?php } ?>
</h1>

</div>
</div>

Expand Down Expand Up @@ -152,9 +161,10 @@ function wpt_configure_basic_part( $settings,$current_config_value,$field_name )
<td>
<select name="<?php echo esc_attr( $field_name ); ?>[footer_cart]" id="wpt_table_footer_cart" class="wpt_fullwidth ua_input" >
<?php wpt_default_option( $page ) ?>
<option value="always_hide" <?php wpt_selected( 'footer_cart', 'always_hide', $current_config_value ); ?>><?php esc_html_e( 'Always Hide', 'wpt_pro' ); ?></option>
<option value="hide_for_zerro" <?php wpt_selected( 'footer_cart', 'hide_for_zerro', $current_config_value ); ?>><?php esc_html_e( 'Hide for Zero', 'wpt_pro' ); ?></option>
<option value="always_show" <?php wpt_selected( 'footer_cart', 'always_show', $current_config_value ); ?>><?php esc_html_e( 'Always Show', 'wpt_pro' ); ?></option>
<option value="always_hide" <?php wpt_selected( 'footer_cart', 'always_hide', $current_config_value ); ?>><?php esc_html_e( 'Always Hide', 'wpt_pro' ); ?></option>

</select>

</td>
Expand Down Expand Up @@ -204,10 +214,14 @@ function wpt_configure_basic_part( $settings,$current_config_value,$field_name )
<td>
<select name="<?php echo esc_attr( $field_name ); ?>[sort_searchbox_filter]" id="wpt_table_sort_searchbox_filter" class="wpt_fullwidth ua_input" >
<?php wpt_default_option( $page ) ?>
<option value="0" <?php wpt_selected( 'sort_searchbox_filter', '0', $current_config_value ); ?>><?php esc_html_e( 'None', 'wpt_pro' ); ?></option>
<option value="0" <?php wpt_selected( 'sort_searchbox_filter', '0', $current_config_value ); ?>><?php esc_html_e( 'Default Sorting', 'wpt_pro' ); ?></option>
<option value="ASC" <?php wpt_selected( 'sort_searchbox_filter', 'ASC', $current_config_value ); ?>><?php esc_html_e( 'Ascending', 'wpt_pro' ); ?></option>
<option value="DESC" <?php wpt_selected( 'sort_searchbox_filter', 'DESC', $current_config_value ); ?>><?php esc_html_e( 'Descending', 'wpt_pro' ); ?></option>
</select>
<p class="warning">
<b>Tips:</b>
<span>If set Default Sorting, Taxonomy (Category/Tag) sorting will be like Default Taxonomy list.</span>
</p>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -745,4 +759,79 @@ function wpt_tawkto_code_header( $class_string ){

}
}
add_filter( 'admin_head', 'wpt_tawkto_code_header', 999 );
add_filter( 'admin_head', 'wpt_tawkto_code_header', 999 );

/**
* "Table Column Sorting" option was in pro version, we move that into free version
* @since 3.2.5.4
* @author Fazle Bari
*/
if( !function_exists( 'wpto_admin_configuration_form_top_free' ) ){
function wpto_admin_configuration_form_top_free($settings,$current_config_value){
if( !isset( $settings['page'] ) || isset( $settings['page'] ) && $settings['page'] != 'configuration_page' ){
return;
}

?>

<table class="ultraaddons-table">
<tr>
<th>
<label class="wpt_label wpt_column_sorting_on_off" for="wpt_column_sorting_on_off"><?php esc_html_e( 'Table Column Sorting', 'wpt_pro' );?></label>
</th>
<td>
<!-- <label class="switch">
<input name="data[column_sort]" type="checkbox" id="wpt_column_sorting_on_off" <?php echo isset( $current_config_value['column_sort'] ) ? 'checked="checked"' : ''; ?>>
<div class="slider round">
<span class="on">On</span><span class="off">Off</span>
</div>
</label> -->
<p><?php echo esc_html( 'Column sorting for visible product Column.', 'wpt_pro' ); ?></p>
<p class="warning">
<b>Tips:</b>
<span>If you want to sort any column like number where text like: 1st,2nd,3rd,4th. To this situation, add a custom tag className <code>text_with_number</code> for column. <a href="https://wooproducttable.com/doc/advance-uses/sort-table-column/" target="_blank">Helper doc</a> </span>
</p>

</td>
</tr>
<tr id="wpt_footer_cart_on">
<th>
<label class="wpt_label wpt_footer_cart_on_of" for="wpt_footer_cart_on_of"><?php esc_html_e( 'Hide Footer Cart', 'wpt_pro' );?></label>
</th>
<td>
<label class="switch">
<input name="data[footer_cart_on_of]" type="checkbox" id="wpt_footer_cart_on_of" <?php echo isset( $current_config_value['footer_cart_on_of'] ) ? 'checked="checked"' : ''; ?>>
<div class="slider round"><!--ADDED HTML -->
<span class="on">Hide</span><span class="off">Show</span><!--END-->
</div>
</label>
<p><?php echo esc_html( 'Turn on or off footer cart', 'wpt_pro' ); ?></p>

</td>
</tr>
<tr id="wpt_footer_cart_template">
<th>
<label class="wpt_label wpt_footer_template " for="wpt_table_footer_cart_template"><?php esc_html_e( 'Footer Cart Template', 'wpt_pro' );?></label>
</th>
<td>
<select name="data[footer_cart_template]" class="wpt_fullwidth ua_input wpt_table_footer_cart_template">
<option value="none">Default Template</option>
<?php
$footer_cart_templates = [1,2,3,4,5,6,7,7,9,10,11,12,13,14,15,16,17,18,19,20,21,22];
foreach($footer_cart_templates as $template){
$selected = isset( $current_config_value['footer_cart_template'] ) && $current_config_value['footer_cart_template'] == $template? 'selected' : '';
echo '<option value="'. $template .'" ' . $selected . '>'."Template No " . $template . '</option>';
}
?>
</select>
<br>
<p><?php echo esc_html__( 'Select a template to change footer cart design', 'wpt_pro' ); ?></p>
</td>
</tr>
</table>


<?php
}
}
add_action('wpto_admin_configuration_form_top', 'wpto_admin_configuration_form_top_free',60,2);
4 changes: 2 additions & 2 deletions admin/admin-enqueue.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function wpt_admin_enqueue(){
*
* @since 1.0.3
*/
wp_enqueue_style( 'select2', WPT_Product_Table::getPath( 'BASE_URL' ) . 'assets/css/select2.min.css', array(), '4.0.13', 'all' );
wp_enqueue_style( 'select2', WPT_Product_Table::getPath( 'BASE_URL' ) . 'assets/select2/css/select2.min.css', array(), '4.0.13', 'all' );

/**
* Including UltraAddons CSS form Style
Expand All @@ -47,7 +47,7 @@ function wpt_admin_enqueue(){
*
* @since 1.0.3
*/
wp_enqueue_script( 'select2', WPT_Product_Table::getPath( 'BASE_URL' ) . 'assets/js/select2.min.js', array( 'jquery' ), '4.0.13', true );
wp_enqueue_script( 'select2', WPT_Product_Table::getPath( 'BASE_URL' ) . 'assets/select2/js/select2.min.js', array( 'jquery' ), '4.0.13', true );

//Includeing Color Picker js and css at version 4.4
wp_enqueue_script( 'wp-color-picker' );
Expand Down
13 changes: 13 additions & 0 deletions admin/admin-loader.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php
namespace WOO_PRODUCT_TABLE\Admin;

use WOO_PRODUCT_TABLE\Core\Base;
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(){

$deactive_form = new Deactive_Form();
$deactive_form->run();
}
}
26 changes: 22 additions & 4 deletions admin/configuration_page.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,11 @@ function ($field){
?>
<div class="wrap wpt_wrap wpt_configure_page ultraaddons <?php echo esc_attr( $wrapper_class ); ?>">
<h1 class="wp-heading-inline plugin_name"></h1>
<div class="clear"></div>
<?php wpt_get_pro_discount_message(); ?>
<div id="wpt_configuration_form" class="wpt_leftside ">
<?php do_action( 'wpto_admin_configuration_head' ); ?>
<?php
do_action( 'wpto_admin_configuration_head' );
wpt_social_links();
?>

<div class="fieldwrap">
<?php
Expand All @@ -75,10 +76,20 @@ function ($field){
do_action( 'wpto_admin_configuration_form_version_data', $settings,$current_config_value );

if( $default_lang_bool ){
?>
<div class="section ultraaddons-panel top_secion configuration_page">
<?php
/**
* To add something and Anything at the top of Form Of Configuratin Page
*/
do_action( 'wpto_admin_configuration_form_top', $settings,$current_config_value );

?>
<div class="ultraaddons-button-wrapper">
<button name="configure_submit" class="button-primary primary button">Save All</button>
</div>
</div>
<?php
}

do_action( 'wpto_admin_configuration_form', $settings,$current_config_value,'data' ); //'data' It's Forms Field Name Such: <input name='data[search_box]'>
Expand All @@ -95,7 +106,14 @@ class="button button-default"
</div>
</form>

<?php do_action( 'wpt_offer_here' ); ?>
<?php
do_action( 'wpt_offer_here' );

?>
<div class="wpt-plugin-recommend-area wpt-plugin-recommend-config-page">
<?php do_action( 'wpt_plugin_recommend_here' ); ?>
</div>
<?php wpt_social_links(); ?>
</div>

</div>
Expand Down
39 changes: 39 additions & 0 deletions admin/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,45 @@ function wpt_add_tabs(){
}
add_action( 'current_screen', 'wpt_add_tabs', 50 );

function wpt_social_links(){
?>
<div class="codeastrogy-social-area-wrapper">
<?php
$img_folder = WPT_BASE_URL . 'assets/images/brand/social/';
$codeastrology = [
'doc' => ['url' => 'https://wooproducttable.com/documentation/?utm=Plugin_Social', 'title' => 'Online Doc'],
'web' => ['url' => 'https://codeastrology.com/?utm=Plugin_Social', 'title' => 'CodeAstrology'],
'wpt' => ['url' => 'https://wooproducttable.com/?utm=Plugin_Social', 'title' => 'Woo Product Table'],
'min-max' => ['url' => 'https://codeastrology.com/min-max-quantity/?utm=Plugin_Social', 'title' => 'CodeAstrology Min Max Step'],
'linkedin' => ['url' => 'https://www.linkedin.com/company/codeastrology'],
'youtube' => ['url' => 'https://www.youtube.com/c/codeastrology'],
'facebook' => ['url' => 'https://www.facebook.com/codeAstrology'],
'twitter' => ['url' => 'https://www.twitter.com/codeAstrology'],
'skype' => ['url' => '#codersaiful', 'title' => 'codersaiful'],
];
foreach($codeastrology as $key=>$cLogy){
$image_name = $key . '.png';
$image_file = $img_folder . $image_name;
$url = $cLogy['url'] ?? '#';
$title = $cLogy['title'] ?? false;
$alt = ! empty( $title ) ? $title : $key;
$title_available = ! empty( $title ) ? 'title-available' : '';

?>
<a class="ca-social-link ca-social-<?php echo esc_attr( $key ); ?> ca-<?php echo esc_attr( $title_available ); ?>" href="<?php echo esc_url( $url ); ?>" target="_blank">
<img src="<?php echo esc_url( $image_file ); ?>" alt="<?php echo esc_attr( $alt ); ?>">
<span><?php echo esc_html( $title ); ?></span>
</a>
<?php


}
?>

</div>

<?php
}

function wpt_get_free_templates(){
$templates_default = array(
Expand Down
Loading

0 comments on commit 5629cf9

Please sign in to comment.