• Resolved Gulshan Kumar

    (@thegulshankumar)


    Hello Dear Developers,
    Hope you are doing great

    I just thought to notify about Deprecated code which contains in this plugin.
    Can you please have a look at following sources?

    Source: /jetpack/modules/infinite-scroll.php
    get_theme at line 124:
    $theme = function_exists( 'wp_get_theme' ) ? wp_get_theme() : get_theme( get_current_theme() );
    Deprecated 3.4.0 Use wp_get_theme()

    Source: /jetpack/modules/infinite-scroll.php
    get_theme at line 18:
    $theme = function_exists( 'wp_get_theme' ) ? wp_get_theme() : get_theme( get_current_theme() );
    Deprecated 3.4.0 Use wp_get_theme()

    Source: /jetpack/modules/infinite-scroll.php
    get_theme at line 124:
    $theme = function_exists( 'wp_get_theme' ) ? wp_get_theme() : get_theme( get_current_theme() );
    Deprecated 3.4.0 Use wp_get_theme()

    Source: /jetpack/modules/custom-css/custom-css.php
    get_current_theme at line 446:
    $post['post_excerpt'] = get_current_theme();
    Deprecated 3.4.0 Use wp_get_theme()

    get_current_theme at line 465:
    $safecss_post['post_excerpt'] = get_current_theme();
    Deprecated 3.4.0 Use wp_get_theme()

    get_current_theme at line 1070:
    $current_theme = get_current_theme();
    Deprecated 3.4.0 Use wp_get_theme()

    Source: /jetpack/modules/infinite-scroll/infinity.php
    get_current_theme at line 1476:
    function_exists( 'wp_get_theme' ) ? wp_get_theme()->Name : get_current_theme()
    Deprecated 3.4.0 Use wp_get_theme()

    Ref: https://codex.wordpress.org/Function_Reference/get_theme

    Thanks & Regards,
    Gulshan

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic 🚀

    Thanks for the report!

    You’ll be happy to hear that all instances of those functions were first checking if wp_get_theme() existed, so none of those old functions were actually run if you used a recent version of WordPress.

    Nevertheless, since Jetpack now requires WordPress 4.6, we can remove those checks. I created a patch here, we’ll review it and see about including it in a future Jetpack release.

    Thread Starter Gulshan Kumar

    (@thegulshankumar)

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Deprecated code found’ is closed to new replies.