google-translator

The Google Language Translator google translator shortcode.


Usage

  1. // basic usage 
  2. echo do_shortcode('[google-translator]'); 
  1. // variable usage 
  2. $result = do_shortcode('[google-translator]'); 
  3. echo $result;  

Defined (3)

The shortcode is defined in the following location(s).

/widget.php  
  1. public function widget( $args, $instance ) { 
  2. $title = apply_filters( 'widget_title', $instance['title'] ); 
  3. echo $args['before_widget']; 
  4. if ( ! empty( $title ) ) 
  5. echo $args['before_title'] . $title . $args['after_title']; 
  6. echo do_shortcode('[google-translator]'); 
  7. echo $args['after_widget']; 
  8.  
  9. public function form( $instance ) { 
  10. if ( isset( $instance[ 'title' ] ) ) { 
/google-language-translator.php  
  1. register_uninstall_hook( __FILE__, 'glt_deactivate' ); 
  2. add_action( 'admin_menu', array( &$this, 'add_my_admin_menus')); 
  3. add_action('admin_init', array(&$this, 'initialize_settings')); 
  4. add_action('wp_head', array(&$this, 'load_css')); 
  5. add_action('wp_footer', array(&$this, 'footer_script')); 
  6. add_shortcode( 'google-translator', array(&$this, 'google_translator_shortcode')); 
  7. add_shortcode( 'glt', array(&$this, 'google_translator_menu_language')); 
  8. add_filter('widget_text', 'do_shortcode'); 
  9. add_filter('walker_nav_menu_start_el', array(&$this, 'menu_shortcodes') , 10 , 2); 
  10. add_filter( 'plugin_action_links_' . plugin_basename(__FILE__), array(&$this, 'glt_settings_link') ); 
  11.  
  1. <div class="metabox-holder" style="float:right; clear:right; width:33%"> 
  2. <div class="postbox glt-preview-settings"> 
  3. <h3 class="notranslate">Preview</h3> 
  4. <table style="width:100%"> 
  5. <tr> 
  6. <td style="box-sizing:border-box; -webkit-box-sizing:border-box; -moz-box-sizing:border-box; padding:15px 15px; margin:0px"><span class="notranslate"> Drag & drop flags to change their position.<br/><br/>(Note: flag order resets when flags are added/removed)</span><br/><br/><?php echo do_shortcode('[google-translator]'); ?><p class="hello"><span class="notranslate">Translated text:</span>   <span>Hello</span></p> 
  7. </td> 
  8. </tr> 
  9. </table> 
  10. </div> <!-- .postbox --> 
  11. </div> <!-- .metabox-holder -->