/includes/deprecated.php

  1. <?php 
  2. /** 
  3. * Includes deprecated functions 
  4. */ 
  5.  
  6. /**  
  7. * Renaming old version options 
  8. * @deprecated since 3.0.8 
  9. * @todo remove after 28.10.2017 
  10. */ 
  11. if ( ! function_exists( 'gglstmp_check_old_options' ) ) { 
  12. function gglstmp_check_old_options() { 
  13. if ( is_multisite() ) { 
  14. global $wpdb; 
  15. if ( get_site_option( 'gglstmp_settings' ) ) { 
  16. $old_options = get_site_option( 'gglstmp_settings' ); 
  17. if ( ! get_site_option( 'gglstmp_options' ) ) 
  18. add_site_option( 'gglstmp_options', $old_options ); 
  19. else 
  20. update_site_option( 'gglstmp_options', $old_options ); 
  21. delete_site_option( 'gglstmp_settings' ); 
  22. $blogids = $wpdb->get_col( "SELECT `blog_id` FROM $wpdb->blogs" ); 
  23. $old_blog = $wpdb->blogid; 
  24. foreach ( $blogids as $blog_id ) { 
  25. switch_to_blog( $blog_id ); 
  26. if ( get_option( 'gglstmp_settings' ) ) { 
  27. $old_options = get_option( 'gglstmp_settings' ); 
  28. if ( ! get_option( 'gglstmp_options' ) ) 
  29. add_option( 'gglstmp_options', $old_options ); 
  30. else 
  31. update_option( 'gglstmp_options', $old_options ); 
  32. delete_option( 'gglstmp_settings' ); 
  33. switch_to_blog( $old_blog ); 
  34. } else { 
  35. if ( get_option( 'gglstmp_settings' ) ) { 
  36. $old_options = get_option( 'gglstmp_settings' ); 
  37. if ( ! get_option( 'gglstmp_options' ) ) 
  38. add_option( 'gglstmp_options', $old_options ); 
  39. else 
  40. update_option( 'gglstmp_options', $old_options ); 
  41. delete_option( 'gglstmp_settings' ); 
.