Changeset 481191
- Timestamp:
- 12/27/2011 07:04:05 PM (14 years ago)
- Location:
- prophoto2-compatibility-patches/trunk
- Files:
-
- 1 added
- 1 edited
-
p2-compat-popup.css (added)
-
p2-wp-compatibility.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
prophoto2-compatibility-patches/trunk/p2-wp-compatibility.php
r412697 r481191 5 5 Description: Only for users of version 2 of the ProPhoto theme. Contains patches required for compatibility with WordPress 3.0+ 6 6 Author: ProPhotoBlogs 7 Version: 1. 27 Version: 1.3 8 8 */ 9 9 10 10 11 add_action( 'wp_loaded', 'p2_update_img_protection_opts' ); 12 add_action( 'wp_loaded', 'p2_update_img_protection_js' ); 11 if ( get_option( 'template' ) == 'prophoto2' ) { 12 add_action( 'wp_loaded', 'p2_update_img_protection_opts' ); 13 add_action( 'wp_loaded', 'p2_update_img_protection_js' ); 14 add_action( 'after_setup_theme', 'p2_fix_iframed_upload_windows' ); 15 } 16 17 18 function p2_fix_iframed_upload_windows() { 19 if ( p2_wp_version() > 229 ) { 20 if ( $GLOBALS['pagenow'] == 'popup.php' ) { 21 wp_enqueue_style( 'p2-compat-popup-css', plugin_dir_url( __FILE__ ) .'p2-compat-popup.css' ); 22 add_action( 'admin_head', create_function( '', "remove_action( 'post-upload-ui', 'media_upload_text_after', 5 );" ) ); 23 } 24 } 25 } 26 13 27 14 28 … … 118 132 119 133 134 function p2_wp_version() { 135 $version = str_pad( intval( str_replace( '.', '', $GLOBALS['wp_version'] ) ), 3, '0' ); 136 return ( $version == '000' ) ? 999 : intval( $version ); 137 } 138 139 140
Note: See TracChangeset
for help on using the changeset viewer.