Plugin Directory

Changeset 143238


Ignore:
Timestamp:
08/06/2009 03:13:46 AM (17 years ago)
Author:
metacortex
Message:
 
Location:
wp-smart-image/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • wp-smart-image/trunk/readme.txt

    r139946 r143238  
    55Requires at least: 2.7
    66Tested up to: 2.8.2
    7 Stable tag: 0.3
     7Stable tag: 0.3.1
    88
    99This plugin helps you to set the image layout of your site in a very easy way.
     
    132132== Changelog ==
    133133
     134= 0.3.1 =
     135
     136Fixed minor bug: widget appears even if option is unchecked.
     137
    134138= 0.3 =
    135139
     
    143147= 0.2.2 =
    144148* 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.
    146150* Bugfix: Custom parameter `$target ='framename'` was changed to new one `$targetname = 'framename'` because old setting caused bad html parsing.
    147151
  • wp-smart-image/trunk/wp-smart-image.php

    r139946 r143238  
    55Description: This plugin helps you to set the image layout of your site in a very easy way.
    66Author: Darío Ferrer (@metacortex)
    7 Version: 0.3
     7Version: 0.3.1
    88Author URI: http://www.darioferrer.com
    99*/
     
    2929
    3030if ( 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__) ) );
    3533}
    3634
     
    4442add_action('admin_head', 'wpsi_cargar_archivos');
    4543add_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' );
     44if($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}
    4848
    4949function wpsi_options_page() {
     
    571571}
    572572
    573 function wpsi_agregar_metabox() {
    574     add_meta_box('wpsi-metabox', __('Image to show', 'wp-smart-image'), 'wpsi_metabox', 'post', 'side', 'core');
    575 }
    576 
    577573function wpsi_metabox() {
    578     global $post, $wp_query;
     574    global $post;
    579575    wp_nonce_field( 'wpsi_metabox_args', '_wpsi_nonce', false, true )."\n";
    580576        $imagenes = get_children( array(
     
    594590                $grande = wp_get_attachment_image_src( $imagen->ID, 'full' );
    595591                $ident = $imagen->ID;
    596 
    597592            if ( $wpsi_postmeta ) {
    598593                $foto_lista_checked = $imagen->ID == $wpsi_postmeta ? 'checked="ckecked" ' : '';
     
    601596                $foto_lista_checked = $imagen->ID == $num ? 'checked="ckecked" ' : '';
    602597            }
    603 
    604598            $lista .= '
    605599            <tr>
     
    634628    echo $lista;
    635629    echo '</div>';
     630}
     631
     632function wpsi_agregar_metabox() {
     633    add_meta_box('wpsi-metabox', __('Image to show', 'wp-smart-image'), 'wpsi_metabox', 'post', 'side', 'core');
    636634}
    637635
Note: See TracChangeset for help on using the changeset viewer.