Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi Okoth,

    Yes, that code is there for compatibility with prior versions of WordPress; if you read the relevant lines of code, you’ll see that it does use wp_get_theme() if it is available. Eventually we will drop support for older versions of WordPress and remove that code, but when that happens, that will be a breaking change for anyone on those versions of WordPress who tries to update the plugin, which is why we don’t do it gratuitously.

    Incidentally, here’s the relevant code, for anyone interested:

    if ( function_exists( 'wp_get_theme' ) ) {
    	$theme = wp_get_theme();
    } else {
    	$theme = get_theme( get_current_theme() );
    }
    Thread Starter Okoth1

    (@okoth1)

    Excellent! Yeah, I didn’t bother to check because most of the time people don’t think like you. Well done!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Deprecation’ is closed to new replies.