gpr_admin_tooltip

Google Places Reviews Admin Tooltips.

Description

(bool|string) gpr_admin_tooltip( (string) $tip_name ); 

Returns (bool|string)

Parameters (1)

0. $tip_name (string)
The tip name.

Usage

  1. if ( !function_exists( 'gpr_admin_tooltip' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'google-places-reviews/inc/options.php'; 
  3.  
  4. // The tip name. 
  5. $tip_name = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = gpr_admin_tooltip($tip_name); 
  9.  

Defined (1)

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

/inc/options.php  
  1. function gpr_admin_tooltip( $tip_name ) { 
  2.  
  3. $tip_text = ''; 
  4.  
  5. //Ensure there's a tip requested 
  6. if ( empty( $tip_name ) ) { 
  7. return false; 
  8.  
  9. switch ( $tip_name ) { 
  10. case 'title': 
  11. $tip_text = __( 'The title text appears at the very top of the widget above all other elements.', 'google-places-reviews' ); 
  12. break; 
  13. case 'autocomplete': 
  14. $tip_text = __( 'Enter the name of your Google Place in this field to retrieve it\'s Google Place ID. If no information is returned there you may have a conflict with another plugin or theme using Google Maps API.', 'google-places-reviews' ); 
  15. break; 
  16. case 'place_type': 
  17. $tip_text = __( 'Specify how you would like to lookup your Google Places. Address instructs the Place Autocomplete service to return only geocoding results with a precise address. Establishment instructs the Place Autocomplete service to return only business results. The Regions type collection instructs the Places service to return any result matching the following types: locality, sublocality, postal_code, country, administrative_area_level_1, administrative_area_level_2.', 'google-places-reviews' ); 
  18. break; 
  19. case 'location': 
  20. $tip_text = __( 'This is the name of the place returned by Google\'s Places API.', 'google-places-reviews' ); 
  21. break; 
  22. case 'place_id': 
  23. $tip_text = __( 'The Google Place ID is a textual identifier that uniquely identifies a place and can be used to retrieve information about the place. This option is set using the "Location Lookup" field above.', 'google-places-reviews' ); 
  24. break; 
  25. case 'review_filter': 
  26. $tip_text = __( 'PRO FEATURE: Filter bad reviews to prevent them from displaying. Please note that the Google Places API only allows for up to 5 total reviews displayed per location. This option may limit the total number further.', 'google-places-reviews' ); 
  27. break; 
  28. case 'review_limit': 
  29. $tip_text = __( 'Limit the number of reviews displayed for this location to a set number.', 'google-places-reviews' ); 
  30. break; 
  31. case 'reviewers_link': 
  32. $tip_text = __( 'Toggle on or off the link on the reviews name to their Google+ page.', 'google-places-reviews' ); 
  33. break; 
  34. case 'review_characters': 
  35. $tip_text = __( 'Some reviews may be very long and cause the widget to have a very large height. This option uses JavaScript to expand and collapse the text.', 'google-places-reviews' ); 
  36. break; 
  37. case 'review_char_limit': 
  38. $tip_text = __( 'Set the character limit for this review widget. Values are in pixels.', 'google-places-reviews' ); 
  39. break; 
  40. case 'widget_style': 
  41. $tip_text = __( 'Choose from a set of predefined widget styles. Want to style your own? Set it to \'Bare Bones\' for easy CSS styling.', 'google-places-reviews' ); 
  42. break; 
  43. case 'hide_header': 
  44. $tip_text = __( 'Disable the main business information profile image, name, overall rating. Useful for displaying only ratings in the widget.', 'google-places-reviews' ); 
  45. break; 
  46. case 'hide_out_of_rating': 
  47. $tip_text = __( 'Hide the text the appears after the star image displaying \'x out of 5 stars\'. The text will still be output because it is important for SEO but it will be hidden with CSS.', 'google-places-reviews' ); 
  48. break; 
  49. case 'google_image': 
  50. $tip_text = __( 'Prevent the Google logo from displaying in the reviews widget.', 'google-places-reviews' ); 
  51. break; 
  52. case 'cache': 
  53. $tip_text = __( 'Caching data will save Google Place data to your database in order to speed up response times and conserve API requests. The suggested settings is 1 Day.', 'google-places-reviews' ); 
  54. break; 
  55. case 'disable_title_output': 
  56. $tip_text = __( 'The title output is content within the \'Widget Title\' field above. Disabling the title output may be useful for some themes.', 'google-places-reviews' ); 
  57. break; 
  58. case 'target_blank': 
  59. $tip_text = __( 'This option will add target=\'_blank\' to the widget\'s links. This is useful to keep users on your website.', 'google-places-reviews' ); 
  60. break; 
  61. case 'no_follow': 
  62. $tip_text = __( 'This option will add rel=\'nofollow\' to the widget\'s outgoing links. This option may be useful for SEO.', 'google-places-reviews' ); 
  63. break; 
  64. case 'alignment': 
  65. $tip_text = __( 'Choose whether to float the widget to the right or left, or not at all. This is helpful for integrating within post content so text wraps around the widget if wanted. Default value is \'none\'.', 'google-places-reviews' ); 
  66. break; 
  67. case 'max_width': 
  68. $tip_text = __( 'Define a max-width property for the widget. Dimension value can be in pixel or percentage. Default value is \'250px\'.', 'google-places-reviews' ); 
  69. break; 
  70. case 'pre_content': 
  71. $tip_text = __( 'Output content before the main widget content. Useful to provide introductory text.', 'google-places-reviews' ); 
  72. break; 
  73. case 'post_content': 
  74. $tip_text = __( 'Output content after the main widget content. Useful to provide a button or custom text inviting the user to perform an action or read a message.', 'google-places-reviews' ); 
  75. break; 
  76.  
  77. return '<img src="' . GPR_PLUGIN_URL . '/assets/images/help.png" title="' . $tip_text . '" class="tooltip-info" width="16" height="16" />'; 
  78.