Changeset 410814
- Timestamp:
- 07/16/2011 09:15:08 PM (14 years ago)
- Location:
- wp1/trunk
- Files:
-
- 2 edited
-
wp1-menue.php (modified) (1 diff)
-
wp1.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp1/trunk/wp1-menue.php
r410801 r410814 4 4 { 5 5 ?> 6 <div class="wrap"> 7 <h1><?php _e('WP Google +1 option page', 'wpg1'); ?></h1> 8 <div id="poststuff"> 9 <div id="wpg1-option-intheme" class="postbox"> 10 <h3><input type="checkbox" name="ch_add_to_theme" value="checked" /> Add google +1 button in your theme</h3> 11 <div class="inside"> 12 <p> 13 To add the google +1 button, please use the following code in your template file. 14 </p> 15 <p style="font-famuly:Consolas, Monaco, 'Courier New', Courier, monospace; font-weight: bold;"> 16 <?php if (function_exists('wpg1_g1button')){ print wpg1_g1button('size'); } ?> 17 </p> 18 <p> 19 Please use in stead of <b>size</b> one of the following values.<br /> 20 small (15px), medium (20px), standart (24px) and large (60px) 21 </p> 6 7 <?php 8 if($_POST[wpg1submit]){ 9 $wpg1Options = array( 10 "wpg1-addtheme" => $_POST['wpg1-addtheme'] 11 ); 12 update_option('wpg1', $wpg1Options); 13 } 14 $wpg1Options = get_option('wpg1'); 15 ?> 16 17 18 19 <form method="post" action=""> 20 <?php wp_nonce_field('update-options'); ?> 21 <div class="wrap"> 22 <h1><?php _e('WP Google +1 options page', 'wpg1'); ?></h1> 23 <div id="poststuff"> 24 <div id="wpg1-option-intheme" class="postbox"> 25 <h3><input type="checkbox" name="wpg1-addtheme" value="checked" <?php print $wpg1Options['wpg1-addtheme']; ?> /> Add Google +1 button in your theme</h3> 26 <?php if($wpg1Options['wpg1-addtheme']): ?> 27 <div class="inside"> 28 <p> 29 To add the Google +1 button please use the following code in your template files. 30 </p> 31 <p style="font-famuly:Consolas, Monaco, 'Courier New', Courier, monospace; font-weight: bold;"> 32 <?php if (function_exists('wpg1_g1button')){ print wpg1_g1button('size'); } ?> 33 </p> 34 <p> 35 Please use instead of <b>size</b> one of the following values.<br /> 36 small (15px), medium (20px), standard (24px) and large (60px) 37 </p> 38 </div> 39 <?php endif; ?> 22 40 </div> 41 42 43 <input type="hidden" name="wpg1submit" value="submit" /> 44 <input type="hidden" name="action" value="update" /> 45 46 <p class="submit"> 47 <input type="submit" class="button-primary" value="<?php _e('Save', 'wpg1');?>" /> 48 </p> 49 50 </div> 51 <div id="wpg1-footer"> 52 This plugin ist provided by <a href="http://www.goopl.de">GooPl.de</a> (<g:plusone size="small" href="http://www.goopl.de" count="false"></g:plusone>) and developed by <a href="http://www.sebastian-thiele.net">Sebastian Thiele</a> (<g:plusone size="small" href="http://www.sebastian-thiele.net" count="false"></g:plusone>). 23 53 </div> 24 54 </div> 25 <div id="wpg1-footer"> 26 This Plugin ist provided by <a href="http://www.goopl.de">GooPl.de</a> (<g:plusone size="small" href="http://www.goopl.de" count="false"></g:plusone>) and developed by <a href="http://www.sebastian-thiele.net">Sebastian Thiele</a> (<g:plusone size="small" href="http://www.sebastian-thiele.net" count="false"></g:plusone>). 27 </div> 28 </div> 55 </form> 29 56 30 57 -
wp1/trunk/wp1.php
r410801 r410814 8 8 Author URI: http://sebastian.thiele.me 9 9 */ 10 $wpg1Options = get_option('wpg1'); 10 11 $plugindir = basename(dirname(__FILE__)); 11 12 load_plugin_textdomain( 'wpg1', 'wp-content/plugins/' . $plugindir.'/lang', false ); … … 38 39 } 39 40 40 function wpg1_ admin_head($content)41 function wpg1_head($content) 41 42 { 42 43 print '<script type="text/javascript" src="https://apis.google.com/js/plusone.js"> … … 52 53 add_filter('manage_posts_columns', 'wpg1_article_colum'); 53 54 add_filter('manage_posts_custom_column', 'wpg1_article_colum_content'); 54 add_filter('admin_head', 'wpg1_admin_head'); 55 add_action( 'admin_menu', 'wpg1_adminmenue'); 55 add_filter('admin_head', 'wpg1_head'); 56 add_action('admin_menu', 'wpg1_adminmenue'); 57 if($wpg1Options['wpg1-addtheme']) add_filter('wp_head', 'wpg1_head'); 56 58 ?>
Note: See TracChangeset
for help on using the changeset viewer.