Changeset 642671
- Timestamp:
- 12/21/2012 12:12:24 AM (13 years ago)
- Location:
- share-center-pro/trunk
- Files:
-
- 2 edited
-
inc/admin.php (modified) (2 diffs)
-
share-center-pro.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
share-center-pro/trunk/inc/admin.php
r633773 r642671 95 95 <input type="checkbox" name="bit51_scp[search]" id="search" value="1" <?php if ( $scpoptions['search'] == 1 ) echo "checked"; ?> /> <label for="search"> <?php _e( 'Show on Search Results', $this->hook ); ?></label><br /> 96 96 <input type="checkbox" name="bit51_scp[single]" id="single" value="1" <?php if ( $scpoptions['single'] == 1 ) echo "checked"; ?> /> <label for="single"> <?php _e( 'Show on Single Posts', $this->hook ); ?></label><br /> 97 <select name="bit51_scp[locationsingle]" id="locationsingle"> 98 <option value="0" <?php if ( $scpoptions['locationsingle'] == 0 ) echo "selected"; ?> ><?php _e( 'Bottom', $this->hook ); ?></option> 99 <option value="1" <?php if ( $scpoptions['locationsingle'] == 1 ) echo "selected"; ?> ><?php _e( 'Top', $this->hook ); ?></option> 100 <option value="2" <?php if ( $scpoptions['locationsingle'] == 2 ) echo "selected"; ?> ><?php _e( 'Both', $this->hook ); ?></option> 101 </select><label for="locationsingle"> <?php _e( 'Show above content, below content, or both in single posts and pages', $this->hook ); ?></label><br /> 102 <select name="bit51_scp[locationlist]" id="locationlist"> 103 <option value="0" <?php if ( $scpoptions['locationlist'] == 0 ) echo "selected"; ?> ><?php _e( 'Bottom', $this->hook ); ?></option> 104 <option value="1" <?php if ( $scpoptions['locationlist'] == 1 ) echo "selected"; ?> ><?php _e( 'Top', $this->hook ); ?></option> 105 <option value="2" <?php if ( $scpoptions['locationlist'] == 2 ) echo "selected"; ?> ><?php _e( 'Both', $this->hook ); ?></option> 106 </select><label for="locationlist"> <?php _e( 'Show above content, below content, or both on blog, category, search, or other pages where content is listed', $this->hook ); ?></label><br /> 97 107 <em><?php _e( 'Note: The widget will only show on single posts and pages regardless of what you choose above.', $this->hook ); ?></em> 98 108 </td> … … 139 149 $input['fbog'] = isset( $input['fbog'] ) ? $input['fbog'] : '0'; 140 150 $input['tcmd'] = isset( $input['tcmd'] ) ? $input['tcmd'] : '0'; 151 $input['locationsingle'] = isset( $input['locationsingle'] ) ? $input['locationsingle'] : '0'; 152 $input['locationlist'] = isset( $input['locationlist'] ) ? $input['locationlist'] : '0'; 141 153 142 154 $input['header'] = sanitize_text_field( $input['header'] ); -
share-center-pro/trunk/share-center-pro.php
r633773 r642671 21 21 class bit51_scp extends Bit51 { 22 22 23 public $pluginversion = '001 0'; //current plugin version23 public $pluginversion = '0012'; //current plugin version 24 24 25 25 //important plugin information … … 55 55 'fbappid' => '', 56 56 'fpog' => '0', 57 'tcmd' => '0' 57 'tcmd' => '0', 58 'locationsingle' => '0', 59 'locationlist' => '0' 58 60 ) 59 61 ) … … 238 240 //if the buttons should be on the current content then add them to the end of it 239 241 if ( ( is_archive() && $scpoptions['archive'] == 1 ) || ( is_page() && ! is_front_page() && ! is_home() && $scpoptions['page'] == 1 ) || ( ( is_front_page() || is_home() ) && $scpoptions['home'] == 1 ) || ( is_search() && $scpoptions['search'] == 1 ) || ( is_single() && $scpoptions['single'] == 1 ) ) { 242 243 //decide which location we should pick based on page type 244 if ( is_page() || is_single() ) { 245 $location = $scpoptions['locationsingle']; 246 } else { 247 $location = $scpoptions['locationlist']; 248 } 249 250 //add buttons before/after/both depending on user's choice 251 switch ( $location ) { 252 case '0': 253 return $content . $this->scp_social_buttons(); 254 break; 255 case '1': 256 return $this->scp_social_buttons() . $content; 257 break; 258 case '2': 259 return $this->scp_social_buttons() . $content . $this->scp_social_buttons(); 260 break; 261 default: 262 return $content; 263 break; 264 } 265 240 266 return $content . $this->scp_social_buttons(); 241 267 } else {
Note: See TracChangeset
for help on using the changeset viewer.