Changeset 143238
- Timestamp:
- 08/06/2009 03:13:46 AM (17 years ago)
- Location:
- wp-smart-image/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (3 diffs)
-
wp-smart-image.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-smart-image/trunk/readme.txt
r139946 r143238 5 5 Requires at least: 2.7 6 6 Tested up to: 2.8.2 7 Stable tag: 0.3 7 Stable tag: 0.3.1 8 8 9 9 This plugin helps you to set the image layout of your site in a very easy way. … … 132 132 == Changelog == 133 133 134 = 0.3.1 = 135 136 Fixed minor bug: widget appears even if option is unchecked. 137 134 138 = 0.3 = 135 139 … … 143 147 = 0.2.2 = 144 148 * Added option to include thumbnails in RSS feeds. 145 * Added new parameter `mode` to prepare function `wp_smart_image($ args)` to be passed by PHP parameters.149 * Added new parameter `mode` to prepare function `wp_smart_image($mode='args')` to be passed by PHP parameters. 146 150 * Bugfix: Custom parameter `$target ='framename'` was changed to new one `$targetname = 'framename'` because old setting caused bad html parsing. 147 151 -
wp-smart-image/trunk/wp-smart-image.php
r139946 r143238 5 5 Description: This plugin helps you to set the image layout of your site in a very easy way. 6 6 Author: Darío Ferrer (@metacortex) 7 Version: 0.3 7 Version: 0.3.1 8 8 Author URI: http://www.darioferrer.com 9 9 */ … … 29 29 30 30 if ( function_exists('load_plugin_textdomain') ) { 31 if ( !defined('WP_PLUGIN_DIR') ) 32 load_plugin_textdomain('wp-smart-image', str_replace( ABSPATH, '', dirname(__FILE__) ) ); 33 else 34 load_plugin_textdomain('wp-smart-image', false, dirname( plugin_basename(__FILE__) ) ); 31 if ( !defined('WP_PLUGIN_DIR') ) load_plugin_textdomain('wp-smart-image', str_replace( ABSPATH, '', dirname(__FILE__) ) ); 32 else load_plugin_textdomain('wp-smart-image', false, dirname( plugin_basename(__FILE__) ) ); 35 33 } 36 34 … … 44 42 add_action('admin_head', 'wpsi_cargar_archivos'); 45 43 add_action('wp_head', 'wpsi_cargar_header'); 46 add_action( 'do_meta_boxes' , 'wpsi_agregar_metabox' , 10, 2 ); 47 add_action( 'save_post', 'wpsi_guardar_metabox' ); 44 if($wpsi_configuracion['wpsi_activar_metabox'] == 1) { 45 add_action( 'do_meta_boxes' , 'wpsi_agregar_metabox' , 10, 2 ); 46 add_action( 'save_post', 'wpsi_guardar_metabox' ); 47 } 48 48 49 49 function wpsi_options_page() { … … 571 571 } 572 572 573 function wpsi_agregar_metabox() {574 add_meta_box('wpsi-metabox', __('Image to show', 'wp-smart-image'), 'wpsi_metabox', 'post', 'side', 'core');575 }576 577 573 function wpsi_metabox() { 578 global $post , $wp_query;574 global $post; 579 575 wp_nonce_field( 'wpsi_metabox_args', '_wpsi_nonce', false, true )."\n"; 580 576 $imagenes = get_children( array( … … 594 590 $grande = wp_get_attachment_image_src( $imagen->ID, 'full' ); 595 591 $ident = $imagen->ID; 596 597 592 if ( $wpsi_postmeta ) { 598 593 $foto_lista_checked = $imagen->ID == $wpsi_postmeta ? 'checked="ckecked" ' : ''; … … 601 596 $foto_lista_checked = $imagen->ID == $num ? 'checked="ckecked" ' : ''; 602 597 } 603 604 598 $lista .= ' 605 599 <tr> … … 634 628 echo $lista; 635 629 echo '</div>'; 630 } 631 632 function wpsi_agregar_metabox() { 633 add_meta_box('wpsi-metabox', __('Image to show', 'wp-smart-image'), 'wpsi_metabox', 'post', 'side', 'core'); 636 634 } 637 635
Note: See TracChangeset
for help on using the changeset viewer.