Changeset 663503
- Timestamp:
- 02/05/2013 02:34:25 AM (13 years ago)
- Location:
- social-accounts/trunk
- Files:
-
- 3 edited
-
ffto-social-accounts-widget.php (modified) (3 diffs)
-
ffto-social-accounts.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
social-accounts/trunk/ffto-social-accounts-widget.php
r654674 r663503 18 18 19 19 function update($new_instance, $old_instance) { 20 $instance = $old_instance; 21 $instance['title'] = strip_tags($new_instance['title']); 22 $instance['style'] = $new_instance['style']; 23 $instance['content'] = $new_instance['content']; 20 $instance = $old_instance; 21 $instance['title'] = strip_tags($new_instance['title']); 22 $instance['style'] = $new_instance['style']; 23 $instance['content'] = $new_instance['content']; 24 $instance['content_position'] = $new_instance['content_position']; 24 25 return $instance; 25 26 } … … 38 39 <textarea id="<?php echo $this->get_field_id('content'); ?>" name="<?php echo $this->get_field_name('content'); ?>" class="widefat" rows="4"><?php echo esc_attr($instance['content']); ?></textarea> 39 40 </p> 41 <p> 42 <label for="<?php echo $this->get_field_id('content_position'); ?>"><?php _e('Content Position'); ?></label> 43 <select name="<?php echo $this->get_field_name('content_position'); ?>" class="widefat" id="<?php echo $this->get_field_id('content_position'); ?>"> 44 <?php foreach (array('before'=>'Before the accounts', 'after'=>'After the accounts') as $id=>$name): ?> 45 <option value="<?php echo $id; ?>" <?php selected($instance['content_position'], $id); ?>><?php echo $name; ?></option> 46 <?php endforeach; ?> 47 </select> 48 </p> 40 49 <p> 41 50 <label for="<?php echo $this->get_field_id('style'); ?>"><?php _e('Style'); ?></label> … … 59 68 if ($title) echo $args['before_title'].apply_filters('widget_title', $title).$args['after_title']; 60 69 61 $accounts = the_social_accounts('container_class=social-accounts '.$style, false); 70 $accounts = the_social_accounts('container_class=social-accounts '.$style, false); 71 $content = $content ? '<div class="extra-content">'.apply_filters('widget_content', wpautop($content)).'</div>' : ''; 62 72 63 echo apply_filters('widget_content', wpautop($content));73 if ($content_position == 'before') echo $content; 64 74 echo $accounts; 75 if ($content_position == 'after') echo $content; 65 76 66 77 echo $args['after_widget']; -
social-accounts/trunk/ffto-social-accounts.php
r659092 r663503 5 5 Description: Add an option page under Settings where the user can add all his Social Accounts URLs. Includes a Social Account Widget. 6 6 Author: Maxime Lefrancois 7 Version: 1.1 7 Version: 1.1.2 8 8 Author URI: http://imfreshfromtheoven.com 9 9 */ 10 10 11 11 if(defined('FFTO_SOCIAL_ACCOUNTS')) return; 12 define('FFTO_SOCIAL_ACCOUNTS', '1.1 ');12 define('FFTO_SOCIAL_ACCOUNTS', '1.1.2'); 13 13 define('FFTO_SOCIAL_ACCOUNTS_PATH', dirname(__FILE__)); 14 14 define('FFTO_SOCIAL_ACCOUNTS_FOLDER', basename(FFTO_SOCIAL_ACCOUNTS_PATH)); … … 184 184 185 185 $image = ''; 186 $custom = $this->get_value('custom_ value', $account['id']);186 $custom = $this->get_value('custom_image', $account['id']); 187 187 188 188 if ($custom) $image = $custom; -
social-accounts/trunk/readme.txt
r659090 r663503 4 4 Requires at least: 3.4 5 5 Tested up to: 3.5 6 Stable tag: 1.1 6 Stable tag: 1.1.2 7 7 8 8 Add a new section under Settings for your social accounts. The order and the images can be customized with ease. … … 92 92 == Changelog == 93 93 94 = 1.1.2 = 95 * Fix the image replacement not working 96 * Add optional content position for widget 97 94 98 = 1.1 = 95 99 * Updated admin design
Note: See TracChangeset
for help on using the changeset viewer.