Changeset 2535480
- Timestamp:
- 05/21/2021 01:01:30 PM (5 years ago)
- Location:
- outfunnel
- Files:
-
- 2 added
- 14 edited
- 1 copied
-
tags/2.1.0 (copied) (copied from outfunnel/trunk)
-
tags/2.1.0/autoloader.php (modified) (3 diffs)
-
tags/2.1.0/commit.txt (modified) (1 diff)
-
tags/2.1.0/forms/contactform7.php (added)
-
tags/2.1.0/forms/elementor.php (modified) (1 diff)
-
tags/2.1.0/forms/form.php (modified) (1 diff)
-
tags/2.1.0/languages/outfunnel.pot (modified) (5 diffs)
-
tags/2.1.0/outfunnel.php (modified) (9 diffs)
-
tags/2.1.0/readme.txt (modified) (2 diffs)
-
trunk/autoloader.php (modified) (3 diffs)
-
trunk/commit.txt (modified) (1 diff)
-
trunk/forms/contactform7.php (added)
-
trunk/forms/elementor.php (modified) (1 diff)
-
trunk/forms/form.php (modified) (1 diff)
-
trunk/languages/outfunnel.pot (modified) (5 diffs)
-
trunk/outfunnel.php (modified) (9 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
outfunnel/tags/2.1.0/autoloader.php
r2531821 r2535480 3 3 4 4 class Autoloader { 5 6 /**7 * @var String8 */9 private const ELEMENTOR_PRO_NAMESPACE_PREFIX = 'ElementorPro';10 11 5 public static $loader; 12 6 … … 19 13 } 20 14 21 private function __construct() {15 private function __construct() { 22 16 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 } 51 18 52 19 /** … … 55 22 */ 56 23 public static function autoload_outfunnel($class) { 57 if ( 0 !== strpos( $class, __NAMESPACE__ ) ) {24 if ( 0 !== strpos( $class, __NAMESPACE__ ) ) { 58 25 return; 59 26 } -
outfunnel/tags/2.1.0/commit.txt
r2531821 r2535480 1 92b0008c6693fd2a37fa83a63a6952b3ee507e2e1 52c00a5215cbf60fc5ab1be753de1d8c3053d16e -
outfunnel/tags/2.1.0/forms/elementor.php
r2531821 r2535480 42 42 */ 43 43 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); 45 48 } 46 49 -
outfunnel/tags/2.1.0/forms/form.php
r2531821 r2535480 7 7 public function get_all_forms(); 8 8 public function get_plugin_version(); 9 public function run_webhook($record, $handler);10 9 } -
outfunnel/tags/2.1.0/languages/outfunnel.pot
r2531821 r2535480 7 7 msgid "" 8 8 msgstr "" 9 "Project-Id-Version: outfunnel 2. 0.0\n"9 "Project-Id-Version: outfunnel 2.1.0\n" 10 10 "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" 12 12 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 13 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 18 18 "Content-Transfer-Encoding: 8bit\n" 19 19 20 #: outfunnel.php:1 1620 #: outfunnel.php:123 21 21 msgid "Settings" 22 22 msgstr "" 23 23 24 #: outfunnel.php:1 7524 #: outfunnel.php:183 25 25 msgid "Outfunnel" 26 26 msgstr "" 27 27 28 #: outfunnel.php:1 8628 #: outfunnel.php:194 29 29 msgid "Web tracking configuration" 30 30 msgstr "" 31 31 32 #: outfunnel.php: 19332 #: outfunnel.php:201 33 33 msgid "Tracking ID" 34 34 msgstr "" 35 35 36 #: outfunnel.php:20 136 #: outfunnel.php:209 37 37 msgid "Web forms integration" 38 38 msgstr "" 39 39 40 #: outfunnel.php:2 0840 #: outfunnel.php:216 41 41 msgid "Account email" 42 42 msgstr "" 43 43 44 #: outfunnel.php:2 1644 #: outfunnel.php:224 45 45 msgid "API key" 46 46 msgstr "" 47 47 48 #: outfunnel.php:2 5348 #: outfunnel.php:261 49 49 #, php-format 50 50 msgid "" … … 53 53 msgstr "" 54 54 55 #: outfunnel.php:2 8455 #: outfunnel.php:292 56 56 msgid "Something went wrong" 57 57 msgstr "" 58 58 59 #: outfunnel.php:3 0959 #: outfunnel.php:317 60 60 #, php-format 61 61 msgid "" … … 65 65 msgstr "" 66 66 67 #: outfunnel.php:3 1767 #: outfunnel.php:325 68 68 msgid "Enter your Outfunnel Tracking ID for this website" 69 69 msgstr "" 70 70 71 #: outfunnel.php:3 2571 #: outfunnel.php:333 72 72 #, php-format 73 73 msgid "" … … 77 77 msgstr "" 78 78 79 #: outfunnel.php:3 3379 #: outfunnel.php:341 80 80 msgid "Enter your Outfunnel account email" 81 81 msgstr "" 82 82 83 #: outfunnel.php:3 4283 #: outfunnel.php:350 84 84 msgid "Enter your Outfunnel API key" 85 85 msgstr "" -
outfunnel/tags/2.1.0/outfunnel.php
r2531821 r2535480 2 2 /* 3 3 Plugin Name: Outfunnel 4 Version: 2. 0.04 Version: 2.1.0 5 5 Author: andrisreinman 6 6 Author URI: https://outfunnel.com/ … … 12 12 namespace Outfunnel; 13 13 14 use Outfunnel\Forms\ContactForm7; 14 15 use Outfunnel\Forms\Elementor; 15 16 use Outfunnel\Forms\Form; … … 25 26 class OUTFUNNEL { 26 27 27 public $plugin_version = '2. 0.0';28 public $plugin_version = '2.1.0'; 28 29 29 30 /** … … 32 33 private $elementor; 33 34 35 /** 36 * @var Form 37 */ 38 private $contact_form_7; 39 34 40 public function __construct() { 35 41 Autoloader::init(); … … 64 70 65 71 if (!defined('OF_SUPPORTED_FORM_SOURCES')) { 66 define('OF_SUPPORTED_FORM_SOURCES', ['elementor' ]);72 define('OF_SUPPORTED_FORM_SOURCES', ['elementor', 'contact-form-7']); 67 73 } 68 74 … … 101 107 public function plugins_loaded_handler() { 102 108 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(); 104 111 } 105 112 … … 127 134 128 135 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; 131 140 } 132 141 … … 138 147 139 148 if ($form_source === null) { 140 die();141 149 return [ 142 150 'errors' => [[ … … 154 162 register_rest_route( 155 163 'outfunnel/v2', 156 '/form-sources/(?P<form_source> \w+)/forms',164 '/form-sources/(?P<form_source>[a-zA-Z0-9_-]+)/forms', 157 165 [ 158 166 'methods' => 'GET', -
outfunnel/tags/2.1.0/readme.txt
r2531821 r2535480 4 4 Requires at least: 4.2 5 5 Tested up to: 5.7.2 6 Stable tag: 2. 0.06 Stable tag: 2.1.0 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 40 40 == Changelog == 41 41 42 = 2.1.0 = 43 44 * Contact Form 7 integration support 45 42 46 = 2.0.0 = 43 47 -
outfunnel/trunk/autoloader.php
r2531821 r2535480 3 3 4 4 class Autoloader { 5 6 /**7 * @var String8 */9 private const ELEMENTOR_PRO_NAMESPACE_PREFIX = 'ElementorPro';10 11 5 public static $loader; 12 6 … … 19 13 } 20 14 21 private function __construct() {15 private function __construct() { 22 16 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 } 51 18 52 19 /** … … 55 22 */ 56 23 public static function autoload_outfunnel($class) { 57 if ( 0 !== strpos( $class, __NAMESPACE__ ) ) {24 if ( 0 !== strpos( $class, __NAMESPACE__ ) ) { 58 25 return; 59 26 } -
outfunnel/trunk/commit.txt
r2531821 r2535480 1 92b0008c6693fd2a37fa83a63a6952b3ee507e2e1 52c00a5215cbf60fc5ab1be753de1d8c3053d16e -
outfunnel/trunk/forms/elementor.php
r2531821 r2535480 42 42 */ 43 43 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); 45 48 } 46 49 -
outfunnel/trunk/forms/form.php
r2531821 r2535480 7 7 public function get_all_forms(); 8 8 public function get_plugin_version(); 9 public function run_webhook($record, $handler);10 9 } -
outfunnel/trunk/languages/outfunnel.pot
r2531821 r2535480 7 7 msgid "" 8 8 msgstr "" 9 "Project-Id-Version: outfunnel 2. 0.0\n"9 "Project-Id-Version: outfunnel 2.1.0\n" 10 10 "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" 12 12 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 13 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 18 18 "Content-Transfer-Encoding: 8bit\n" 19 19 20 #: outfunnel.php:1 1620 #: outfunnel.php:123 21 21 msgid "Settings" 22 22 msgstr "" 23 23 24 #: outfunnel.php:1 7524 #: outfunnel.php:183 25 25 msgid "Outfunnel" 26 26 msgstr "" 27 27 28 #: outfunnel.php:1 8628 #: outfunnel.php:194 29 29 msgid "Web tracking configuration" 30 30 msgstr "" 31 31 32 #: outfunnel.php: 19332 #: outfunnel.php:201 33 33 msgid "Tracking ID" 34 34 msgstr "" 35 35 36 #: outfunnel.php:20 136 #: outfunnel.php:209 37 37 msgid "Web forms integration" 38 38 msgstr "" 39 39 40 #: outfunnel.php:2 0840 #: outfunnel.php:216 41 41 msgid "Account email" 42 42 msgstr "" 43 43 44 #: outfunnel.php:2 1644 #: outfunnel.php:224 45 45 msgid "API key" 46 46 msgstr "" 47 47 48 #: outfunnel.php:2 5348 #: outfunnel.php:261 49 49 #, php-format 50 50 msgid "" … … 53 53 msgstr "" 54 54 55 #: outfunnel.php:2 8455 #: outfunnel.php:292 56 56 msgid "Something went wrong" 57 57 msgstr "" 58 58 59 #: outfunnel.php:3 0959 #: outfunnel.php:317 60 60 #, php-format 61 61 msgid "" … … 65 65 msgstr "" 66 66 67 #: outfunnel.php:3 1767 #: outfunnel.php:325 68 68 msgid "Enter your Outfunnel Tracking ID for this website" 69 69 msgstr "" 70 70 71 #: outfunnel.php:3 2571 #: outfunnel.php:333 72 72 #, php-format 73 73 msgid "" … … 77 77 msgstr "" 78 78 79 #: outfunnel.php:3 3379 #: outfunnel.php:341 80 80 msgid "Enter your Outfunnel account email" 81 81 msgstr "" 82 82 83 #: outfunnel.php:3 4283 #: outfunnel.php:350 84 84 msgid "Enter your Outfunnel API key" 85 85 msgstr "" -
outfunnel/trunk/outfunnel.php
r2531821 r2535480 2 2 /* 3 3 Plugin Name: Outfunnel 4 Version: 2. 0.04 Version: 2.1.0 5 5 Author: andrisreinman 6 6 Author URI: https://outfunnel.com/ … … 12 12 namespace Outfunnel; 13 13 14 use Outfunnel\Forms\ContactForm7; 14 15 use Outfunnel\Forms\Elementor; 15 16 use Outfunnel\Forms\Form; … … 25 26 class OUTFUNNEL { 26 27 27 public $plugin_version = '2. 0.0';28 public $plugin_version = '2.1.0'; 28 29 29 30 /** … … 32 33 private $elementor; 33 34 35 /** 36 * @var Form 37 */ 38 private $contact_form_7; 39 34 40 public function __construct() { 35 41 Autoloader::init(); … … 64 70 65 71 if (!defined('OF_SUPPORTED_FORM_SOURCES')) { 66 define('OF_SUPPORTED_FORM_SOURCES', ['elementor' ]);72 define('OF_SUPPORTED_FORM_SOURCES', ['elementor', 'contact-form-7']); 67 73 } 68 74 … … 101 107 public function plugins_loaded_handler() { 102 108 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(); 104 111 } 105 112 … … 127 134 128 135 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; 131 140 } 132 141 … … 138 147 139 148 if ($form_source === null) { 140 die();141 149 return [ 142 150 'errors' => [[ … … 154 162 register_rest_route( 155 163 'outfunnel/v2', 156 '/form-sources/(?P<form_source> \w+)/forms',164 '/form-sources/(?P<form_source>[a-zA-Z0-9_-]+)/forms', 157 165 [ 158 166 'methods' => 'GET', -
outfunnel/trunk/readme.txt
r2531821 r2535480 4 4 Requires at least: 4.2 5 5 Tested up to: 5.7.2 6 Stable tag: 2. 0.06 Stable tag: 2.1.0 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 40 40 == Changelog == 41 41 42 = 2.1.0 = 43 44 * Contact Form 7 integration support 45 42 46 = 2.0.0 = 43 47
Note: See TracChangeset
for help on using the changeset viewer.