Changeset 453352
- Timestamp:
- 10/20/2011 09:11:01 AM (14 years ago)
- Location:
- imagemagick-engine
- Files:
-
- 2 edited
- 4 copied
-
tags/1.3.2-beta1 (copied) (copied from imagemagick-engine/trunk)
-
tags/1.3.2-beta1/imagemagick-engine.php (copied) (copied from imagemagick-engine/trunk/imagemagick-engine.php) (7 diffs)
-
tags/1.3.2-beta1/js/ime-admin.js (copied) (copied from imagemagick-engine/trunk/js/ime-admin.js)
-
tags/1.3.2-beta1/readme.txt (copied) (copied from imagemagick-engine/trunk/readme.txt) (2 diffs)
-
trunk/imagemagick-engine.php (modified) (7 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
imagemagick-engine/tags/1.3.2-beta1/imagemagick-engine.php
r422097 r453352 6 6 Author: Orangelab 7 7 Author URI: http://www.orangelab.se 8 Version: 1.3. 18 Version: 1.3.2-beta1 9 9 Text Domain: imagemagick-engine 10 10 … … 30 30 /* 31 31 * Current todo list: 32 * - can we use --strip (or similar) without loosing color profile? 32 33 * - test command line version string 33 34 * - test php module with required image formats … … 83 84 * Functions 84 85 */ 85 add_action('plugins_loaded', 'ime_init'); 86 87 /* Plugin setup */ 88 function ime_init() { 86 add_action('plugins_loaded', 'ime_init_early'); 87 add_action('init', 'ime_init'); 88 89 /* Plugin setup (early) */ 90 function ime_init_early() { 89 91 load_plugin_textdomain('imagemagick-engine', false, dirname(plugin_basename(__FILE__)) . '/languages'); 90 92 … … 94 96 add_filter('wp_generate_attachment_metadata', 'ime_filter_attachment_metadata', 10, 2); 95 97 } 96 98 } 99 100 /* Plugin setup */ 101 function ime_init() { 97 102 if (is_admin()) { 98 103 add_action('admin_menu', 'ime_admin_menu'); … … 103 108 add_action('wp_ajax_ime_process_image', 'ime_ajax_process_image'); 104 109 add_action('wp_ajax_ime_regeneration_get_images','ime_ajax_regeneration_get_images'); 110 111 // Do we have a WP native version of progressbar? 112 if (!wp_script_is('jquery-ui-progressbar', 'registered')) { 113 /* 114 * jQuery UI version 1.7 and 1.8 seems incompatible... 115 */ 116 if (ime_script_version_compare('jquery-ui-core', '1.8', '>=')) { 117 wp_register_script('jquery-ui-progressbar', plugins_url('/js/ui.progressbar-1.8.9.js', __FILE__), array('jquery-ui-core', 'jquery-ui-widget'), '1.8.9'); 118 } else { 119 wp_register_script('jquery-ui-progressbar', plugins_url('/js/ui.progressbar-1.7.2.js', __FILE__), array('jquery-ui-core'), '1.7.2'); 120 } 121 } 105 122 106 wp_register_script('ime-admin', plugins_url('/js/ime-admin.js', __FILE__), array('jquery')); 107 108 /* 109 * jQuery UI version 1.7 and 1.8 seems incompatible... 110 */ 111 if (ime_script_version_compare('jquery-ui-core', '1.8', '>=')) { 112 wp_register_script('jquery-ui-progressbar', plugins_url('/js/ui.progressbar-1.8.9.js', __FILE__), array('jquery-ui-core', 'jquery-ui-widget'), '1.8.9'); 113 } else { 114 wp_register_script('jquery-ui-progressbar', plugins_url('/js/ui.progressbar-1.7.2.js', __FILE__), array('jquery-ui-core'), '1.7.2'); 115 } 123 wp_register_script('ime-admin', plugins_url('/js/ime-admin.js', __FILE__), array('jquery', 'jquery-ui-dialog', 'jquery-ui-progressbar')); 116 124 } 117 125 } … … 667 675 $page = add_options_page('ImageMagick Engine', 'ImageMagick Engine', 'manage_options', 'imagemagick-engine', 'ime_option_page'); 668 676 669 add_action('admin_print_scripts-' . $page, 'ime_admin_ scripts');670 add_action('admin_print_styles-' . $page, 'ime_admin_ styles');677 add_action('admin_print_scripts-' . $page, 'ime_admin_print_scripts'); 678 add_action('admin_print_styles-' . $page, 'ime_admin_print_styles'); 671 679 } 672 680 673 681 /* Enqueue admin page scripts */ 674 function ime_admin_ scripts() {682 function ime_admin_print_scripts() { 675 683 wp_enqueue_script('ime-admin'); 676 wp_enqueue_script('jquery-ui-dialog');677 wp_enqueue_script('jquery-ui-progressbar');678 684 } 679 685 680 686 /* Enqueue admin page style */ 681 function ime_admin_ styles() {687 function ime_admin_print_styles() { 682 688 wp_enqueue_style( 'ime-admin-style', plugins_url('/css/ime-admin.css', __FILE__), array()); 683 689 } … … 795 801 796 802 $current_mode = ime_get_option('mode'); 797 if (! $modes_valid[$current_mode])803 if (!isset($modes_valid[$current_mode]) || !$modes_valid[$current_mode]) 798 804 $current_mode = null; 799 805 if (is_null($current_mode) && $any_valid) { -
imagemagick-engine/tags/1.3.2-beta1/readme.txt
r422097 r453352 3 3 Tags: image, images, picture, imagemagick, gd 4 4 Requires at least: 2.9 5 Tested up to: 3. 2.15 Tested up to: 3.3-beta2 6 6 Stable tag: 1.3.1 7 7 … … 75 75 == Changelog == 76 76 77 = 1.3.2-beta1 = 78 * Tested with WP 3.3-beta2 79 * Use WordPress version of jQuery UI progressbar if available 80 * Split plugin init into early and late part 81 * Fix PHP notice (in initial plugin configuration) 82 77 83 = 1.3.1 = 78 84 * Tested with WP 3.2.1 -
imagemagick-engine/trunk/imagemagick-engine.php
r422097 r453352 6 6 Author: Orangelab 7 7 Author URI: http://www.orangelab.se 8 Version: 1.3. 18 Version: 1.3.2-beta1 9 9 Text Domain: imagemagick-engine 10 10 … … 30 30 /* 31 31 * Current todo list: 32 * - can we use --strip (or similar) without loosing color profile? 32 33 * - test command line version string 33 34 * - test php module with required image formats … … 83 84 * Functions 84 85 */ 85 add_action('plugins_loaded', 'ime_init'); 86 87 /* Plugin setup */ 88 function ime_init() { 86 add_action('plugins_loaded', 'ime_init_early'); 87 add_action('init', 'ime_init'); 88 89 /* Plugin setup (early) */ 90 function ime_init_early() { 89 91 load_plugin_textdomain('imagemagick-engine', false, dirname(plugin_basename(__FILE__)) . '/languages'); 90 92 … … 94 96 add_filter('wp_generate_attachment_metadata', 'ime_filter_attachment_metadata', 10, 2); 95 97 } 96 98 } 99 100 /* Plugin setup */ 101 function ime_init() { 97 102 if (is_admin()) { 98 103 add_action('admin_menu', 'ime_admin_menu'); … … 103 108 add_action('wp_ajax_ime_process_image', 'ime_ajax_process_image'); 104 109 add_action('wp_ajax_ime_regeneration_get_images','ime_ajax_regeneration_get_images'); 110 111 // Do we have a WP native version of progressbar? 112 if (!wp_script_is('jquery-ui-progressbar', 'registered')) { 113 /* 114 * jQuery UI version 1.7 and 1.8 seems incompatible... 115 */ 116 if (ime_script_version_compare('jquery-ui-core', '1.8', '>=')) { 117 wp_register_script('jquery-ui-progressbar', plugins_url('/js/ui.progressbar-1.8.9.js', __FILE__), array('jquery-ui-core', 'jquery-ui-widget'), '1.8.9'); 118 } else { 119 wp_register_script('jquery-ui-progressbar', plugins_url('/js/ui.progressbar-1.7.2.js', __FILE__), array('jquery-ui-core'), '1.7.2'); 120 } 121 } 105 122 106 wp_register_script('ime-admin', plugins_url('/js/ime-admin.js', __FILE__), array('jquery')); 107 108 /* 109 * jQuery UI version 1.7 and 1.8 seems incompatible... 110 */ 111 if (ime_script_version_compare('jquery-ui-core', '1.8', '>=')) { 112 wp_register_script('jquery-ui-progressbar', plugins_url('/js/ui.progressbar-1.8.9.js', __FILE__), array('jquery-ui-core', 'jquery-ui-widget'), '1.8.9'); 113 } else { 114 wp_register_script('jquery-ui-progressbar', plugins_url('/js/ui.progressbar-1.7.2.js', __FILE__), array('jquery-ui-core'), '1.7.2'); 115 } 123 wp_register_script('ime-admin', plugins_url('/js/ime-admin.js', __FILE__), array('jquery', 'jquery-ui-dialog', 'jquery-ui-progressbar')); 116 124 } 117 125 } … … 667 675 $page = add_options_page('ImageMagick Engine', 'ImageMagick Engine', 'manage_options', 'imagemagick-engine', 'ime_option_page'); 668 676 669 add_action('admin_print_scripts-' . $page, 'ime_admin_ scripts');670 add_action('admin_print_styles-' . $page, 'ime_admin_ styles');677 add_action('admin_print_scripts-' . $page, 'ime_admin_print_scripts'); 678 add_action('admin_print_styles-' . $page, 'ime_admin_print_styles'); 671 679 } 672 680 673 681 /* Enqueue admin page scripts */ 674 function ime_admin_ scripts() {682 function ime_admin_print_scripts() { 675 683 wp_enqueue_script('ime-admin'); 676 wp_enqueue_script('jquery-ui-dialog');677 wp_enqueue_script('jquery-ui-progressbar');678 684 } 679 685 680 686 /* Enqueue admin page style */ 681 function ime_admin_ styles() {687 function ime_admin_print_styles() { 682 688 wp_enqueue_style( 'ime-admin-style', plugins_url('/css/ime-admin.css', __FILE__), array()); 683 689 } … … 795 801 796 802 $current_mode = ime_get_option('mode'); 797 if (! $modes_valid[$current_mode])803 if (!isset($modes_valid[$current_mode]) || !$modes_valid[$current_mode]) 798 804 $current_mode = null; 799 805 if (is_null($current_mode) && $any_valid) { -
imagemagick-engine/trunk/readme.txt
r422097 r453352 3 3 Tags: image, images, picture, imagemagick, gd 4 4 Requires at least: 2.9 5 Tested up to: 3. 2.15 Tested up to: 3.3-beta2 6 6 Stable tag: 1.3.1 7 7 … … 75 75 == Changelog == 76 76 77 = 1.3.2-beta1 = 78 * Tested with WP 3.3-beta2 79 * Use WordPress version of jQuery UI progressbar if available 80 * Split plugin init into early and late part 81 * Fix PHP notice (in initial plugin configuration) 82 77 83 = 1.3.1 = 78 84 * Tested with WP 3.2.1
Note: See TracChangeset
for help on using the changeset viewer.