Changeset 488435
- Timestamp:
- 01/11/2012 09:23:12 PM (14 years ago)
- File:
-
- 1 edited
-
wp-licenses/trunk/wp-licenses.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-licenses/trunk/wp-licenses.php
r488271 r488435 16 16 add_action('init', 'wp_licenses_lang_init'); 17 17 18 /* delete_option */ 19 20 /*delete_option('license-title'); 21 delete_option('license-tooltip'); 22 delete_option('license-theme'); 23 delete_option('license-default'); 24 delete_option('license-content'); 25 delete_option('license-version'); 26 delete_option('license-language');*/ 27 28 /* add_option */ 29 30 add_option('license-title','1','','yes'); 31 add_option('license-tooltip','1','','yes'); 32 add_option('license-theme','1','','yes'); 33 add_option('license-default','by-nc-sa','','yes'); 34 add_option('license-content','1','','yes'); 35 add_option('license-version','3.0','','yes'); 36 add_option('license-language','pt_BR','','yes'); 37 38 18 39 $infoImg['cr']['name'] = "copyright"; 19 40 $infoImg['cr']['alt'] = __('All the rights reserved (Copyright)','wp-licenses'); … … 70 91 global $infoImg; 71 92 $imagetheme = get_option('license-theme'); 72 if ($imagetheme == "") $imagetheme = "1";93 /*if ($imagetheme == "") $imagetheme = "1";*/ 73 94 74 95 foreach ($infoImg as $value) { … … 214 235 $obraderivada = stripslashes(get_post_meta($post->ID, 'obraderivada', true)); 215 236 global $cr, $pd, $cl, $by, $nc, $remix, $share, $sa, $nd; 216 /*$licenseversion = get_option('license-version'); 217 $licenselanguage = get_option('license-language');*/ 218 $licenseversion = '3.0'; 219 $licenselanguage = 'pt_BR'; 237 $licenseversion = get_option('license-version'); 238 $licenselanguage = get_option('license-language'); 220 239 221 240 /* Creative commons */ … … 301 320 } 302 321 322 $licensecontent = get_option('license-content'); 323 if ($licensecontent) { 324 add_filter( 'the_content', 'the_licenses' ); 325 } 326 303 327 add_action('admin_menu', 'wp_licenses_menu'); 304 328 function wp_licenses_menu() { … … 397 421 398 422 399 </fieldset> 400 <?php wp_nonce_field('update-options'); ?> 401 <input type="hidden" name="action" value="update" /> 402 <input type="hidden" name="page_options" value="license-theme, license-tooltip, license-title, license-default" /> 403 <input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" /> 423 </fieldset> 424 <fieldset id="howtouse"> 425 <legend><?php _e('How to use','wp-licenses') ?></legend> 426 427 <label> 428 <input type="checkbox" name="license-content" value="1" <?php checked('1', get_option('license-content')); ?> /> 429 <?php _e('Inserir automaticamente ao final do conteúdo','wp-licenses') ?> 430 </label> 431 432 <p><?php _e('Or put the code above where you want to show the licenses','wp-licenses') ?></p> 433 <code><?php if ( function_exists( 'the_licenses' ) ) { the_licenses(); } ?></code> 434 435 </fieldset> 436 <?php /*?><fieldset> 437 <legend>limpar configurações</legend> 438 <label> 439 <input type="checkbox" name="license-reset" value="1" <?php checked('1', get_option('license-reset')); ?> /> 440 <?php _e('Deseja desfazer as modificações?','wp-licenses') ?> 441 </label> 442 </fieldset><?php */?> 443 444 <?php wp_nonce_field('update-options'); ?> 445 <input type="hidden" name="action" value="update" /> 446 <input type="hidden" name="page_options" value="license-theme, license-tooltip, license-title, license-default, license-content" /> 447 <input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" /> 404 448 405 449 </form> 406 450 407 <div id="howtouse"> 408 <h3><?php _e('How to use','wp-licenses') ?></h3> 409 <p><?php _e('Put the code above where you want to show the licenses','wp-licenses') ?></p> 410 <code><?php if ( function_exists( 'the_licenses' ) ) { the_licenses(); } ?></code> </div> 451 411 452 </div> 412 453 <?php
Note: See TracChangeset
for help on using the changeset viewer.