Plugin Directory

Changeset 2535480


Ignore:
Timestamp:
05/21/2021 01:01:30 PM (5 years ago)
Author:
outfunnel
Message:

Tagged v2.1.0

Location:
outfunnel
Files:
2 added
14 edited
1 copied

Legend:

Unmodified
Added
Removed
  • outfunnel/tags/2.1.0/autoloader.php

    r2531821 r2535480  
    33
    44class Autoloader {
    5 
    6     /**
    7      * @var String
    8      */
    9     private const ELEMENTOR_PRO_NAMESPACE_PREFIX = 'ElementorPro';
    10 
    115    public static $loader;
    126
     
    1913    }
    2014
    21     private function __construct() {
     15    private function __construct() {
    2216        spl_autoload_register( [ $this, 'autoload_outfunnel' ] );
    23         spl_autoload_register( [ $this, 'autoload_elementor' ] );
    24     }
    25 
    26     /**
    27      * @param String $class
    28      * @return void
    29      */
    30     public static function autoload_elementor($class) {
    31         if ( 0 !== strpos( $class, self::ELEMENTOR_PRO_NAMESPACE_PREFIX ) ) {
    32             return;
    33         }
    34 
    35         if (!class_exists( $class ) ) {
    36             $filename = strtolower(
    37                 preg_replace(
    38                     [ '/^' . __NAMESPACE__ . '\\\/', '/([a-z])([A-Z])/', '/_/', '/\\\/' ],
    39                     [ '', '$1-$2', '-', DIRECTORY_SEPARATOR ],
    40                     $class
    41                 )
    42             );
    43 
    44             $filename = WP_PLUGIN_DIR . DIRECTORY_SEPARATOR . $filename . '.php';
    45 
    46             if ( is_readable( $filename ) ) {
    47                 include( $filename );
    48             }
    49         }
    50     }
     17    }
    5118
    5219    /**
     
    5522     */
    5623    public static function autoload_outfunnel($class) {
    57         if ( 0 !== strpos( $class, __NAMESPACE__ ) ) {
     24        if ( 0 !== strpos( $class, __NAMESPACE__ ) ) {
    5825            return;
    5926        }
  • outfunnel/tags/2.1.0/commit.txt

    r2531821 r2535480  
    1 92b0008c6693fd2a37fa83a63a6952b3ee507e2e
     152c00a5215cbf60fc5ab1be753de1d8c3053d16e
  • outfunnel/tags/2.1.0/forms/elementor.php

    r2531821 r2535480  
    4242     */
    4343    public function is_form_plugin_active() {
    44         return is_plugin_active( self::ELEMENTOR_PRO_PLUGIN_NAME . '/elementor-pro.php' );
     44        return is_plugin_active( self::ELEMENTOR_PRO_PLUGIN_NAME . '/elementor-pro.php' )
     45        && class_exists(Form_Snapshot_Repository::class)
     46        && class_exists(Ajax_Handler::class)
     47        && class_exists(Form_Record::class);
    4548    }
    4649
  • outfunnel/tags/2.1.0/forms/form.php

    r2531821 r2535480  
    77    public function get_all_forms();
    88    public function get_plugin_version();
    9     public function run_webhook($record, $handler);
    109}
  • outfunnel/tags/2.1.0/languages/outfunnel.pot

    r2531821 r2535480  
    77msgid ""
    88msgstr ""
    9 "Project-Id-Version: outfunnel 2.0.0\n"
     9"Project-Id-Version: outfunnel 2.1.0\n"
    1010"Report-Msgid-Bugs-To: devel@outfunnel.com\n"
    11 "POT-Creation-Date: 2021-05-14 15:42+0000\n"
     11"POT-Creation-Date: 2021-05-21 13:01+0000\n"
    1212"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1313"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1818"Content-Transfer-Encoding: 8bit\n"
    1919
    20 #: outfunnel.php:116
     20#: outfunnel.php:123
    2121msgid "Settings"
    2222msgstr ""
    2323
    24 #: outfunnel.php:175
     24#: outfunnel.php:183
    2525msgid "Outfunnel"
    2626msgstr ""
    2727
    28 #: outfunnel.php:186
     28#: outfunnel.php:194
    2929msgid "Web tracking configuration"
    3030msgstr ""
    3131
    32 #: outfunnel.php:193
     32#: outfunnel.php:201
    3333msgid "Tracking ID"
    3434msgstr ""
    3535
    36 #: outfunnel.php:201
     36#: outfunnel.php:209
    3737msgid "Web forms integration"
    3838msgstr ""
    3939
    40 #: outfunnel.php:208
     40#: outfunnel.php:216
    4141msgid "Account email"
    4242msgstr ""
    4343
    44 #: outfunnel.php:216
     44#: outfunnel.php:224
    4545msgid "API key"
    4646msgstr ""
    4747
    48 #: outfunnel.php:253
     48#: outfunnel.php:261
    4949#, php-format
    5050msgid ""
     
    5353msgstr ""
    5454
    55 #: outfunnel.php:284
     55#: outfunnel.php:292
    5656msgid "Something went wrong"
    5757msgstr ""
    5858
    59 #: outfunnel.php:309
     59#: outfunnel.php:317
    6060#, php-format
    6161msgid ""
     
    6565msgstr ""
    6666
    67 #: outfunnel.php:317
     67#: outfunnel.php:325
    6868msgid "Enter your Outfunnel Tracking ID for this website"
    6969msgstr ""
    7070
    71 #: outfunnel.php:325
     71#: outfunnel.php:333
    7272#, php-format
    7373msgid ""
     
    7777msgstr ""
    7878
    79 #: outfunnel.php:333
     79#: outfunnel.php:341
    8080msgid "Enter your Outfunnel account email"
    8181msgstr ""
    8282
    83 #: outfunnel.php:342
     83#: outfunnel.php:350
    8484msgid "Enter your Outfunnel API key"
    8585msgstr ""
  • outfunnel/tags/2.1.0/outfunnel.php

    r2531821 r2535480  
    22/*
    33Plugin Name: Outfunnel
    4 Version: 2.0.0
     4Version: 2.1.0
    55Author: andrisreinman
    66Author URI: https://outfunnel.com/
     
    1212namespace Outfunnel;
    1313
     14use Outfunnel\Forms\ContactForm7;
    1415use Outfunnel\Forms\Elementor;
    1516use Outfunnel\Forms\Form;
     
    2526    class OUTFUNNEL {
    2627
    27         public $plugin_version = '2.0.0';
     28        public $plugin_version = '2.1.0';
    2829
    2930        /**
     
    3233        private $elementor;
    3334
     35        /**
     36         * @var Form
     37         */
     38        private $contact_form_7;
     39
    3440        public function __construct() {
    3541            Autoloader::init();
     
    6470
    6571            if (!defined('OF_SUPPORTED_FORM_SOURCES')) {
    66                 define('OF_SUPPORTED_FORM_SOURCES', ['elementor']);
     72                define('OF_SUPPORTED_FORM_SOURCES', ['elementor', 'contact-form-7']);
    6773            }
    6874
     
    101107        public function plugins_loaded_handler() {
    102108            load_plugin_textdomain('outfunnel', false, dirname(plugin_basename(__FILE__)) . '/languages/');
    103             $this->$elementor = Elementor::instance();
     109            $this->elementor = Elementor::instance();
     110            $this->contact_form_7 = ContactForm7::instance();
    104111        }
    105112
     
    127134
    128135        private function get_form_source($form_source) {
    129             if ($this->$$form_source) {
    130                 return $this->$$form_source;
     136            $source = str_replace('-', '_', $form_source);
     137
     138            if ($this->$source) {
     139                return $this->$source;
    131140            }
    132141
     
    138147
    139148            if ($form_source === null) {
    140                 die();
    141149                return [
    142150                    'errors' => [[
     
    154162            register_rest_route(
    155163                'outfunnel/v2',
    156                 '/form-sources/(?P<form_source>\w+)/forms',
     164                '/form-sources/(?P<form_source>[a-zA-Z0-9_-]+)/forms',
    157165                [
    158166                    'methods' => 'GET',
  • outfunnel/tags/2.1.0/readme.txt

    r2531821 r2535480  
    44Requires at least: 4.2
    55Tested up to: 5.7.2
    6 Stable tag: 2.0.0
     6Stable tag: 2.1.0
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    4040== Changelog ==
    4141
     42= 2.1.0 =
     43
     44* Contact Form 7 integration support
     45
    4246= 2.0.0 =
    4347
  • outfunnel/trunk/autoloader.php

    r2531821 r2535480  
    33
    44class Autoloader {
    5 
    6     /**
    7      * @var String
    8      */
    9     private const ELEMENTOR_PRO_NAMESPACE_PREFIX = 'ElementorPro';
    10 
    115    public static $loader;
    126
     
    1913    }
    2014
    21     private function __construct() {
     15    private function __construct() {
    2216        spl_autoload_register( [ $this, 'autoload_outfunnel' ] );
    23         spl_autoload_register( [ $this, 'autoload_elementor' ] );
    24     }
    25 
    26     /**
    27      * @param String $class
    28      * @return void
    29      */
    30     public static function autoload_elementor($class) {
    31         if ( 0 !== strpos( $class, self::ELEMENTOR_PRO_NAMESPACE_PREFIX ) ) {
    32             return;
    33         }
    34 
    35         if (!class_exists( $class ) ) {
    36             $filename = strtolower(
    37                 preg_replace(
    38                     [ '/^' . __NAMESPACE__ . '\\\/', '/([a-z])([A-Z])/', '/_/', '/\\\/' ],
    39                     [ '', '$1-$2', '-', DIRECTORY_SEPARATOR ],
    40                     $class
    41                 )
    42             );
    43 
    44             $filename = WP_PLUGIN_DIR . DIRECTORY_SEPARATOR . $filename . '.php';
    45 
    46             if ( is_readable( $filename ) ) {
    47                 include( $filename );
    48             }
    49         }
    50     }
     17    }
    5118
    5219    /**
     
    5522     */
    5623    public static function autoload_outfunnel($class) {
    57         if ( 0 !== strpos( $class, __NAMESPACE__ ) ) {
     24        if ( 0 !== strpos( $class, __NAMESPACE__ ) ) {
    5825            return;
    5926        }
  • outfunnel/trunk/commit.txt

    r2531821 r2535480  
    1 92b0008c6693fd2a37fa83a63a6952b3ee507e2e
     152c00a5215cbf60fc5ab1be753de1d8c3053d16e
  • outfunnel/trunk/forms/elementor.php

    r2531821 r2535480  
    4242     */
    4343    public function is_form_plugin_active() {
    44         return is_plugin_active( self::ELEMENTOR_PRO_PLUGIN_NAME . '/elementor-pro.php' );
     44        return is_plugin_active( self::ELEMENTOR_PRO_PLUGIN_NAME . '/elementor-pro.php' )
     45        && class_exists(Form_Snapshot_Repository::class)
     46        && class_exists(Ajax_Handler::class)
     47        && class_exists(Form_Record::class);
    4548    }
    4649
  • outfunnel/trunk/forms/form.php

    r2531821 r2535480  
    77    public function get_all_forms();
    88    public function get_plugin_version();
    9     public function run_webhook($record, $handler);
    109}
  • outfunnel/trunk/languages/outfunnel.pot

    r2531821 r2535480  
    77msgid ""
    88msgstr ""
    9 "Project-Id-Version: outfunnel 2.0.0\n"
     9"Project-Id-Version: outfunnel 2.1.0\n"
    1010"Report-Msgid-Bugs-To: devel@outfunnel.com\n"
    11 "POT-Creation-Date: 2021-05-14 15:42+0000\n"
     11"POT-Creation-Date: 2021-05-21 13:01+0000\n"
    1212"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1313"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1818"Content-Transfer-Encoding: 8bit\n"
    1919
    20 #: outfunnel.php:116
     20#: outfunnel.php:123
    2121msgid "Settings"
    2222msgstr ""
    2323
    24 #: outfunnel.php:175
     24#: outfunnel.php:183
    2525msgid "Outfunnel"
    2626msgstr ""
    2727
    28 #: outfunnel.php:186
     28#: outfunnel.php:194
    2929msgid "Web tracking configuration"
    3030msgstr ""
    3131
    32 #: outfunnel.php:193
     32#: outfunnel.php:201
    3333msgid "Tracking ID"
    3434msgstr ""
    3535
    36 #: outfunnel.php:201
     36#: outfunnel.php:209
    3737msgid "Web forms integration"
    3838msgstr ""
    3939
    40 #: outfunnel.php:208
     40#: outfunnel.php:216
    4141msgid "Account email"
    4242msgstr ""
    4343
    44 #: outfunnel.php:216
     44#: outfunnel.php:224
    4545msgid "API key"
    4646msgstr ""
    4747
    48 #: outfunnel.php:253
     48#: outfunnel.php:261
    4949#, php-format
    5050msgid ""
     
    5353msgstr ""
    5454
    55 #: outfunnel.php:284
     55#: outfunnel.php:292
    5656msgid "Something went wrong"
    5757msgstr ""
    5858
    59 #: outfunnel.php:309
     59#: outfunnel.php:317
    6060#, php-format
    6161msgid ""
     
    6565msgstr ""
    6666
    67 #: outfunnel.php:317
     67#: outfunnel.php:325
    6868msgid "Enter your Outfunnel Tracking ID for this website"
    6969msgstr ""
    7070
    71 #: outfunnel.php:325
     71#: outfunnel.php:333
    7272#, php-format
    7373msgid ""
     
    7777msgstr ""
    7878
    79 #: outfunnel.php:333
     79#: outfunnel.php:341
    8080msgid "Enter your Outfunnel account email"
    8181msgstr ""
    8282
    83 #: outfunnel.php:342
     83#: outfunnel.php:350
    8484msgid "Enter your Outfunnel API key"
    8585msgstr ""
  • outfunnel/trunk/outfunnel.php

    r2531821 r2535480  
    22/*
    33Plugin Name: Outfunnel
    4 Version: 2.0.0
     4Version: 2.1.0
    55Author: andrisreinman
    66Author URI: https://outfunnel.com/
     
    1212namespace Outfunnel;
    1313
     14use Outfunnel\Forms\ContactForm7;
    1415use Outfunnel\Forms\Elementor;
    1516use Outfunnel\Forms\Form;
     
    2526    class OUTFUNNEL {
    2627
    27         public $plugin_version = '2.0.0';
     28        public $plugin_version = '2.1.0';
    2829
    2930        /**
     
    3233        private $elementor;
    3334
     35        /**
     36         * @var Form
     37         */
     38        private $contact_form_7;
     39
    3440        public function __construct() {
    3541            Autoloader::init();
     
    6470
    6571            if (!defined('OF_SUPPORTED_FORM_SOURCES')) {
    66                 define('OF_SUPPORTED_FORM_SOURCES', ['elementor']);
     72                define('OF_SUPPORTED_FORM_SOURCES', ['elementor', 'contact-form-7']);
    6773            }
    6874
     
    101107        public function plugins_loaded_handler() {
    102108            load_plugin_textdomain('outfunnel', false, dirname(plugin_basename(__FILE__)) . '/languages/');
    103             $this->$elementor = Elementor::instance();
     109            $this->elementor = Elementor::instance();
     110            $this->contact_form_7 = ContactForm7::instance();
    104111        }
    105112
     
    127134
    128135        private function get_form_source($form_source) {
    129             if ($this->$$form_source) {
    130                 return $this->$$form_source;
     136            $source = str_replace('-', '_', $form_source);
     137
     138            if ($this->$source) {
     139                return $this->$source;
    131140            }
    132141
     
    138147
    139148            if ($form_source === null) {
    140                 die();
    141149                return [
    142150                    'errors' => [[
     
    154162            register_rest_route(
    155163                'outfunnel/v2',
    156                 '/form-sources/(?P<form_source>\w+)/forms',
     164                '/form-sources/(?P<form_source>[a-zA-Z0-9_-]+)/forms',
    157165                [
    158166                    'methods' => 'GET',
  • outfunnel/trunk/readme.txt

    r2531821 r2535480  
    44Requires at least: 4.2
    55Tested up to: 5.7.2
    6 Stable tag: 2.0.0
     6Stable tag: 2.1.0
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    4040== Changelog ==
    4141
     42= 2.1.0 =
     43
     44* Contact Form 7 integration support
     45
    4246= 2.0.0 =
    4347
Note: See TracChangeset for help on using the changeset viewer.