Plugin Directory

Changeset 3201062


Ignore:
Timestamp:
12/02/2024 04:15:57 PM (16 months ago)
Author:
speeedsam
Message:

file update

Location:
themes-assistant
Files:
979 added
27 edited

Legend:

Unmodified
Added
Removed
  • themes-assistant/trunk/assets/frontend/scss/base/_mixins.scss

    r3111839 r3201062  
     1@mixin avatar($size, $circle: false) {
     2    max-width: $size;
     3    width: $size;
     4    height: $size;
     5    overflow: hidden;
     6
     7    @if $circle {
     8        border-radius: $size / 2;
     9
     10        img {
     11            border-radius: $size / 2;
     12            height: 100%;
     13        }
     14    }
     15}
     16
    117@mixin pseudo($t: 0, $r: 0, $b: 0, $l: 0) {
    2     content: "";
    3     position: absolute;
    4     top: $t;
    5     left: $l;
    6     right: $r;
    7     bottom: $b;
     18    content: "";
     19    position: absolute;
     20    top: $t;
     21    left: $l;
     22    right: $r;
     23    bottom: $b;
    824}
    925
    1026@mixin bg-props($s: cover, $p: center top, $r: no-repeat) {
    11     background-size: $s;
    12     background-position: $p;
    13     background-repeat: $r;
    14 }
    15 @mixin bg-overlay($t: 0, $r: 0, $b: 0, $l: 0) {
    16     position: absolute;
    17     content: "";
    18     top: $t;
    19     left: $l;
    20     right: $r;
    21     bottom: $b;
    22     height: 100%;
    23     width: 100%;
    24     background: rgba(0, 0, 0, 0.5);
    25     z-index: -1;
    26 }
    27 @mixin flexbox($a: inherit, $jc: space-between) {
    28     align-items: $a;
    29     display: flex;
    30     flex-wrap: wrap;
    31     justify-content: $jc;
    32 }
    33 @mixin transform($t: 50%, $l: 50%) {
    34     position: absolute;
    35     top: $t;
    36     left: $l;
    37     transform: translate(-$t, -$l);
     27    background-size: $s;
     28    background-position: $p;
     29    background-repeat: $r;
    3830}
    3931
     32@mixin flexbox($a: inherit, $jc: space-between, $w: wrap) {
     33    align-items: $a;
     34    display: flex;
     35    flex-wrap: $w;
     36    justify-content: $jc;
     37}
     38
     39@mixin respond($device) {
     40    @if ($device == min-xl) {
     41        @media screen and (min-width: 1441px) and (max-width: 1600px) {
     42            @content;
     43        }
     44    } @else if($device == min-lg) {
     45        @media screen and (min-width: 1200px) {
     46            @content;
     47        }
     48    }
     49
     50    @if $device == xl {
     51        @media screen and (max-width: 1440px) {
     52            @content;
     53        }
     54    } @else if $device == medium {
     55        @media screen and (max-width: 1199px) {
     56            @content;
     57        }
     58    } @else if $device == tab-land {
     59        @media screen and (max-width: 991px) {
     60            @content;
     61        }
     62    } @else if $device == tab-port {
     63        @media screen and (max-width: 767px) {
     64            @content;
     65        }
     66    } @else if $device == phone {
     67        @media screen and (max-width: 575px) {
     68            @content;
     69        }
     70    } @else if $device == phone-sm {
     71        @media screen and (max-width: 479px) {
     72            @content;
     73        }
     74    } @else if $device == only-tab {
     75        @media (min-width: 768px) and (max-width: 991px) {
     76            @content;
     77        }
     78    }
     79}
     80
     81@mixin gradient-btn($clr1: $color-red, $clr2: $color-orange, $d: to right) {
     82    background-image: linear-gradient($d, $clr1 0%, $clr2 50%, $clr1 100%);
     83}
     84
     85@mixin themify($themes: $themes) {
     86    @each $theme, $map in $themes {
     87        .theme-#{$theme} & {
     88            $theme-map: () !global;
     89
     90            @each $key, $submap in $map {
     91                $value: map-get(map-get($themes, $theme), "#{$key}");
     92                $theme-map: map-merge(
     93                    $theme-map,
     94                    (
     95                        $key: $value,
     96                    )
     97                ) !global;
     98            }
     99
     100            @content;
     101            $theme-map: null !global;
     102        }
     103    }
     104}
  • themes-assistant/trunk/assets/frontend/scss/base/_variables.scss

    r3111839 r3201062  
    1 // Font weight
    2 $light: 300;
    3 $regular: 400;
    4 $medium: 500;
    5 $semibold: 600;
    6 $bold: 700;
    7 $exbold: 800;
    8 $black-bold: 900;
     1$roboto: "Roboto", sans-serif;
     2$rufina: "Rufina", serif;
     3$primary-clr: #7c49dd;
     4$secoundery-clr: #d946d3;
     5$darkmid-clr: #233646;
    96
    10 // Colors
    11 $ui_bg: #f2f2ff;
    12 $white: #fff;
    13 $primary: #7F56D9;
    14 $content: #262626;
    15 $heading: #000;
    16 $label: #5e5e5e;
    17 $blue: #0073e6;
    18 $blue2: #0056b3;
    19 $border: #ddd;
    20 
    21 // Border Radius
    22 $radius: 16px;
    23 
    24 // Common transition
    257$transition: all 300ms ease-in-out;
    268
     9@mixin pseudo($t: 0, $l: 0, $r: 0, $b: 0) {
     10    content: "";
     11    position: absolute;
     12    top: $t;
     13    left: $l;
     14    right: $r;
     15    bottom: $b;
     16}
    2717
     18@mixin mq($w) {
     19    @media screen and (max-width: $w+px) {
     20        @content;
     21    }
     22}
    2823
    29 $parent-class: ".post-type-themes-assistant";
     24@mixin min-mq($w: 992) {
     25    @media screen and (min-width: $w+px) {
     26        @content;
     27    }
     28}
    3029
    31 // #{$parent-class}
     30@mixin mq-btwn($mw, $mxw) {
     31    @media (min-width: $mw+px) and (max-width: $mxw+px) {
     32        @content;
     33    }
     34}
    3235
     36@mixin bg-props($s: cover, $p: center top, $r: no-repeat) {
     37    background-size: $s;
     38    background-position: $p;
     39    background-repeat: $r;
     40}
    3341
     42@mixin overlay($c, $i) {
     43    background-image: linear-gradient(to right, $c, $c), url($i);
     44}
     45
     46@include min-mq(768) {
     47    .nopadd-ltf {
     48        padding-left: 0;
     49    }
     50    .nopadd-rth {
     51        padding-right: 0;
     52    }
     53    .nopadd {
     54        padding-left: 0;
     55        padding-right: 0;
     56    }
     57}
  • themes-assistant/trunk/composer.json

    r3111839 r3201062  
    66    "autoload": {
    77        "psr-4": {
    8             "AT_Assistant\\": "inc/"
     8            "ATA\\": "inc/"
    99        },
    1010        "files": [ "inc/functions.php" ]
  • themes-assistant/trunk/inc/API.php

    r3111839 r3201062  
    55 * This class manages all API functionality.
    66 *
    7  * @package AT_Assistant
     7 * @package ATA
    88 */
    99
    10 namespace AT_Assistant;
     10namespace ATA;
    1111
    1212/**
  • themes-assistant/trunk/inc/API/TrafficLocation.php

    r3111839 r3201062  
    55 * This class manages all TrafficLocation functionality.
    66 *
    7  * @package AT_Assistant
     7 * @package ATA
    88 */
    99
    10 namespace AT_Assistant\API;
     10namespace ATA\API;
    1111
    1212/**
  • themes-assistant/trunk/inc/Admin/AdminEnqueue.php

    r3111839 r3201062  
    55 * This class manages all Javascript and Css file loadng functionality.
    66 *
    7  * @package AT_Assistant
     7 * @package ATA
    88 */
    99
    10 namespace AT_Assistant\Admin;
     10namespace ATA\Admin;
    1111
    1212/**
     
    2222     */
    2323    public function __construct() {
    24         add_action( 'admin_enqueue_scripts', array( $this, 'at_assistant_enqueue_dashboard_scripts' ) );
    25         add_action( 'admin_enqueue_scripts', array( $this, 'at_assistant_ajax_localie' ) );
     24        add_action( 'admin_enqueue_scripts', array( $this, 'ata_enqueue_dashboard_scripts' ) );
     25        add_action( 'admin_enqueue_scripts', array( $this, 'ata_ajax_localie' ) );
    2626    }
    2727
     
    2929     * CSS and JS enquee for dashboard.
    3030     */
    31     public function at_assistant_enqueue_dashboard_scripts() {
     31    public function ata_enqueue_dashboard_scripts() {
    3232
    3333        $current_screen = get_current_screen();
    3434        // Check if you're on the appropriate admin page(s) where you want to include your script.
    3535        if ( $current_screen && 'themes-assistant' === $current_screen->post_type ) {
    36             wp_enqueue_style( 'themes-assistant-dashboard', AT_ASSISTANT_ASSETS_URL . 'frontend/css/themes-assistant-dashboard.css', array(), time(), 'all' );
    37         }
     36        }
     37        wp_enqueue_script('ata-dashboard-scripts', ATA_ASSETS_URL . 'admin/js/dashboard.js', array('jquery'), '1.0', true);
     38        wp_enqueue_style( 'ata-dashboard-css', ATA_ASSETS_URL . 'frontend/css/widget/ata-dashboard-style.css', array(), time(), 'all' );
    3839    }
    3940
     
    4546     * @return void
    4647     */
    47     public function at_assistant_ajax_localie() {
     48    public function ata_ajax_localie() {
    4849        wp_localize_script(
    49             'themes-assistant-admin-scripts',
    50             'themes_assistant_ajax_localize',
     50            'ata-dashboard-scripts',
     51            'ata_ajax_localize',
    5152            array(
    5253                'site_url' => site_url(),
    5354                'ajax_url' => admin_url( 'admin-ajax.php' ),
    54                 'nonce'    => wp_create_nonce( 'themes-assistant-nonce' ),
     55                'nonce'    => wp_create_nonce( 'ata-nonce' ),
    5556            )
    5657        );
  • themes-assistant/trunk/inc/Admin/Hook.php

    r3111839 r3201062  
    33 * Hook Class File
    44 *
    5  * @package AT_Assistant\Admin
     5 * @package ATA\Admin
    66 */
    77
    8 namespace AT_Assistant\Admin;
     8namespace ATA\Admin;
    99
    1010/**
  • themes-assistant/trunk/inc/Admin/Notice.php

    r3111839 r3201062  
    33 * Notice Class File
    44 *
    5  * @package AT_Assistant\Admin
     5 * @package ATA\Admin
    66 */
    77
    8 namespace AT_Assistant\Admin;
     8namespace ATA\Admin;
    99
    1010/**
  • themes-assistant/trunk/inc/Admin/Popup/HeaderProfileInfo.php

    r3111839 r3201062  
    33 * Popup Header Profile Info Class File
    44 *
    5  * @package AT_Assistant\Admin\Popup
     5 * @package ATA\Admin\Popup
    66 */
    77
    8 namespace AT_Assistant\Admin\Popup;
     8namespace ATA\Admin\Popup;
    99
    10 use AT_Assistant\Admin\Route;
     10use ATA\Admin\Route;
    1111
    1212/**
  • themes-assistant/trunk/inc/Admin/Route.php

    r3111839 r3201062  
    33 * Route Class File
    44 *
    5  * @package AT_Assistant\Admin
     5 * @package ATA\Admin
    66 */
    77
    8 namespace AT_Assistant\Admin;
     8namespace ATA\Admin;
    99
    10 use AT_Assistant\Query;
     10use ATA\Query;
    1111
    1212/**
  • themes-assistant/trunk/inc/Admin/Views/Widgets/default-button.php

    r3111839 r3201062  
    11<?php
    22/**
    3  * Class AT_Assistant_Default_button
     3 * Class Ata_Default_Button
    44 *
    55 * Main Plugin class for Elementor Widgets
    66 *
    7  * @package AT_Assistant\Widgets\AT_Assistant_Default_button
     7 * @package ATA\Widgets\Ata_Default_Button
    88 * @since 1.0.0
    99 */
    1010
    11 namespace AT_Assistant\Widgets;
     11namespace ATA\Widgets;
    1212
    1313use Elementor\Widget_Base;
    1414use Elementor\Controls_Manager;
    1515use Elementor\Group_Control_Background;
     16use ATA\Admin\Views\AtaElementorEnquee;
    1617
    17 if ( ! defined( 'ABSPATH' ) ) {
    18     exit; // Exit if accessed directly.
    19 }
     18if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly.
     19
    2020
    2121/**
    22  * AT_Assistant_Default_button class extend from elementor Widget_Base class
     22 * Ata_Default_Button class extend from elementor Widget_Base class
    2323 *
    2424 * @since 1.1.0
    2525 */
    26 class AT_Assistant_Default_button extends Widget_Base { // phpcs:ignore.
     26class Ata_Default_Button extends Widget_Base { // phpcs:ignore.
     27
     28
     29    protected $ata_elementor_enquee;
     30
     31    /**
     32     * Construction load for assets.
     33     *
     34     * @param array $data Data for construction.
     35     * @param mixed $args Optional arguments for construction.
     36     */
     37    public function __construct( $data = array(), $args = null ) {
     38        parent::__construct( $data, $args );
     39
     40        $widget_name                = $this->get_name(); // You can make this dynamic
     41        $this->ata_elementor_enquee = new AtaElementorEnquee($widget_name);
     42    }
     43
    2744
    2845    /**
     
    3653     */
    3754    public function get_name() {
    38         return 'default-button';
     55        return 'ata-default-button';
    3956    }
    4057
     
    147164    protected function render() {
    148165        $settings = $this->get_settings_for_display();
    149 
    150166        $btn_link   = ( ! empty( $settings['btn_link']['url'] ) ) ? $settings['btn_link']['url'] : '';
    151167        $btn_target = ( $settings['btn_link']['is_external'] ) ? '_blank' : '_self';
     168       
    152169        ?>
    153         <a href="<?php echo esc_url( $btn_link ); ?>" target="<?php echo esc_html( $btn_target ); ?>" class="btn">
    154         <?php
    155             printf(
    156                 esc_html__( '%s', 'themes-assistant' ), // phpcs:ignore.
    157                 esc_html( $settings['btn'] )
    158             );
    159         ?>
    160         </a>
     170            <a href="<?php echo esc_url( $btn_link ); ?>" target="<?php echo esc_html( $btn_target ); ?>" class="btn">
     171                <?php
     172                    printf(
     173                        esc_html__( '%s', 'themes-assistant' ), // phpcs:ignore.
     174                        esc_html( $settings['btn'] )
     175                    );
     176                ?>
     177            </a>
    161178        <?php
    162179    }
  • themes-assistant/trunk/inc/Admin/Views/Widgets/hero-slider.php

    r3111839 r3201062  
    11<?php
    22/**
    3  * Class AT_Assistant_Hero_slider
     3 * Class ATA_Hero_slider
    44 *
    55 * Main Plugin class for Elementor Widgets
    66 *
    7  * @package AT_Assistant\Widgets\AT_Assistant_Hero_slider
     7 * @package ATA\Widgets\ATA_Hero_slider
    88 * @since 1.0.0
    99 */
    1010
    11 namespace AT_Assistant\Widgets;
     11namespace ATA\Widgets;
    1212
    1313use Elementor\Widget_Base;
     
    1515use Elementor\Utils;
    1616use Elementor\Core\Schemes\Typography;
     17use ATA\Admin\Views\AtaElementorEnquee;
     18use ATA\Utils\AtaWidgetManage;
     19
    1720if ( ! defined( 'ABSPATH' ) ) {
    1821    exit; // Exit if accessed directly.
     
    2023
    2124/**
    22  * AT_Assistant_Hero_slider class extend from Elementor Widget_Base class
     25 * ATA_Hero_slider class extend from Elementor Widget_Base class
    2326 *
    2427 * @since 1.1.0
    2528 */
    26 class AT_Assistant_Hero_slider extends Widget_Base { //phpcs:ignore.
     29class Ata_Hero_slider extends Widget_Base { //phpcs:ignore.
     30
     31    protected $ata_elementor_enquee;
    2732
    2833    /**
     
    3439    public function __construct( $data = array(), $args = null ) {
    3540        parent::__construct( $data, $args );
    36         add_action( 'elementor/frontend/after_enqueue_scripts', array( $this, 'conditionally_enqueue_scripts' ) );
    37         add_action( 'wp_enqueue_scripts', array( $this, 'conditionally_enqueue_scripts' ) );
     41        $widget_name                = $this->get_name(); // You can make this dynamic
     42        $this->ata_elementor_enquee = new AtaElementorEnquee($widget_name);
    3843    }
    3944
     
    4853     */
    4954    public function get_name() {
    50         return 'hero_slider_borax';
     55        return 'ata-hero-slider';
    5156    }
    5257
     
    95100     */
    96101    public function get_categories() {
    97             return array( 'themes-assistant' );
     102        return array( 'themes-assistant' );
    98103    }
    99104    /**
     
    120125                'label'   => esc_html__( 'Choose Style', 'themes-assistant' ),
    121126                'default' => '1',
    122                 'options' => array(
    123                     '1' => esc_html__( 'Style 1', 'themes-assistant' ),
    124                 ),
     127                'options' => [
     128                    '1' => esc_html__('Style 1', 'themes-assistant'),
     129                    '2' => esc_html__('Style 2', 'themes-assistant'),
     130                    '3' => esc_html__('Style 3', 'themes-assistant'),
     131                    '4' => esc_html__('Style 4', 'themes-assistant'),
     132                ],
    125133            )
    126134        );
     
    428436        $style        = $settings['slider_style'];
    429437        $widget_title = $this->get_title(); // Get the widget title dynamically.
    430 
    431         require AT_ASSISTANT_WIDGET_DIR . 'slider/style-' . $style . '.php';
    432     }
    433 
    434     /**
    435      * Enqueue scripts and styles for this widget.
    436      */
    437     public function at_assistant_el_enqueue_scripts() {
    438 
    439         // Register and enqueue JS file.
    440         wp_register_script( 'hero-slider-script', AT_ASSISTANT_ASSETS_URL . 'frontend/js/widget/hero-slider.js', array( 'jquery' ), AT_ASSISTANT_VERSION, true );
    441         wp_enqueue_script( 'hero-slider-script' );
    442 
    443         // Register and enqueue CSS file.
    444         wp_register_style( 'hero-slider-style', AT_ASSISTANT_ASSETS_URL . 'frontend/css/widget/hero-slider.css', array(), AT_ASSISTANT_VERSION );
    445         wp_enqueue_style( 'hero-slider-style' );
    446     }
    447 
    448 
    449     /**
    450      * Conditionally checking script
    451      */
    452     public function conditionally_enqueue_scripts() {
    453         if ( $this->is_elementor_edit_mode() || $this->is_widget_present() ) {
    454             $this->at_assistant_el_enqueue_scripts();
    455         } else {
    456             $this->at_assistant_el_enqueue_scripts();
    457         }
    458     }
    459 
    460     /**
    461      * Checking elementor Edit mode.
    462      */
    463     protected function is_elementor_edit_mode() {
    464         // Check if we are in Elementor editor mode.
    465         if ( \Elementor\Plugin::$instance->editor->is_edit_mode() || \Elementor\Plugin::$instance->preview->is_preview_mode() || wp_doing_ajax() ) {
    466             return true;
    467         }
    468         return false;
    469     }
    470 
    471     /**
    472      * Checking Present widget
    473      */
    474     protected function is_widget_present() {
    475         if ( ! did_action( 'elementor/loaded' ) ) {
    476             return false;
    477         }
    478 
    479         $document = \Elementor\Plugin::instance()->documents->get( get_the_ID() );
    480         if ( ! $document ) {
    481             return false;
    482         }
    483 
    484         $elements_data = $document->get_elements_data();
    485         return $this->is_widget_in_element_data( $elements_data );
    486     }
    487 
    488     /**
    489      * Check if the widget is present in the Elementor data.
    490      *
    491      * @param array $elements_data The Elementor elements data to check.
    492      * @return bool True if the widget is found, false otherwise.
    493      */
    494     protected function is_widget_in_element_data( $elements_data ) {
    495         foreach ( $elements_data as $element_data ) {
    496             if ( 'widget' === $element_data['elType'] && $this->get_name() === $element_data['widgetType'] ) {
    497                 return true;
    498             }
    499 
    500             if ( ! empty( $element_data['elements'] ) ) {
    501                 if ( $this->is_widget_in_element_data( $element_data['elements'] ) ) {
    502                     return true;
    503                 }
    504             }
    505         }
    506         return false;
    507     }
     438        $widget_name  = $this->get_name(); // You can make this dynamic
     439        $AtaWidget    = new AtaWidgetManage($widget_name, $settings, $style);
     440    }
     441
     442   
    508443}
  • themes-assistant/trunk/inc/Admin/Views/Widgets/image-box.php

    r3111839 r3201062  
    11<?php
    22/**
    3  * Class AT_Assistant_image_box
     3 * Class Ata_image_box
    44 *
    55 * Main Plugin class for Elementor Widgets
    66 *
    7  * @package AT_Assistant\Widgets\AT_Assistant_image_box
     7 * @package ATA\Widgets\Ata_image_box
    88 * @since 1.0.0
    99 */
    1010
    11 namespace AT_Assistant\Widgets;
     11namespace ATA\Widgets;
    1212
    1313use Elementor\Repeater;
     
    1616use Elementor\Utils;
    1717use Elementor\Core\Schemes\Typography;
     18use ATA\Admin\Views\AtaElementorEnquee;
     19use ATA\Utils\AtaWidgetManage;
    1820
    1921if ( ! defined( 'ABSPATH' ) ) {
     
    2628 * @since 1.1.0
    2729 */
    28 class AT_Assistant_image_box extends Widget_Base { //phpcs:ignore.
     30class Ata_image_box extends Widget_Base { //phpcs:ignore.
     31
     32
     33    protected $ata_elementor_enquee;
    2934
    3035    /**
     
    3641    public function __construct( $data = array(), $args = null ) {
    3742        parent::__construct( $data, $args );
    38         add_action( 'elementor/frontend/after_enqueue_scripts', array( $this, 'conditionally_enqueue_scripts' ) );
    39         add_action( 'wp_enqueue_scripts', array( $this, 'conditionally_enqueue_scripts' ) );
     43
     44        $widget_name                = $this->get_name(); // You can make this dynamic
     45        $this->ata_elementor_enquee = new AtaElementorEnquee($widget_name);
    4046    }
    4147
     
    5056     */
    5157    public function get_name() {
    52         return 'image-box';
     58        return 'ata-image-box';
    5359    }
    5460
     
    94100     */
    95101    public function get_categories() {
    96         return array( 'themes-assistant' );
     102        return array( 'themes-assistant' );
    97103    }
    98104
     
    118124            'image_layout',
    119125            array(
    120                 'label'   => esc_html__( 'Image box layout', 'themes-assistant' ),
     126                'label'   => esc_html__( 'Image box layout', 'themes-assistant' ),
    121127                'type'    => Controls_Manager::SELECT,
    122128                'default' => '1',
    123                 'options' => array(
    124                     '1' => esc_html__( 'Layout 1', 'themes-assistant' ),
    125                 ),
    126             )
    127         );
     129                'options' => [
     130                    '1' => esc_html__( 'Layout 1', 'themes-assistant' ),
     131                    '2' => esc_html__( 'Layout 2', 'themes-assistant' ),
     132                    '3' => esc_html__( 'Layout 3', 'themes-assistant' ),
     133                    '4' => esc_html__( 'Layout 4', 'themes-assistant' ),
     134                    '5' => esc_html__( 'Layout 5', 'themes-assistant' ),
     135                    '6' => esc_html__( 'Layout 6', 'themes-assistant' ),
     136                    '7' => esc_html__( 'Layout 7', 'themes-assistant' ),
     137                ],
     138            )
     139        );
     140
     141        $this->add_control(
     142            'image_shape',
     143            array(
     144                'label' => esc_html__( 'Image Style', 'themes-assistant' ),
     145                'type' => Controls_Manager::SELECT,
     146                'default' => 'none',
     147                'options' => [
     148                    'none' => esc_html__( 'None', 'themes-assistant' ),
     149                    'Triangle' => esc_html__( 'Triangle', 'themes-assistant' ),
     150                    'Trapezoid' => esc_html__( 'Trapezoid', 'themes-assistant' ),
     151                    'Parallelogram' => esc_html__( 'Parallelogram', 'themes-assistant' ),
     152                    'Rhombus' => esc_html__( 'Rhombus', 'themes-assistant' ),
     153                    'Pentagon' => esc_html__( 'Pentagon', 'themes-assistant' ),
     154                    'Hexagon' => esc_html__( 'Hexagon', 'themes-assistant' ),
     155                    'Heptagon' => esc_html__( 'Heptagon', 'themes-assistant' ),
     156                    'Octagon' => esc_html__( 'Octagon', 'themes-assistant' ),
     157                    'Nonagon' => esc_html__( 'Nonagon', 'themes-assistant' ),
     158                    'Decagon' => esc_html__( 'Decagon', 'themes-assistant' ),
     159                    'Bevel' => esc_html__( 'Bevel', 'themes-assistant' ),
     160                    'Rabbet' => esc_html__( 'Rabbet', 'themes-assistant' ),
     161                    'Left-arrow' => esc_html__( 'Left arrow', 'themes-assistant' ),
     162                    'Right-arrow' => esc_html__( 'Right arrow', 'themes-assistant' ),
     163                    'Left-Point' => esc_html__( 'Left Point', 'themes-assistant' ),
     164                    'Right-Point' => esc_html__( 'Right Point', 'themes-assistant' ),
     165                    'Left-Chevron' => esc_html__( 'Left Chevron', 'themes-assistant' ),
     166                    'Right-Chevron' => esc_html__( 'Right Chevron', 'themes-assistant' ),
     167                    'Star' => esc_html__( 'Star', 'themes-assistant' ),
     168                    'Cross' => esc_html__( 'Cross', 'themes-assistant' ),
     169                    'Message' => esc_html__( 'Message', 'themes-assistant' ),
     170                    'Close' => esc_html__( 'Close', 'themes-assistant' ),
     171                    'Frame' => esc_html__( 'Frame', 'themes-assistant' ),
     172                    'Inset' => esc_html__( 'Inset', 'themes-assistant' ),
     173                    'Custom Polygon' => esc_html__( 'Custom Polygon', 'themes-assistant' ),
     174                    'Circle' => esc_html__( 'Circle', 'themes-assistant' ),
     175                    'Ellipse' => esc_html__( 'Ellipse', 'themes-assistant' ),
     176                ],
     177                'condition' => [
     178                  'image_layout' => ['1','2','3','4','5','6'],
     179                ]   
     180            )
     181        );
     182        $this->add_control(
     183            'image_shadow',
     184            array(
     185                'label' => esc_html__( 'Image Shadow', 'themes-assistant' ),
     186                'type'  => Controls_Manager::SWITCHER,
     187                'label_on' => esc_html__( 'Show', 'themes-assistant' ),
     188                'label_off' => esc_html__( 'Hide', 'themes-assistant' ),
     189                'return_value' => 'yes',
     190                'default' => 'yes',
     191                'condition' => [
     192                    'image_layout' => ['1','2','3','4','5','6'],
     193                ]   
     194            )
     195        );
     196     
     197        $this->add_control(
     198          'imageround',
     199            array(
     200                'label' => esc_html__( 'Image Round', 'themes-assistant' ),
     201                'type' => Controls_Manager::SLIDER,
     202                'size_units' => [ '%'],
     203                'range' => [
     204                    '%' => [
     205                        'min' => 0,
     206                        'max' => 100,
     207                        'step' => 5,
     208                    ],             
     209                    ],
     210                    'default' => [
     211                    'unit' => '%',
     212                    'size' => 0,
     213                    ],
     214                    'selectors' => [
     215                    '{{WRAPPER}} img' => 'border-radius: {{SIZE}}{{UNIT}};',
     216                    ],
     217                    'condition' => [
     218                    'image_layout' => ['1','2','3','4','5','6'],
     219                ]
     220            )
     221        );
    128222
    129223        $this->add_control(
     
    528622        $style        = $settings['image_layout'];
    529623        $widget_title = $this->get_title(); // Get the widget title dynamically.
    530         // Load Widget design.
    531         require AT_ASSISTANT_WIDGET_DIR . 'image-box/style-' . $style . '.php';
    532     }
    533 
    534     /**
    535      * Enqueue scripts and styles for this widget.
    536      */
    537     public function at_assistant_el_enqueue_scripts() {
    538 
    539         // Register and enqueue JS file.
    540         wp_register_script( 'image-box-script', AT_ASSISTANT_ASSETS_URL . 'frontend/js/widget/image-box.js', array( 'jquery' ), AT_ASSISTANT_VERSION, true );
    541         wp_enqueue_script( 'image-box-script' );
    542 
    543         // Register and enqueue CSS file.
    544         wp_register_style( 'image-box-style', AT_ASSISTANT_ASSETS_URL . 'frontend/css/widget/image-box.css', array(), AT_ASSISTANT_VERSION );
    545         wp_enqueue_style( 'image-box-style' );
    546     }
    547 
    548 
    549     /**
    550      * Conditionally checking script
    551      */
    552     public function conditionally_enqueue_scripts() {
    553         if ( $this->is_elementor_edit_mode() || $this->is_widget_present() ) {
    554             $this->at_assistant_el_enqueue_scripts();
    555         } else {
    556             $this->at_assistant_el_enqueue_scripts();
    557         }
    558     }
    559 
    560     /**
    561      * Checking elementor Edit mode.
    562      */
    563     protected function is_elementor_edit_mode() {
    564         // Check if we are in Elementor editor mode.
    565         if ( \Elementor\Plugin::$instance->editor->is_edit_mode() || \Elementor\Plugin::$instance->preview->is_preview_mode() || wp_doing_ajax() ) {
    566             return true;
    567         }
    568         return false;
    569     }
    570 
    571     /**
    572      * Checking Present widget
    573      */
    574     protected function is_widget_present() {
    575         if ( ! did_action( 'elementor/loaded' ) ) {
    576             return false;
    577         }
    578 
    579         $document = \Elementor\Plugin::instance()->documents->get( get_the_ID() );
    580         if ( ! $document ) {
    581             return false;
    582         }
    583 
    584         $elements_data = $document->get_elements_data();
    585         return $this->is_widget_in_element_data( $elements_data );
    586     }
    587 
    588     /**
    589      * Check if the widget is present in the Elementor data.
    590      *
    591      * @param array $elements_data The Elementor elements data to check.
    592      * @return bool True if the widget is found, false otherwise.
    593      */
    594     protected function is_widget_in_element_data( $elements_data ) {
    595         foreach ( $elements_data as $element_data ) {
    596             if ( 'widget' === $element_data['elType'] && $this->get_name() === $element_data['widgetType'] ) {
    597                 return true;
    598             }
    599 
    600             if ( ! empty( $element_data['elements'] ) ) {
    601                 if ( $this->is_widget_in_element_data( $element_data['elements'] ) ) {
    602                     return true;
    603                 }
    604             }
    605         }
    606         return false;
     624        $widget_name  = $this->get_name(); // You can make this dynamic
     625        $AtaWidget    = new AtaWidgetManage($widget_name, $settings, $style);
    607626    }
    608627}
  • themes-assistant/trunk/inc/Admin/Views/Widgets/section-header.php

    r3111839 r3201062  
    11<?php
    22/**
    3  * Class AT_Assistant_section_header
     3 * Class Ata_Section_Header
    44 *
    55 * Main Plugin class for Elementor Widgets
    66 *
    7  * @package AT_Assistant\Widgets\AT_Assistant_section_header
     7 * @package ATA\Widgets\Ata_Section_Header
    88 * @since 1.0.0
    99 */
    1010
    11 namespace AT_Assistant\Widgets;
     11namespace ATA\Widgets;
    1212
    1313use Elementor\Widget_Base;
     
    1919use Elementor\Core\Schemes;
    2020use Elementor\Utils;
    21 
     21use ATA\Utils\AtaWidgetManage;
     22use ATA\Admin\Views\AtaElementorEnquee;
    2223if ( ! defined( 'ABSPATH' ) ) {
    2324    exit; // Exit if accessed directly.
     
    2526
    2627/**
    27  * AT_Assistant_section_header class extend from Elementor Widget_Base class
     28 * Ata_section_header class extend from Elementor Widget_Base class
    2829 *
    2930 * @since 1.1.0
    3031 */
    31 class AT_Assistant_section_header extends Widget_Base { //phpcs:ignore.
     32class Ata_Section_Header extends Widget_Base { //phpcs:ignore.
     33
     34
     35    protected $ata_elementor_enquee;
     36
     37    /**
     38     * Construction load for assets.
     39     *
     40     * @param array $data Data for construction.
     41     * @param mixed $args Optional arguments for construction.
     42     */
     43    public function __construct( $data = array(), $args = null ) {
     44        parent::__construct( $data, $args );
     45
     46        $widget_name                = $this->get_name(); // You can make this dynamic
     47        $this->ata_elementor_enquee = new AtaElementorEnquee($widget_name);
     48    }
     49
    3250
    3351    /**
     
    4159     */
    4260    public function get_name() {
    43         return 'section-header';
     61        return 'ata-section-header';
    4462    }
    4563
     
    108126            )
    109127        );
     128        $this->add_control(
     129            'section_header_style',
     130            [
     131                'label' => esc_html__( 'Select Style', 'themes-assistant' ),
     132                'type' => Controls_Manager::SELECT,
     133                'default' => '1',
     134                'options' => [
     135                    '1' => esc_html__( 'Style 1', 'themes-assistant' ),
     136                    // '2' => esc_html__( 'Style 2', 'themes-assistant' ),
     137                ],
     138            ]
     139        );
    110140
    111141        $this->add_control(
     
    361391    protected function render() {
    362392        $settings = $this->get_settings_for_display();
    363 
    364         ?>
    365         <div class="sec-heading m-auto text-<?php echo esc_attr( $settings['align'] ); ?>">
    366             <?php
    367             if ( ! empty( $settings['title_image']['url'] ) ) {
    368                 echo '<img src="' . esc_url( $settings['title_image']['url'] ) . '" alt="' . wp_kses_post( $settings['title'] ) . '" width="50" height="50">';
    369             }
    370             ?>
    371             <?php if ( ! empty( $settings['top_title'] ) ) { ?>
    372                 <span class="tagline"><?php echo esc_html( $settings['top_title'] ); ?></span>
    373                 <?php
    374             }
    375             if ( ! empty( $settings['title'] ) ) {
    376                 ?>
    377                 <h2 class="sec-title"><?php echo wp_kses_post( $settings['title'] ); ?></h2>
    378                 <?php
    379             }
    380             if ( 'icon' === $settings['icon_type'] ) :
    381                 ?>
    382                 <span class="divider_icon">
    383                     <?php Icons_Manager::render_icon( $settings['icon'], array( 'aria-hidden' => 'true' ) ); ?>
    384                 </span>
    385             <?php elseif ( 'iconclass' === $settings['icon_type'] ) : ?>
    386                 <span class="divider_icon">
    387                     <i class="<?php echo esc_attr( $settings['iconclass'] ); ?>"></i>
    388                 </span>
    389             <?php elseif ( 'image' === $settings['icon_type'] ) : ?>
    390                 <span class="divider_icon">
    391                     <img src="<?php echo esc_url( $settings['image']['url'] ); ?>" alt="<?php echo wp_kses_post( $settings['title'] ); ?>" class="img-icon" width="50" height="50">
    392                 </span>
    393                 <?php
    394             endif;
    395             if ( ! empty( $settings['description'] ) ) {
    396                 ?>
    397                 <div class="paragraph"><?php echo wp_kses_post( $settings['description'] ); ?></div>
    398             <?php } ?>
    399         </div>
    400         <?php
     393        $style = $settings['section_header_style'];
     394        $widget_name  = $this->get_name(); // You can make this dynamic
     395        $AtaWidget    = new AtaWidgetManage($widget_name, $settings, $style);
    401396    }
    402397}
  • themes-assistant/trunk/inc/Admin/Views/Widgets/style/image-box/style-1.php

    r3111839 r3201062  
    1919                src="<?php echo esc_url( $settings['box_image']['url'] ); ?>"
    2020                alt="
    21                 <?php
    22                     printf(
    23                         esc_attr__( '%s', 'themes-assistant' ),
    24                         esc_attr( $settings['title'] )
    25                     );
    26                     ?>
     21                    <?php
     22                        printf(
     23                            esc_attr__( '%s', 'themes-assistant' ),
     24                            esc_attr( $settings['title'] )
     25                        );
     26                    ?>
    2727                "
    2828                width="<?php echo esc_attr( $settings['box_image_dimension']['width'] ); ?>"
     
    4747
    4848    <?php endif; ?>
    49 
    50     <?php echo wp_kses_post( $settings['content'] ); ?>
     49   
     50    <p>
     51        <?php
     52            printf(
     53                esc_html__( '%s', 'themes-assistant' ),
     54                esc_html( $settings['content'] )
     55            );
     56        ?>
     57    </p>
    5158
    5259    <?php if ( $settings['button_text'] ) : ?>
  • themes-assistant/trunk/inc/Admin/Views/Widgets/style/team/style-1.php

    r3111839 r3201062  
    11<?php
    2 if ( ! defined( 'ABSPATH' ) ) {
    3     exit; // Exit if accessed directly
     2if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
    43}
    54    use Elementor\Icons_Manager;
     
    1110                <img
    1211                    src="<?php echo esc_url( $settings['image']['url'] ); ?>"
    13                     alt="
    14                         <?php
    15                             printf(
    16                                 esc_html__( '%s', 'themes-assistant' ),
    17                                 esc_html( $settings['name'] )
    18                             );
    19                             ?>
    20                     "
     12                    alt="<?php printf( esc_attr__( '%s', 'themes-assistant' ), esc_html( $settings['name'] ) ); ?>"
    2113                    width="<?php echo esc_attr( $settings['team_image_dimension']['width'] ); ?>"
    2214                    height="<?php echo esc_attr( $settings['team_image_dimension']['height'] ); ?>"
     
    2618        <div class="memb-details">
    2719            <h3>
    28                 <?php
    29                     printf(
    30                         esc_html__( '%s', 'themes-assistant' ),
    31                         esc_html( $settings['name'] )
    32                     );
    33                     ?>
     20                <?php printf( esc_html__( '%s', 'themes-assistant' ), esc_html( $settings['name'] ) ); ?>
    3421            </h3>
    3522            <span>
    36                 <?php
    37                     printf(
    38                         esc_html__( '%s', 'themes-assistant' ),
    39                         esc_html( $settings['position'] )
    40                     );
    41                     ?>
     23                <?php printf( esc_html__( '%s', 'themes-assistant' ), esc_html( $settings['position'] ) ); ?>
    4224            </span>
    4325            <div class="memb-social">
     
    4931                                <span class="icon">
    5032                                    <?php Icons_Manager::render_icon( $social['icon'], array( 'aria-hidden' => 'true' ) ); ?>
    51                             </span>
     33                                </span>
    5234                                <?php elseif ( $social['icon_type'] == 'iconclass' ) : ?>
    5335                                <span class="icon">
    5436                                    <i class="<?php echo esc_attr( $social['iconclass'] ); ?>"></i>
    55                             </span>
     37                                </span>
    5638                                <?php elseif ( $social['icon_type'] == 'image' ) : ?>
    5739                                <span class="icon">
    58                                     <img src="<?php echo esc_url( $social['image']['url'] ); ?>" alt="
    59                                                         <?php
    60                                                             printf(
    61                                                                 esc_attr__( '%s', 'themes-assistant' ),
    62                                                                 esc_attr( $settings['name'] )
    63                                                             );
    64                                                         ?>
    65                                     " class="img-icon" width="40" height="40">
    66                             </span>
     40                                    <img src="<?php printf( esc_html__( '%s', 'themes-assistant' ), esc_html( $settings['name'] ) ); ?>" class="img-icon" width="40" height="40">
     41                                </span>
    6742                            <?php endif; ?>
    6843                        </a>
    69                
    7044                    <?php endforeach; ?>
    7145                </ul>
  • themes-assistant/trunk/inc/Admin/Views/Widgets/team.php

    r3111839 r3201062  
    11<?php
    22/**
    3  * Class AT_Assistant_team_box
     3 * Class Ata_Team_Box
    44 *
    55 * Main Plugin class for Elementor Widgets
    66 *
    7  * @package AT_Assistant\Widgets\AT_Assistant_team_box
     7 * @package ATA\Widgets\Ata_Team_Box
    88 * @since 1.0.0
    99 */
    1010
    11 namespace AT_Assistant\Widgets;
     11namespace ATA\Widgets;
    1212
    1313use Elementor\Widget_Base;
     
    1717use Elementor\Repeater;
    1818use Elementor\Core\Schemes\Typography;
     19use ATA\Admin\Views\AtaElementorEnquee;
     20use ATA\Utils\AtaWidgetManage;
    1921
    2022if ( ! defined( 'ABSPATH' ) ) {
     
    2325
    2426/**
    25  * AT_Assistant_team_box class extend from Elementor Widget_Base class
     27 * Ata_team_box class extend from Elementor Widget_Base class
    2628 *
    2729 * @since 1.1.0
    2830 */
    29 class AT_Assistant_team_box extends Widget_Base { //phpcs:ignore.
     31class Ata_Team_Box extends Widget_Base { //phpcs:ignore.
     32
     33    protected $ata_elementor_enquee;
     34
     35    /**
     36     * Construction load for assets.
     37     *
     38     * @param array $data Data for construction.
     39     * @param mixed $args Optional arguments for construction.
     40     */
     41    public function __construct( $data = array(), $args = null ) {
     42        parent::__construct( $data, $args );
     43
     44        $widget_name                = $this->get_name(); // You can make this dynamic
     45        $this->ata_elementor_enquee = new AtaElementorEnquee($widget_name);
     46    }
     47
    3048
    3149    /**
     
    3957     */
    4058    public function get_name() {
    41         return 'team-box';
     59        return 'ata-team';
    4260    }
    4361
     
    114132                'options' => array(
    115133                    '1' => esc_html__( 'Style 1', 'themes-assistant' ),
     134                    '2' => esc_html__( 'Style 2', 'themes-assistant' ),
     135                    '3' => esc_html__( 'Style 3', 'themes-assistant' ),
     136                    '4' => esc_html__( 'Style 4', 'themes-assistant' ),
    116137                ),
    117138            )
     
    500521        $socials      = $settings['socials'];
    501522        $widget_title = $this->get_title(); // Get the widget title dynamically.
    502 
    503         require AT_ASSISTANT_WIDGET_DIR . 'team/style-' . $style . '.php';
     523        $widget_name  = $this->get_name(); // You can make this dynamic
     524        $AtaWidget    = new AtaWidgetManage($widget_name, $settings, $style);
    504525    }
    505526}
  • themes-assistant/trunk/inc/AdminPanel.php

    r3111839 r3201062  
    55 * This class manages all admin-related functionality.
    66 *
    7  * @package AT_Assistant
     7 * @package ATA
    88 */
    99
    10 namespace AT_Assistant;
     10namespace ATA;
    1111
    1212/**
     
    2828        new Admin\Notice();
    2929
     30        /**
     31         * Instantiate the 'AtAssistantControls'
     32         * class from the 'Admin' namespace.
     33         */
     34        new Admin\AtaControls();
     35
    3036        /**
    3137         * Instantiate the 'AdminEnqueue' class
     
    3844         * Custom Post define class
    3945         */
    40         new Admin\CustomPost();
     46        new Admin\AtaCustomPost();
    4147
    4248        /**
     
    4551        */
    4652        new Admin\Route();
     53
    4754    }
    4855}
  • themes-assistant/trunk/inc/Frontend/FrontendEnqueue.php

    r3111839 r3201062  
    11<?php
    22// Enqueue assets
    3 namespace AT_Assistant\Frontend;
     3namespace ATA\Frontend;
    44
    55class FrontendEnqueue {
     6
    67    function __construct() {
    78        /**
     
    2324         */
    2425        wp_enqueue_script( 'jquery' );
    25         wp_enqueue_script( 'themes-assistant-fontend-script', AT_ASSISTANT_ASSETS_URL . 'frontend/js/themes-assistant-fontend-script.js', array( 'jquery' ), time(), true );
     26        wp_enqueue_script( 'themes-assistant-fontend-script', ATA_ASSETS_URL . 'frontend/js/ata-fontend-script.js', array( 'jquery' ), time(), true );
    2627        wp_localize_script(
    27             'themes-assistant-fontend-script',
     28            'ata-fontend-script',
    2829            'at_assistant_ajax_object',
    2930            array(
    3031                'ajaxurl' => admin_url( 'admin-ajax.php' ),
    31                 'nonce'   => wp_create_nonce( 'themes-assistant-nonce' ),
     32                'nonce'   => wp_create_nonce( 'ata-nonce' ),
    3233            )
    3334        );
     
    3637         * Enquee All Styles
    3738         */
    38         wp_enqueue_style( 'themes-assistant-frontend-style', AT_ASSISTANT_ASSETS_URL . 'frontend/css/themes-assistant-frontend-style.css', array(), time(), 'all' );
     39        wp_enqueue_style( 'ata-frontend-style', ATA_ASSETS_URL . 'frontend/css/ata-frontend-style.css', array(), time(), 'all' );
    3940    }
    4041}
  • themes-assistant/trunk/inc/Frontend/views/DomHandle.php

    r3111839 r3201062  
    11<?php
    22
    3 namespace AT_Assistant\Frontend\views;
     3namespace ATA\Frontend\views;
    44
    55class DomHandle {
  • themes-assistant/trunk/inc/FrontendPanel.php

    r3111839 r3201062  
    55 * This class manages all API functionality.
    66 *
    7  * @package AT_Assistant
     7 * @package ATA
    88 */
    99
    10 namespace AT_Assistant;
     10namespace ATA;
    1111
    1212/**
     
    3434         */
    3535        new Frontend\views\DomHandle();
     36
     37       
    3638    }
    3739}
  • themes-assistant/trunk/inc/functions.php

    r3111839 r3201062  
    11<?php
     2
     3use ATA\Admin\Views\AtaAssetsManager;
    24/**
    35 * Global functions
     
    57 * This function manage all globlal functions
    68 *
    7  * @package AT_Assistant
     9 * @package ATA
    810 */
     11
     12/*------------------------------------------*
     13*               Excerpt Length              *
     14*-------------------------------------------*/
     15if(!function_exists('ata_excerpt')){
     16    function ata_excerpt($limit) {
     17        $excerpt = explode(' ', get_the_excerpt(), $limit);
     18        if (count($excerpt)>=$limit) {
     19            array_pop($excerpt);
     20            $excerpt = implode(" ",$excerpt);
     21        } else {
     22            $excerpt = implode(" ",$excerpt);
     23        }
     24        $excerpt = preg_replace('`[[^]]*]`','',$excerpt);
     25        return $excerpt;
     26    }
     27}
     28
     29/*------------------------------------------*
     30*               Global Function             *
     31*-------------------------------------------*/
     32function ata_assets_manager( $handle, $type = null, $deps = [], $ver = false, $in_footer_or_media = 'all' ) {
     33    $assets_manager = AtaAssetsManager::get_instance();
     34    $assets_manager->ata_enqueue_asset( $handle, $type, $deps, $ver, $in_footer_or_media );
     35}
     36
     37/**
     38         * Get total elements count from ata_settings table.
     39         *
     40         * @return int Total elements count.
     41         */
     42       
     43         function get_total_elements_count() {
     44            global $wpdb;
     45            $table_name = $wpdb->prefix . 'ata_settings'; // Update to your actual table name if different
     46            $query = "SELECT elements_settings FROM $table_name";
     47            $results = $wpdb->get_results($query, ARRAY_A);
     48           
     49            $total_count = 0;
     50            foreach ($results as $row) {
     51                $settings = json_decode($row['elements_settings'], true);
     52                if (is_array($settings)) {
     53                    $total_count += count($settings);
     54                }
     55            }
     56            return $total_count;
     57        }
     58       
     59        /**
     60         * Get active elements count from ata_settings table.
     61         *
     62         * @return int Active elements count.
     63         */
     64        function get_active_elements_count() {
     65            global $wpdb;
     66            $table_name = $wpdb->prefix . 'ata_settings'; // Update to your actual table name if different
     67            $query = "SELECT elements_settings FROM $table_name";
     68            $results = $wpdb->get_results($query, ARRAY_A);
     69           
     70            $active_count = 0;
     71            foreach ($results as $row) {
     72                $settings = json_decode($row['elements_settings'], true);
     73                if (is_array($settings)) {
     74                    foreach ($settings as $key => $value) {
     75                        if ($value === 'on') {
     76                            $active_count++;
     77                        }
     78                    }
     79                }
     80            }
     81            return $active_count;
     82        }
     83        /**
     84         * Get inactive elements count from ata_settings table.
     85         *
     86         * @return int Inactive elements count.
     87         */
     88        function get_inactive_elements_count() {
     89            global $wpdb;
     90            $table_name = $wpdb->prefix . 'ata_settings'; // Update to your actual table name if different
     91            $query = "SELECT elements_settings FROM $table_name";
     92            $results = $wpdb->get_results($query, ARRAY_A);
     93           
     94            $inactive_count = 0;
     95            foreach ($results as $row) {
     96                $settings = json_decode($row['elements_settings'], true);
     97                if (is_array($settings)) {
     98                    foreach ($settings as $key => $value) {
     99                        if ($value !== 'on') {
     100                            $inactive_count++;
     101                        }
     102                    }
     103                }
     104            }
     105            return $inactive_count;
     106        }
  • themes-assistant/trunk/readme.txt

    r3111839 r3201062  
    22Contributors: themeies, xirosoft, speeedsam, sofiquldev
    33Donate link: https://www.paypal.com/paypalme/xirosoft
    4 Stable tag: 1.0.2
     4Stable tag: 1.0.3
    55Tags: Themeies Assistant is a user-friendly WordPress plugin that simplifies and enhances your theme customization experience. Effortlessly tweak colors, layouts, styles, and designs to bring your creative vision to life. Save time and personalize your website with ease using Themeies Assistant.
    66Requires at least: 6.0
    7 Tested up to: 6.4
     7Tested up to: 6.7
    88Requires PHP: 7.4
    99License: GPLv2 or later
     
    1031033. screenshot-3.jpg
    1041044. screenshot-4.jpg
     1055. screenshot-5.jpg
     1066. screenshot-6.jpg
     1077. screenshot-7.jpg
     1088. screenshot-8.jpg
     1099. screenshot-9.jpg
    105110
    106111
  • themes-assistant/trunk/themes-assistant.php

    r3111839 r3201062  
    44 * Description: Advance Themeies Assistant is a user-friendly WordPress plugin that simplifies and enhances your theme customization experience. Effortlessly tweak colors, layouts, styles, and designs to bring your creative vision to life. Save time and personalize your website with ease using Themeies Assistant..
    55 * Plugin URI: https://themeies.com/item/themes-assistant
    6  * Version: 1.0.2
     6 * Version: 1.0.3
    77 * Requires at least: 6.0
    88 * Requires PHP: 7.4
     
    3838 * AT_Assistant_Main class
    3939 */
    40 final class AT_Assistant_Main {
     40final class ATA_Main {
    4141
    4242    /**
     
    4646     * @var string The plugin version.
    4747     */
    48     const AT_ASSISTANT_VERSION = '1.0.2';
    49 
     48    // const ATA_VERSION = '1.0.2';
     49    const ATA_VERSION = '1.0.2';
     50   
    5051    /**
    5152     * Minimum PHP Version
     
    5455     * @var string Minimum PHP version required to run the plugin.
    5556     */
    56     const AT_ASSISTANT_MINIMUM_PHP_VERSION = '7.4';
     57    const ATA_MINIMUM_PHP_VERSION = '7.4';
    5758
    5859
     
    6869         */
    6970        $this->define_constants();
     71
     72        register_activation_hook( ATA__FILE__ , [$this, 'activate'] );
    7073
    7174        // Load translation.
     
    105108         * Global function Initial
    106109         */
    107         new AT_Assistant\GlobalFunctions();
     110        new ATA\AtaGlobalControl();
    108111
    109112        /**
     
    112115        if ( is_admin() ) {
    113116            // Enqueue all admin styles and scripts.
    114             new AT_Assistant\AdminPanel();
     117            new ATA\AdminPanel();
    115118        } else {
    116119            // Manage All frontend functionality.
    117             new AT_Assistant\FrontendPanel();
     120            new ATA\FrontendPanel();
    118121        }
    119122    }
     
    125128     */
    126129    public function define_constants() {
    127         define( 'AT_ASSISTANT_VERSION', self::AT_ASSISTANT_VERSION );
    128         define( 'AT_ASSISTANT__FILE__', __FILE__ );
    129         define( 'AT_ASSISTANT_PLUGIN_BASE', plugin_basename( AT_ASSISTANT__FILE__ ) );
    130         define( 'AT_ASSISTANT_PATH', plugin_dir_path( AT_ASSISTANT__FILE__ ) );
    131         define( 'AT_ASSISTANT_ASSETS_PATH', AT_ASSISTANT_PATH . 'assets/' );
    132         define( 'AT_ASSISTANT_MODULES_PATH', AT_ASSISTANT_PATH . 'modules/' );
    133         define( 'AT_ASSISTANT_URL', plugins_url( '/', AT_ASSISTANT__FILE__ ) );
    134         define( 'AT_ASSISTANT_ASSETS_URL', AT_ASSISTANT_URL . 'assets/' );
    135         define( 'AT_ASSISTANT_MODULES_URL', AT_ASSISTANT_URL . 'modules/' );
    136         define( 'AT_ASSISTANT_WIDGET_DIR', plugin_dir_path( __FILE__ ) . 'inc/Admin/views/widgets/style/' );
     130        if ( ! defined( 'ATA_VERSION' ) ) {
     131            // Replace the ATA_VERSION number of the theme on each release.
     132            $mode   = 'dev'; /*build*/
     133            if ('dev' == $mode) {
     134                define( 'ATA_VERSION', time() );
     135            }else{
     136                define( 'ATA_VERSION', self::ATA_VERSION  );
     137            }
     138        }
     139        // define( 'ATA_VERSION', self::ATA_VERSION );
     140        define( 'ATA__FILE__', __FILE__ );
     141        define( 'ATA_PLUGIN_BASE', plugin_basename( ATA__FILE__ ) );
     142        define( 'ATA_PATH', plugin_dir_path( ATA__FILE__ ) );
     143        define( 'ATA_ASSETS_PATH', ATA_PATH . 'assets/' );
     144        define( 'ATA_MODULES_PATH', ATA_PATH . 'modules/' );
     145        define( 'ATA_URL', plugins_url( '/', ATA__FILE__ ) );
     146        define( 'ATA_ASSETS_URL', ATA_URL . 'assets/' );
     147        define( 'ATA_MODULES_URL', ATA_URL . 'modules/' );
     148        define( 'ATA_IMAGE', ATA_URL . 'assets/img' );
     149        define( 'ATA_WIDGET_DIR', plugin_dir_path( __FILE__ ) . 'inc/Admin/Views/Widgets/style/' );
     150        define( 'ATA_BASE_PRO', 'https://wpborax.com/');
    137151    }
    138152
     
    144158     */
    145159    public function activate() {
     160        $installer = new ATA\AtaInstaller();
     161        $installer->run();
    146162    }
    147163
     
    170186            '<strong>' . esc_html__( 'Themes Assistant Plugin', 'themes-assistant' ) . '</strong>',
    171187            '<strong>' . esc_html__( 'PHP', 'themes-assistant' ) . '</strong>',
    172             self::AT_ASSISTANT_MINIMUM_PHP_VERSION
     188            self::ATA_MINIMUM_PHP_VERSION
    173189        );
    174190        printf( '<div class="notice notice-warning is-dismissible"><p>%1$s</p></div>', esc_html( $message ) );
     
    177193
    178194// Instantiate Themeie_Assistant_Plugin.
    179 new AT_Assistant_Main();
     195new ATA_Main();
  • themes-assistant/trunk/vendor/composer/autoload_psr4.php

    r3111839 r3201062  
    77
    88return array(
    9     'AT_Assistant\\' => array($baseDir . '/inc'),
     9    'ATA\\' => array($baseDir . '/inc'),
    1010);
  • themes-assistant/trunk/vendor/composer/autoload_static.php

    r3111839 r3201062  
    1414        'A' =>
    1515        array (
    16             'AT_Assistant\\' => 13,
     16            'ATA\\' => 4,
    1717        ),
    1818    );
    1919
    2020    public static $prefixDirsPsr4 = array (
    21         'AT_Assistant\\' =>
     21        'ATA\\' =>
    2222        array (
    2323            0 => __DIR__ . '/../..' . '/inc',
  • themes-assistant/trunk/vendor/composer/installed.php

    r3111839 r3201062  
    44        'pretty_version' => 'dev-main',
    55        'version' => 'dev-main',
    6         'reference' => 'd0b31ff28df60a4ff33fc67f63fa068a7fa2d2d2',
     6        'reference' => '704692abef2b3a41b3a67f59eca654af60051687',
    77        'type' => 'wordpress-plugin',
    88        'install_path' => __DIR__ . '/../../',
     
    1414            'pretty_version' => 'dev-main',
    1515            'version' => 'dev-main',
    16             'reference' => 'd0b31ff28df60a4ff33fc67f63fa068a7fa2d2d2',
     16            'reference' => '704692abef2b3a41b3a67f59eca654af60051687',
    1717            'type' => 'wordpress-plugin',
    1818            'install_path' => __DIR__ . '/../../',
Note: See TracChangeset for help on using the changeset viewer.