':''; $bottom = (get_option('on_google1_bottom') == 'on') ? '
':''; $content = $top.$content.$bottom; } return $content; } // add js script of google+1 to wp_head add_action ('wp_head','on_google_plusone_script'); function on_google_plusone_script() { $language = (get_option('on_google1_lang') != 'en-US')? "\n{lang: '".get_option('on_google1_lang')."'}\n": ''; echo "\n"; echo ''; echo "\n"; } // script for display button anywhere. function the_google1_advance(){ $size = (get_option('on_google1_size') == '') ? 'standard':get_option('on_google1_size'); $count = (get_option('on_google1_count') == 'on') ? '':' count="false"'; $callback = (get_option('on_google1_callback') != '') ? ' callback="'.get_option('on_google1_callback').'"':''; $button = ''; echo $button; } /** * Function for display the shortcode. * * @param type $onShortcode * @return string */ function on_google1_shortcode($onShortcode) { extract(shortcode_atts(array( "count" => get_option('on_google1_count', 'on'), "url" => get_permalink(), "size" => get_option('on_google1_size', 'standard'), "callback" => get_option('on_google1_callback', ''), ), $onShortcode)); $size = ($size == '') ? 'standard' : $size; $count = ($count == 'on') ? '':' count="false"'; $callback = ($callback != '') ? ' callback="'.$callback.'"':''; $output = "\n"; $output .= ''; return $output; } add_filter('widget_text', 'do_shortcode'); add_shortcode('google1', 'on_google1_shortcode'); } /** * Function for display the Plugin Panel Options. */ function on_google1_panel() { ?>

Google +1 Options

Thanks a lot

Thanks for using my plugin, you can contact me for say hello Onnay Okheng or buy me a cup of chocolate :)

Setting Buttons

Size
Language
Show +1 count in the button
Default JS callback Funtion
Default is empty.

Setting General

Display position
Show on