Plugin Directory

Changeset 2645229


Ignore:
Timestamp:
12/16/2021 03:14:10 PM (4 years ago)
Author:
cvl01
Message:

Update to version 1.0.15 from GitHub

Location:
mylisting-elementor-toolkit
Files:
6 edited
1 copied

Legend:

Unmodified
Added
Removed
  • mylisting-elementor-toolkit/tags/1.0.15/ml-elementor-toolkit.php

    r2634177 r2645229  
    44 * Description: A simple Elementor addon that adds elementor functionality to parts of the My Listing theme.
    55 * Plugin URI:  https://yellowwave.eu/ml-elementor-toolkit
    6  * Version:     1.0.14
     6 * Version:     1.0.15
    77 * Author:      YellowWave
    88 * Author URI:  https://yellowwave.nl
     
    3333   * @var string The plugin version.
    3434   */
    35     const VERSION = '1.0.14';
     35    const VERSION = '1.0.15';
    3636 
    3737    /**
     
    6464        // $this->init();
    6565        // Init Plugin
    66         add_action( 'plugins_loaded', array( $this, 'init' ) );
     66        add_action( 'init', array( $this, 'init' ) );
    6767    }
    6868 
     
    103103        if (!defined( 'ELEMENTOR_PRO_VERSION' )) {
    104104            add_action( 'admin_notices', array( $this, 'admin_notice_missing_elementor_pro' ) );
     105            return;
     106        }
     107
     108        if(!function_exists('mylisting')){
     109            add_action( 'admin_notices', array( $this, 'admin_notice_missing_mylisting' ) );
    105110            return;
    106111        }
     
    164169        '<strong>' . esc_html__( 'Elementor Pro', 'ml-elementor-toolkit' ) . '</strong>'
    165170        );
     171 
     172        printf( '<div class="notice notice-warning is-dismissible"><p>%1$s</p></div>', $message );
     173    }
     174
     175    public function admin_notice_missing_mylisting() {
     176        if ( isset( $_GET['activate'] ) ) {
     177            unset( $_GET['activate'] );
     178        }
     179 
     180        $message = sprintf(
     181        /* translators: 1: Plugin name 2: Elementor */
     182        esc_html__( '"%1$s" requires "%2$s" to be installed and activated.', 'ml-elementor-toolkit-pro' ),
     183        '<strong>' . esc_html__( 'MyListing Elementor Toolkit', 'ml-elementor-toolkit-pro' ) . '</strong>',
     184        '<strong>' . esc_html__( 'My Listing Theme', 'ml-elementor-toolkit-pro' ) . '</strong>'
     185        );
    166186 
    167187        printf( '<div class="notice notice-warning is-dismissible"><p>%1$s</p></div>', $message );
  • mylisting-elementor-toolkit/tags/1.0.15/plugin.php

    r2634177 r2645229  
    121121        require_once( __DIR__ . '/conditions/listing-type.php' );
    122122   
    123         $conditions_manager->get_condition( 'job_listing' )->register_sub_condition( new Conditions\Listing_Type() );
     123        $job_listing = $conditions_manager->get_condition( 'job_listing' );
     124        if($job_listing){
     125            $job_listing->register_sub_condition( new Conditions\Listing_Type() );
     126        }
    124127    }
    125128
  • mylisting-elementor-toolkit/tags/1.0.15/readme.txt

    r2634177 r2645229  
    6464== Changelog ==
    6565
     66= 1.0.15 =
     67* Check if MyListing theme is active.
     68
    6669= 1.0.14 =
    6770* NEW: Review count (number of reviews) dynamic tag
  • mylisting-elementor-toolkit/trunk/ml-elementor-toolkit.php

    r2634177 r2645229  
    44 * Description: A simple Elementor addon that adds elementor functionality to parts of the My Listing theme.
    55 * Plugin URI:  https://yellowwave.eu/ml-elementor-toolkit
    6  * Version:     1.0.14
     6 * Version:     1.0.15
    77 * Author:      YellowWave
    88 * Author URI:  https://yellowwave.nl
     
    3333   * @var string The plugin version.
    3434   */
    35     const VERSION = '1.0.14';
     35    const VERSION = '1.0.15';
    3636 
    3737    /**
     
    6464        // $this->init();
    6565        // Init Plugin
    66         add_action( 'plugins_loaded', array( $this, 'init' ) );
     66        add_action( 'init', array( $this, 'init' ) );
    6767    }
    6868 
     
    103103        if (!defined( 'ELEMENTOR_PRO_VERSION' )) {
    104104            add_action( 'admin_notices', array( $this, 'admin_notice_missing_elementor_pro' ) );
     105            return;
     106        }
     107
     108        if(!function_exists('mylisting')){
     109            add_action( 'admin_notices', array( $this, 'admin_notice_missing_mylisting' ) );
    105110            return;
    106111        }
     
    164169        '<strong>' . esc_html__( 'Elementor Pro', 'ml-elementor-toolkit' ) . '</strong>'
    165170        );
     171 
     172        printf( '<div class="notice notice-warning is-dismissible"><p>%1$s</p></div>', $message );
     173    }
     174
     175    public function admin_notice_missing_mylisting() {
     176        if ( isset( $_GET['activate'] ) ) {
     177            unset( $_GET['activate'] );
     178        }
     179 
     180        $message = sprintf(
     181        /* translators: 1: Plugin name 2: Elementor */
     182        esc_html__( '"%1$s" requires "%2$s" to be installed and activated.', 'ml-elementor-toolkit-pro' ),
     183        '<strong>' . esc_html__( 'MyListing Elementor Toolkit', 'ml-elementor-toolkit-pro' ) . '</strong>',
     184        '<strong>' . esc_html__( 'My Listing Theme', 'ml-elementor-toolkit-pro' ) . '</strong>'
     185        );
    166186 
    167187        printf( '<div class="notice notice-warning is-dismissible"><p>%1$s</p></div>', $message );
  • mylisting-elementor-toolkit/trunk/plugin.php

    r2634177 r2645229  
    121121        require_once( __DIR__ . '/conditions/listing-type.php' );
    122122   
    123         $conditions_manager->get_condition( 'job_listing' )->register_sub_condition( new Conditions\Listing_Type() );
     123        $job_listing = $conditions_manager->get_condition( 'job_listing' );
     124        if($job_listing){
     125            $job_listing->register_sub_condition( new Conditions\Listing_Type() );
     126        }
    124127    }
    125128
  • mylisting-elementor-toolkit/trunk/readme.txt

    r2634177 r2645229  
    6464== Changelog ==
    6565
     66= 1.0.15 =
     67* Check if MyListing theme is active.
     68
    6669= 1.0.14 =
    6770* NEW: Review count (number of reviews) dynamic tag
Note: See TracChangeset for help on using the changeset viewer.