Changeset 3133899
- Timestamp:
- 08/12/2024 04:28:15 AM (20 months ago)
- Location:
- easywebsiteform
- Files:
-
- 35 added
- 2 edited
-
tags/1.2.0 (added)
-
tags/1.2.0/admin (added)
-
tags/1.2.0/admin/ewf-optionpanel.php (added)
-
tags/1.2.0/assets (added)
-
tags/1.2.0/assets/css (added)
-
tags/1.2.0/assets/css/options-style.css (added)
-
tags/1.2.0/assets/img (added)
-
tags/1.2.0/assets/img/API_key.png (added)
-
tags/1.2.0/assets/img/Iframe-loader.gif (added)
-
tags/1.2.0/assets/img/favicon.png (added)
-
tags/1.2.0/assets/img/logo.png (added)
-
tags/1.2.0/assets/js (added)
-
tags/1.2.0/assets/js/admin-js.js (added)
-
tags/1.2.0/assets/js/main-script.js (added)
-
tags/1.2.0/easywebsiteform.php (added)
-
tags/1.2.0/includes (added)
-
tags/1.2.0/includes/elementor (added)
-
tags/1.2.0/includes/elementor/ewf-elementor.php (added)
-
tags/1.2.0/includes/elementor/widgets (added)
-
tags/1.2.0/includes/elementor/widgets/ewform-widgets.php (added)
-
tags/1.2.0/includes/ewform-functions.php (added)
-
tags/1.2.0/includes/ewform-shortcode.php (added)
-
tags/1.2.0/includes/forms-tables.php (added)
-
tags/1.2.0/languages (added)
-
tags/1.2.0/languages/easywebsiteform.pot (added)
-
tags/1.2.0/readme.txt (added)
-
tags/1.2.0/template (added)
-
tags/1.2.0/template/ewform_display_setup_html.php (added)
-
tags/1.2.0/template/ewforms_display_table_html.php (added)
-
trunk/admin/ewf-optionpanel.php (added)
-
trunk/easywebsiteform.php (modified) (8 diffs)
-
trunk/includes/elementor/ewf-elementor.php (added)
-
trunk/includes/elementor/widgets/ewform-widgets.php (added)
-
trunk/includes/ewform-functions.php (added)
-
trunk/includes/ewform-shortcode.php (added)
-
trunk/includes/forms-tables.php (added)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
easywebsiteform/trunk/easywebsiteform.php
r3110143 r3133899 4 4 * Plugin URI: https://www.easywebsiteform.com/ 5 5 * Description: Integrate forms created with "Easy Website Form" Builder seamlessly into your WordPress site using the "Easy Website Form" plugin. 6 * Version: 1. 1.36 * Version: 1.2.0 7 7 * Requires at least: 5.2 8 8 * Requires PHP: 7.2 … … 16 16 17 17 /** 18 * Exit if accessed directly19 */18 * Exit if accessed directly 19 */ 20 20 21 if(!defined('ABSPATH') ) { die( "Don't try this" ); }; 21 if ( !defined( 'ABSPATH' ) ) {die( "Don't try this" );} 22 ; 22 23 23 if (!class_exists("Ewform_Form")){24 if ( !class_exists( "Ewform_Form" ) ) { 24 25 class Ewform_Form { 25 26 private static $instance = null; 26 function __construct() {27 add_action( "plugin_loaded", [$this, "init"]);28 add_action( "admin_enqueue_scripts", [$this, "ewfoptions_admin_assets"]);29 add_action( "wp_enqueue_scripts", [$this, "ewfoptions_frontend_assets"]);30 if ( !get_transient('ewform_api_notice_show')) {31 add_action( "ewform_notice_api", "ewform_api_key_not_set", 9999);27 function __construct() { 28 add_action( "plugin_loaded", [$this, "init"] ); 29 add_action( "admin_enqueue_scripts", [$this, "ewfoptions_admin_assets"] ); 30 add_action( "wp_enqueue_scripts", [$this, "ewfoptions_frontend_assets"] ); 31 if ( !get_transient( 'ewform_api_notice_show' ) ) { 32 add_action( "ewform_notice_api", "ewform_api_key_not_set", 9999 ); 32 33 } 33 34 } … … 36 37 * @return $instance 37 38 */ 38 public static function Instance() {39 if ( self::$instance == null) {39 public static function Instance() { 40 if ( self::$instance == null ) { 40 41 self::$instance = new Ewform_Form(); 41 42 } … … 47 48 * @return void 48 49 */ 49 function init() 50 { 50 function init() { 51 51 // Fire on plugins load and ready the textdomain for the plugin. 52 52 $this->ewform_load_textdomain(); 53 53 $this->defineConstants(); 54 // Fire on active the plugin55 register_activation_hook(__FILE__, [$this, "ewform_activation_callback"]);56 57 // Fire on deactivate the plugin58 register_deactivation_hook(__FILE__, [$this, "ewform_deactivation_callback"]);59 54 60 55 // Included Required Files 61 require_once "admin/ EWF_OptionPanel.php";62 require_once "includes/ewform _shortcode.php";63 require_once "includes/ewform _functions.php";64 require_once "includes/ Forms_Tables.php";65 require_once "includes/elementor/ EWF_Elementor.php";56 require_once "admin/ewf-optionpanel.php"; 57 require_once "includes/ewform-shortcode.php"; 58 require_once "includes/ewform-functions.php"; 59 require_once "includes/forms-tables.php"; 60 require_once "includes/elementor/ewf-elementor.php"; 66 61 } 67 62 … … 70 65 * @return void 71 66 */ 72 public function defineConstants(){ 73 if(!defined("EWFORM_URL")){ 74 define("EWFORM_URL", plugin_dir_url(__FILE__)); 75 } 76 if(!defined("EWFORM_PATH")){ 77 define("EWFORM_PATH", plugin_dir_path(__FILE__)); 78 } 79 if(!defined("EWFORM_API_URL")){ 80 define("EWFORM_API_URL", 'https://api.easywebsiteform.com/wp'); 81 } 82 if(!defined("EWFORM_FRONTEND_URL")){ 83 define("EWFORM_FRONTEND_URL", 'https://www.easywebsiteform.com'); 84 } 85 if(!defined("EWFORM_APPS_URL")){ 86 define("EWFORM_APPS_URL", 'https://apps.easywebsiteform.com'); 87 } 88 } 89 90 /** 91 * @return void 92 */ 93 function ewform_activation_callback() 94 { 95 } 96 97 /** 98 * @return void 99 */ 100 function ewform_deactivation_callback() 101 { 67 public function defineConstants() { 68 if ( !defined( "EWFORM_URL" ) ) { 69 define( "EWFORM_URL", plugin_dir_url( __FILE__ ) ); 70 } 71 if ( !defined( "EWFORM_PATH" ) ) { 72 define( "EWFORM_PATH", plugin_dir_path( __FILE__ ) ); 73 } 74 if ( !defined( "EWFORM_API_URL" ) ) { 75 define( "EWFORM_API_URL", 'https://api.easywebsiteform.com/wp' ); 76 } 77 if ( !defined( "EWFORM_FRONTEND_URL" ) ) { 78 define( "EWFORM_FRONTEND_URL", 'https://www.easywebsiteform.com' ); 79 } 80 if ( !defined( "EWFORM_APPS_URL" ) ) { 81 define( "EWFORM_APPS_URL", 'https://apps.easywebsiteform.com' ); 82 } 102 83 } 103 84 … … 106 87 * @return void 107 88 */ 108 function ewform_load_textdomain() {109 load_plugin_textdomain( "easywebsiteform", false, dirname(__FILE__) . "/languages");89 function ewform_load_textdomain() { 90 load_plugin_textdomain( "easywebsiteform", false, dirname( __FILE__ ) . "/languages" ); 110 91 } 111 92 … … 115 96 * @return void 116 97 */ 117 function ewfoptions_admin_assets( $screen){118 if ( "toplevel_page_ew_forms" == $screen || "easy-website-form_page_ewfoption" == $screen) {119 wp_enqueue_style( "ewfoptions_style", EWFORM_URL . "assets/css/options-style.css", [], '1.0.0', "all");120 wp_enqueue_script("ewfoptions_script", EWFORM_URL . "assets/js/admin-js.js", ['jquery'], '1.0.0', true); 121 $ajaxurl = admin_url("admin-ajax.php");122 $api_key = get_option('ewform_key') ? get_option('ewform_key') : '';123 $ security_nonce = wp_create_nonce("security_nonce");98 function ewfoptions_admin_assets( $screen ) { 99 if ( "toplevel_page_ew_forms" == $screen || "easy-website-form_page_ewfoption" == $screen ) { 100 wp_enqueue_style( "ewfoptions_style", EWFORM_URL . "assets/css/options-style.css", [], '1.0.0', "all" ); 101 102 /* Admin Script */ 103 wp_enqueue_script( "ewfoptions_script", EWFORM_URL . "assets/js/admin-js.js", ['jquery'], '1.0.0', true ); 104 $api_key = get_option( 'ewform_key' ) ? get_option( 'ewform_key' ) : ''; 124 105 $datas = [ 125 'ajaxurl' => $ajaxurl,126 'api_key' => $api_key,127 "security_nonce" => $security_nonce106 'ajaxurl' => admin_url( "admin-ajax.php" ), 107 'api_key' => $api_key, 108 "security_nonce" => wp_create_nonce( "security_nonce" ), 128 109 ]; 129 wp_localize_script( "ewfoptions_script", "obj", $datas);110 wp_localize_script( "ewfoptions_script", "obj", $datas ); 130 111 } 131 112 } 132 133 function ewfoptions_frontend_assets() {134 wp_enqueue_script( "ewfoptions_script", EWFORM_URL . "assets/js/main-script.js", ['jquery'], '1.0.0', true);113 114 function ewfoptions_frontend_assets() { 115 wp_enqueue_script( "ewfoptions_script", EWFORM_URL . "assets/js/main-script.js", ['jquery'], '1.0.0', true ); 135 116 136 117 } … … 138 119 } 139 120 // Instantiate Class 140 $Ewform_Form = Ewform_Form::Instance();121 $Ewform_Form = Ewform_Form::Instance(); -
easywebsiteform/trunk/readme.txt
r3132420 r3133899 5 5 Tested up to: 6.6.1 6 6 Requires PHP: 7.4 7 Stable tag: 1. 1.37 Stable tag: 1.2.0 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 65 65 == Changelog == 66 66 67 = 1.2.0 = 68 * Fixed elementor editor not loading issues 69 * Removed unused functions 70 * Renamed files name 71 67 72 = 1.1.3 = 68 73 * Tested Up 6.6.1
Note: See TracChangeset
for help on using the changeset viewer.