Changeset 535009
- Timestamp:
- 04/23/2012 09:53:54 AM (14 years ago)
- Location:
- re-wp-short-theme-descriptions/trunk
- Files:
-
- 2 edited
-
re-wp-themes-short-descriptions.php (modified) (2 diffs)
-
readme.txt (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
re-wp-short-theme-descriptions/trunk/re-wp-themes-short-descriptions.php
r510062 r535009 3 3 Plugin Name: wp themes short descriptions 4 4 Plugin URI: http://oneconsult.dk/wordpress 5 Description: Makes theme desctiptions short (like excerpt), mouseover theme to see full descriptions.6 Version: 1. 17 Author: Emil Vang Arffmann5 Description: For WP 3.3 and less, this is no longer needed for WP > 3.4... Makes theme desctiptions short (like excerpt), mouseover theme to see full descriptions. 6 Version: 1.2 7 Author: maxemil 8 8 Author URI: http://oneconsult.dk 9 9 */ … … 17 17 wp_enqueue_script( 'rewptsd', plugins_url('rewptsd.js', __FILE__), array( 'jquery' ), '1.0', true); 18 18 19 $ myStyleUrl = plugins_url('rewptsd.css', __FILE__);20 $ myStyleFile = WP_PLUGIN_DIR . '/re-wp-themes-short-descriptions/rewptsd.css';21 if ( file_exists($ myStyleFile) )19 $rewptsdStyleUrl = plugins_url('rewptsd.css', __FILE__); 20 $rewptsdStyleFile = WP_PLUGIN_DIR . '/re-wp-themes-short-descriptions/rewptsd.css'; 21 if ( file_exists($rewptsdStyleFile) ) 22 22 { 23 wp_register_style('rewptsd', $ myStyleUrl);23 wp_register_style('rewptsd', $rewptsdStyleUrl); 24 24 wp_enqueue_style( 'rewptsd'); 25 25 } 26 26 } 27 27 } 28 29 // 1.2 - detect WP version, if 3.4 or better, autodisable plugin. 30 add_action( 'admin_init', 'rewptsd_deactivate_plugin_conditional' ); 31 function rewptsd_deactivate_plugin_conditional() 32 { 33 global $wp_version; 34 $thiswpver = substr($wp_version, 0, 3); // substring because BETA versions have version format like "3.4-beta3" 35 if ( version_compare( $thiswpver, '3.5', '>=' ) ) 36 { 37 if ( is_plugin_active( 're-wp-themes-short-descriptions/re-wp-themes-short-descriptions.php') ) 38 { 39 deactivate_plugins( 're-wp-themes-short-descriptions/re-wp-themes-short-descriptions.php' ); 40 } 41 } 42 } 43 44 45 // remove option to activate plugin on 3.4+ 46 register_activation_hook( __file__, 'rewptsd_register_activation_hook' ); 47 function rewptsd_register_activation_hook() 48 { 49 global $wp_version; 50 $thiswpver = substr($wp_version, 0, 3); // substring because BETA versions have version format like "3.4-beta3" 51 if ( version_compare( $thiswpver, '3.5', '>=' ) ) 52 { 53 echo '<br/>is activating.. and version is too high<br/>'; 54 deactivate_plugins(basename(__FILE__)); // Deactivate ourself 55 wp_die("This Plugin is depricated for WP version less than 3.4!"); 56 } 57 } 58 28 59 ?> -
re-wp-short-theme-descriptions/trunk/readme.txt
r510070 r535009 1 === rewp themes short descriptions ===2 Contributors: Emil Vang Arffmann3 Donate link: http:// recreative.dk4 Tags: theme desciption, short theme description, 1 === wp themes short descriptions === 2 Contributors: maxemil 3 Donate link: http://oneconsult.dk 4 Tags: theme desciption, short theme description, theme overview, depricated 5 5 Requires at least: 2.8 6 6 Tested up to: 3.3 … … 8 8 9 9 Shortens the theme descriptions in the theme overview of your wordpress installation. 10 Mouse over to expand all descriptions again. 10 Mouse over to expand all descriptions again. For WP 3.3 and less. not for 3.4+ 11 11 12 12 == Description == … … 16 16 Install this plugin to make the theme descriptions short. 17 17 You can simpy disable the plugin if you at some point want to read all the info again. 18 19 Since WP 3.4 the developers have reorganized the theme overview screen, rendering this plugin depricated. 20 Only install if you still run 3.3 or below, and dislike long theme descriptions :) 18 21 19 22 … … 39 42 40 43 * Added jquery effect on mouseover to show full description. 44 45 1.2 46 47 * Auto disables plugin if you use WP 3.4, no longer needed - thank you WP devs :)
Note: See TracChangeset
for help on using the changeset viewer.