• Resolved Larzans

    (@larzans)


    According to the description the plugin is compatible with WP 4.6, but it uses the function get_user_locale which was introduced only in 4.7.

    Please update the requirements or add this shiv ??

    if (!function_exists('get_user_locale')) {
      function get_user_locale( $user_id = 0 ) {
        $user = false;
        if ( 0 === $user_id && function_exists( 'wp_get_current_user' ) ) {
          $user = wp_get_current_user();
        } elseif ( $user_id instanceof WP_User ) {
          $user = $user_id;
        } elseif ( $user_id && is_numeric( $user_id ) ) {
          $user = get_user_by( 'id', $user_id );
        }
    
        if ( ! $user ) {
          return get_locale();
        }
    
        $locale = $user->locale;
        return $locale ? $locale : get_locale();
      }
    }
    • This topic was modified 5 years ago by Larzans.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Jeff Farthing

    (@jfarthing84)

    Thanks for the heads up!

    Thread Starter Larzans

    (@larzans)

    Cheers.
    Probably best to just add the shiv, that is the only thing that prevented it from working with 4.6, didn’t have any other problems (with the base plugin)

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Plugin NOT compatible with 4.6 anymore’ is closed to new replies.