bws_plugin_update_row

The Google Sitemap by BestWebSoft bws plugin update row function.

Description

bws_plugin_update_row( $plugin_key, (constant) $link_slug = false, (bool) $free_plugin_name = false ); 

Parameters (3)

0. $plugin_key
The plugin key.
1. $link_slug — Optional. (constant) => false
The link slug.
2. $free_plugin_name — Optional. (bool) => false
The free plugin name.

Usage

  1. if ( !function_exists( 'bws_plugin_update_row' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'google-sitemap-by-bestwebsoft/bws_menu/bws_functions.php'; 
  3.  
  4. // The plugin key. 
  5. $plugin_key = null; 
  6.  
  7. // The link slug. 
  8. $link_slug = false; 
  9.  
  10. // The free plugin name. 
  11. $free_plugin_name = false; 
  12.  
  13. // NOTICE! Understand what this does before running. 
  14. $result = bws_plugin_update_row($plugin_key, $link_slug, $free_plugin_name); 
  15.  

Defined (1)

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

/bws_menu/bws_functions.php  
  1. function bws_plugin_update_row( $plugin_key, $link_slug = false, $free_plugin_name = false ) { 
  2. global $bstwbsftwppdtplgns_options; 
  3. $wp_list_table = _get_list_table( 'WP_Plugins_List_Table' ); 
  4. if ( isset( $bstwbsftwppdtplgns_options['wrong_license_key'][ $plugin_key ] ) ) { 
  5. echo '<tr class="plugin-update-tr"> 
  6. <td colspan="' . $wp_list_table->get_column_count() . '" class="plugin-update colspanchange"> 
  7. <div class="update-message" style="background-color: #FFEBE8; border-color: #CC0000;"><strong>' . __( 'WARNING: Illegal use notification', 'bestwebsoft' ) . '.</strong> ' . __( 'You can use one license of the Pro plugin for one domain only. Please check and edit your license or domain if necessary using you personal Client Area. We strongly recommend you to solve the problem within 24 hours, otherwise the Pro plugin will be deactivated.', 'bestwebsoft' ) . ' <a target="_blank" href="http://support.bestwebsoft.com/hc/en-us/articles/204240089">' . __( 'Learn More', 'bestwebsoft' ) . '</a></div> 
  8. </td> 
  9. </tr>'; 
  10. } elseif ( isset( $bstwbsftwppdtplgns_options['time_out'][ $plugin_key ] ) && strtotime( $bstwbsftwppdtplgns_options['time_out'][ $plugin_key ] ) < strtotime( date("m/d/Y") ) ) { 
  11. echo '<tr class="plugin-update-tr"> 
  12. <td colspan="' . $wp_list_table->get_column_count() . '" class="plugin-update colspanchange"> 
  13. <div class="update-message" style="color: #8C0000;">';  
  14. if ( isset( $bstwbsftwppdtplgns_options['trial'][ $plugin_key ] ) && $link_slug != false ) { 
  15. echo __( 'Notice: Your Pro Trial license has expired. To continue using the plugin you should buy a Pro license', 'bestwebsoft' ) . ' - <a href="http://bestwebsoft.com/products/' . $link_slug .'/">http://bestwebsoft.com/products/' . $link_slug . '/</a>'; 
  16. } else { 
  17. echo __( 'Your license has expired. To continue getting top-priority support and plugin updates you should extend it.', 'bestwebsoft' ) . ' <a target="_new" href="http://support.bestwebsoft.com/entries/53487136">' . __( "Learn more", 'bestwebsoft' ) . '</a>'; 
  18. echo '</div> 
  19. </td> 
  20. </tr>'; 
  21. } elseif ( isset( $bstwbsftwppdtplgns_options['trial'][ $plugin_key ] ) ) { 
  22. echo '<tr class="plugin-update-tr"> 
  23. <td colspan="' . $wp_list_table->get_column_count() . '" class="plugin-update colspanchange"> 
  24. <div class="update-message" style="color: #8C0000;">'; 
  25. if ( $free_plugin_name != false ) { 
  26. echo sprintf( __( 'Notice: You are using the Pro Trial license of %s plugin.', 'bestwebsoft' ), $free_plugin_name ); 
  27. } else { 
  28. _e( 'Notice: You are using the Pro Trial license of plugin.', 'bestwebsoft' ); 
  29. if ( isset( $bstwbsftwppdtplgns_options['time_out'][ $plugin_key ] ) ) 
  30. echo ' ' . __( "The Pro Trial license will expire on", 'bestwebsoft' ) . ' ' . $bstwbsftwppdtplgns_options['time_out'][ $plugin_key ] . '.'; 
  31. echo '</div> 
  32. </td> 
  33. </tr>';