MS_Addon_Searchindex

Add-on: Allow Search-Engines to index protected content.

Defined (1)

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

/app/addon/searchindex/class-ms-addon-searchindex.php  
  1. class MS_Addon_Searchindex extends MS_Addon { 
  2.  
  3. /** 
  4. * The Add-on ID 
  5. * @since 1.0.1.0 
  6. */ 
  7. const ID = 'addon_searchindex'; 
  8.  
  9.  
  10. /** 
  11. * Checks if the current Add-on is enabled. 
  12. * @since 1.0.1.0 
  13. * @return bool 
  14. */ 
  15. static public function is_active() { 
  16. return false; 
  17.  
  18. /** 
  19. * Returns the Add-on ID (self::ID). 
  20. * @since 1.0.1.0 
  21. * @return string 
  22. */ 
  23. public function get_id() { 
  24. return self::ID; 
  25.  
  26. /** 
  27. * Initializes the Add-on. Always executed. 
  28. * @since 1.0.1.0 
  29. */ 
  30. public function init() { 
  31. MS_Model_Addon::disable( self::ID ); 
  32.  
  33. /** 
  34. * Registers the Add-On. 
  35. * @since 1.0.1.0 
  36. * @param array $list The Add-Ons list. 
  37. * @return array The updated Add-Ons list. 
  38. */ 
  39. public function register( $list ) { 
  40. $list[ self::ID ] = (object) array( 
  41. 'name' => __( 'Search Index', 'membership2' ),  
  42. 'description' => __( 'Allow Search Engines to index protected content.', 'membership2' ),  
  43. 'icon' => 'wpmui-fa wpmui-fa-search',  
  44. 'details' => array( 
  45. array( 
  46. 'type' => MS_Helper_Html::TYPE_HTML_TEXT,  
  47. 'value' => sprintf( 
  48. '%s<br><br>%s',  
  49. __( 'The special Membership "<b>Search Index</b>" is available in your Protection Rules page.<br>All content that is made available for that Membership is always visible to search engine crawlers.', 'membership2' ),  
  50. __( 'Supported Search Engines: Google, Yahoo, Bing', 'membership2' ) 
  51. ),  
  52. ),  
  53. array( 
  54. 'id' => 'first_click_free',  
  55. 'type' => MS_Helper_Html::INPUT_TYPE_RADIO_SLIDER,  
  56. 'title' => __( 'First Click Free', 'membership2' ),  
  57. 'desc' => sprintf( 
  58. __( 'All content that is available for Search engines is also available for all visitors that <b>directly arrive from a search engine</b> ("%sFirst Click Free%s" policy)<br>Disabling this feature might earn your site penalties by Google', 'membership2' ),  
  59. '<a href="http://googlewebmastercentral.blogspot.com/2008/10/first-click-free-for-web-search.html" target="_blank">',  
  60. '</a>' 
  61. ),  
  62. 'class' => 'has-labels',  
  63. 'before' => __( 'Disable "First Click Free"', 'membership2' ),  
  64. 'after' => __( 'Allow "First Click Free"', 'membership2' ),  
  65. 'value' => true,  
  66. 'wrapper_class' => 'disabled',  
  67. ),  
  68. ),  
  69. 'action' => array( __( 'Pro Version', 'membership2' ) ),  
  70. ); 
  71.  
  72. return $list; 
  73.