Changeset 3033821
- Timestamp:
- 02/09/2024 09:35:14 PM (2 years ago)
- Location:
- bright-link-previews/trunk
- Files:
-
- 2 edited
-
index.php (modified) (4 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
bright-link-previews/trunk/index.php
r3033812 r3033821 4 4 Plugin URI: http://www.barattalo.it/ 5 5 Description: Show previews of links (clear, neat, simple), analyze links and track user behaviour on the links of your site 6 Version: 1.8 6 Version: 1.81 7 7 Author: Giulio Pons 8 8 */ … … 72 72 } 73 73 74 function blpwp_get_plugin_version() { 75 // this plugin version 76 preg_match_all('/Version:(.*)$/m', file_get_contents( __FILE__ ), $matches ); 77 return $matches[1][0]; 78 } 79 74 80 75 81 function blpwp_scripts(){ … … 88 94 ); 89 95 90 // this plugin data91 $ data = get_plugin_data(__FILE__, true);92 93 wp_register_script('blpwp_script_js',plugin_dir_url( __FILE__ ).'script.js',array('jquery'),$ data["Version"],true);96 // this plugin version 97 $ver = blpwp_get_plugin_version(); 98 99 wp_register_script('blpwp_script_js',plugin_dir_url( __FILE__ ).'script.js',array('jquery'),$ver,true); 94 100 wp_enqueue_script('blpwp_script_js'); 95 101 96 wp_register_style( 'blpwp_css', plugin_dir_url( __FILE__ ).'style.css', [], $ data["Version"]);102 wp_register_style( 'blpwp_css', plugin_dir_url( __FILE__ ).'style.css', [], $ver); 97 103 wp_enqueue_style( 'blpwp_css' ); 98 104 … … 195 201 // admin scripts should be loaded only where they are useful: 196 202 197 // this plugin data198 $ data = get_plugin_data(__FILE__, true);199 200 wp_register_script('blpwp_script_js',plugin_dir_url( __FILE__ ).'admin.js',array('jquery'),$ data["Version"],true);201 wp_enqueue_style( 'blpwp_css', plugin_dir_url( __FILE__ ).'style.css', [], $ data["Version"]);202 wp_enqueue_style( 'blpwp_admin_css', plugin_dir_url( __FILE__ ).'admin.css', [], $ data["Version"]);203 // this plugin version 204 $ver = blpwp_get_plugin_version(); 205 206 wp_register_script('blpwp_script_js',plugin_dir_url( __FILE__ ).'admin.js',array('jquery'),$ver,true); 207 wp_enqueue_style( 'blpwp_css', plugin_dir_url( __FILE__ ).'style.css', [], $ver ); 208 wp_enqueue_style( 'blpwp_admin_css', plugin_dir_url( __FILE__ ).'admin.css', [], $ver ); 203 209 wp_enqueue_script('blpwp_script_js'); 204 210 -
bright-link-previews/trunk/readme.txt
r3033815 r3033821 5 5 Requires at least: 6.1 6 6 Tested up to: 6.4 7 Stable tag: 1.8 7 Stable tag: 1.81 8 8 Requires PHP: 7.0 9 9 License: GPLv2 or later
Note: See TracChangeset
for help on using the changeset viewer.