Changeset 2943206
- Timestamp:
- 07/25/2023 04:50:22 PM (3 years ago)
- Location:
- aspiesoft-auto-embed/trunk
- Files:
-
- 8 edited
-
aspiesoft-auto-embed.php (modified) (4 diffs)
-
functions.php (modified) (6 diffs)
-
readme.txt (modified) (1 diff)
-
src/admin.php (modified) (1 diff)
-
src/assets/0settings.php (modified) (1 diff)
-
src/main.php (modified) (2 diffs)
-
src/settings.php (modified) (1 diff)
-
templates/admin.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
aspiesoft-auto-embed/trunk/aspiesoft-auto-embed.php
r2835721 r2943206 7 7 Plugin URI: https://github.com/AspieSoft/aspiesoft-auto-embed 8 8 Description: Easily Embed Dynamic Lazy Loading Youtube Videos And More Simply By Pasting The Url. 9 Version: 1.5. 79 Version: 1.5.8 10 10 Author: AspieSoft 11 11 Author URI: https://www.aspiesoft.com … … 123 123 // version added so updates to functions can still occur without breaking other plugins 124 124 require_once(plugin_dir_path(__FILE__).'functions.php'); 125 global $ aspieSoft_Functions_v1_3;126 self::$func = $ aspieSoft_Functions_v1_3;125 global $AspieSoft_Functions_v1_4; 126 self::$func = $AspieSoft_Functions_v1_4; 127 127 128 128 self::$options = self::$func::options($this->plugin); … … 164 164 $this->enableOptionsAutoload(); 165 165 } 166 //flush_rewrite_rules();166 flush_rewrite_rules(); 167 167 } 168 168 … … 171 171 $this->disableOptionsAutoload(); 172 172 } 173 //flush_rewrite_rules();173 flush_rewrite_rules(); 174 174 } 175 175 -
aspiesoft-auto-embed/trunk/functions.php
r2714980 r2943206 6 6 } 7 7 8 if(!class_exists('AspieSoft_Functions_v1_ 3')){9 10 class AspieSoft_Functions_v1_ 3{8 if(!class_exists('AspieSoft_Functions_v1_4')){ 9 10 class AspieSoft_Functions_v1_4{ 11 11 12 12 public static function startsWith($haystack, $needle){ … … 54 54 } 55 55 foreach($attr as $v){ 56 if( $v !== null){56 if(isset($v)){ 57 57 return $v; 58 58 } … … 103 103 if(is_multisite()){ 104 104 $option = sanitize_text_field(get_option($name)); 105 if(!isset($option) || !$option || $option === null ||$option === ''){105 if(!isset($option) || $option === ''){ 106 106 $option = sanitize_text_field(get_site_option($name)); 107 107 } … … 109 109 $option = sanitize_text_field(get_option($name)); 110 110 } 111 if(!isset($option) || !$option || $option === null ||$option === ''){111 if(!isset($option) || $option === ''){ 112 112 $option = $default; 113 113 } … … 186 186 if($onActivation){ 187 187 $value = self::options_get($plugin, $name, null, false); 188 if( $value && $value !== null){188 if(isset($value)){ 189 189 // twice with name change to force update 190 190 self::options_set($plugin, $name, 'autoload:'.$value, $global, $autoload); … … 205 205 } 206 206 207 global $ aspieSoft_Functions_v1_3;208 $ aspieSoft_Functions_v1_3 = new AspieSoft_Functions_v1_3();207 global $AspieSoft_Functions_v1_4; 208 $AspieSoft_Functions_v1_4 = new AspieSoft_Functions_v1_4(); 209 209 210 210 } -
aspiesoft-auto-embed/trunk/readme.txt
r2835721 r2943206 4 4 Requires at least: 3.0.1 5 5 Tested up to: 6.0.2 6 Stable tag: 1.5. 76 Stable tag: 1.5.8 7 7 Requires PHP: 5.2.4 8 8 License: GPLv2 or later -
aspiesoft-auto-embed/trunk/src/admin.php
r2714980 r2943206 22 22 $this->plugin = $pluginData; 23 23 require_once(plugin_dir_path(__FILE__).'../functions.php'); 24 global $ aspieSoft_Functions_v1_3;25 self::$func = $ aspieSoft_Functions_v1_3;24 global $AspieSoft_Functions_v1_4; 25 self::$func = $AspieSoft_Functions_v1_4; 26 26 self::$options = self::$func::options($this->plugin); 27 27 self::$optionsGlobal = self::$func::options(array('setting' => 'global')); -
aspiesoft-auto-embed/trunk/src/assets/0settings.php
r2714980 r2943206 25 25 $this->plugin = $pluginData; 26 26 require_once(plugin_dir_path(__FILE__) . '../../functions.php'); 27 global $ aspieSoft_Functions_v1_3;28 self::$func = $ aspieSoft_Functions_v1_3;27 global $AspieSoft_Functions_v1_4; 28 self::$func = $AspieSoft_Functions_v1_4; 29 29 } 30 30 -
aspiesoft-auto-embed/trunk/src/main.php
r2714980 r2943206 21 21 $this->plugin = $pluginData; 22 22 require_once(plugin_dir_path(__FILE__).'../functions.php'); 23 global $ aspieSoft_Functions_v1_3;24 self::$func = $ aspieSoft_Functions_v1_3;23 global $AspieSoft_Functions_v1_4; 24 self::$func = $AspieSoft_Functions_v1_4; 25 25 self::$options = self::$func::options($this->plugin); 26 26 } … … 37 37 38 38 $altShortcode_default = self::$options['get']('altShortcode_default'); 39 if( $altShortcode_default && $altShortcode_default !== null){39 if(isset($altShortcode_default)){ 40 40 add_shortcode($altShortcode_default, array($this, 'shortcode_Embed')); 41 41 } 42 42 43 43 $altShortcode = self::$options['get']('altShortcode'); 44 if( $altShortcode && $altShortcode !== null){ // add custom shortcode from settings, if it exists44 if(isset($altShortcode)){ // add custom shortcode from settings, if it exists 45 45 add_shortcode($altShortcode, array($this, 'shortcode_YoutubeEmbed')); 46 46 } -
aspiesoft-auto-embed/trunk/src/settings.php
r2714980 r2943206 25 25 ); 26 26 if (is_array($default)) { 27 if ( $default['width'] !== null) {27 if (isset($default['width'])) { 28 28 $sizes['width'] = $default['width']; 29 29 } 30 if ( $default['min-width'] !== null) {30 if (isset($default['min-width'])) { 31 31 $sizes['min-width'] = $default['min-width']; 32 32 } 33 if ( $default['max-width'] !== null) {33 if (isset($default['max-width'])) { 34 34 $sizes['max-width'] = $default['max-width']; 35 35 } 36 if ( $default['ratio'] !== null) {36 if (isset($default['ratio'])) { 37 37 $sizes['ratio'] = $default['ratio']; 38 38 } -
aspiesoft-auto-embed/trunk/templates/admin.php
r2714980 r2943206 33 33 34 34 // unique identifier to allow multiple sessions 35 $computerId = hash('sha256', sanitize_text_field($_SERVER['HTTP_USER_AGENT']).sanitize_text_field($_SERVER['LOCAL_ADDR']).sanitize_text_field($_SERVER['LOCAL_PORT']).sanitize_text_field($_SERVER['REMOTE_ADDR'])); 35 $computerId = ''; 36 if(isset($_SERVER['HTTP_USER_AGENT'])){ 37 $computerId .= sanitize_text_field($_SERVER['HTTP_USER_AGENT']); 38 } 39 if(isset($_SERVER['LOCAL_ADDR'])){ 40 $computerId .= sanitize_text_field($_SERVER['LOCAL_ADDR']); 41 } 42 if(isset($_SERVER['LOCAL_PORT'])){ 43 $computerId .= sanitize_text_field($_SERVER['LOCAL_PORT']); 44 } 45 if(isset($_SERVER['REMOTE_ADDR'])){ 46 $computerId .= sanitize_text_field($_SERVER['REMOTE_ADDR']); 47 } 48 $computerId = hash('sha256', $computerId); 36 49 37 50 // verify session token … … 172 185 // load common functions 173 186 require_once(plugin_dir_path(__FILE__).'../functions.php'); 174 global $ aspieSoft_Functions_v1_3;175 self::$func = $ aspieSoft_Functions_v1_3;187 global $AspieSoft_Functions_v1_4; 188 self::$func = $AspieSoft_Functions_v1_4; 176 189 } 177 190
Note: See TracChangeset
for help on using the changeset viewer.