[wp-trac] [WordPress Trac] #49539: Twenty Twenty: fix theme issues

WordPress Trac noreply at wordpress.org
Thu Feb 27 21:32:48 UTC 2020


#49539: Twenty Twenty: fix theme issues
------------------------------+-----------------------------
 Reporter:  fahimmurshed      |      Owner:  (none)
     Type:  defect (bug)      |     Status:  new
 Priority:  normal            |  Milestone:  Awaiting Review
Component:  Bundled Theme     |    Version:  5.3.2
 Severity:  normal            |   Keywords:  needs-testing
  Focuses:  coding-standards  |
------------------------------+-----------------------------
 Before updating/releasing this theme, please check this theme with **Theme
 Sniffer (TRT)** https://wordpress.org/plugins/theme-sniffer/ plugin.

 Here is the full report of this theme and should fix that. I can't upload
 the patch file because of lots of issues and it's difficult to upload the
 patches one by one with the tickets. The core/default theme should follow
 the Theme submit standard/theme guide.

 Please check and fix:

 {{{
 FILE: /wp-content/themes/twentytwenty/classes/class-twentytwenty-walker-
 page.php
 --------------------------------------------------------------------------------------------------------------
 FOUND 3 ERRORS AFFECTING 3 LINES
 --------------------------------------------------------------------------------------------------------------
   65 | ERROR | Hook names invoked by a theme/plugin should start with the
 theme/plugin prefix. Found:
      |       | "page_css_class".
      |       |
 (WPThemeReview.CoreFunctionality.PrefixAllGlobals.NonPrefixedHooknameFound)
   81 | ERROR | Hook names invoked by a theme/plugin should start with the
 theme/plugin prefix. Found:
      |       | "page_menu_link_attributes".
      |       |
 (WPThemeReview.CoreFunctionality.PrefixAllGlobals.NonPrefixedHooknameFound)
  129 | ERROR | Hook names invoked by a theme/plugin should start with the
 theme/plugin prefix. Found:
      |       | "the_title".
 (WPThemeReview.CoreFunctionality.PrefixAllGlobals.NonPrefixedHooknameFound)
 --------------------------------------------------------------------------------------------------------------
 }}}

 {{{
 FILE: /wp-content/themes/twentytwenty/functions.php
 --------------------------------------------------------------------------------------------------------------
 FOUND 3 ERRORS AFFECTING 3 LINES
 --------------------------------------------------------------------------------------------------------------
   50 | ERROR | Global variables defined by a theme/plugin should start
 with the theme/plugin prefix. Found:
      |       | "$content_width".
      |       |
 (WPThemeReview.CoreFunctionality.PrefixAllGlobals.NonPrefixedVariableFound)
  332 | ERROR | Functions declared in the global namespace by a
 theme/plugin should start with the
      |       | theme/plugin prefix. Found: "wp_body_open".
      |       |
 (WPThemeReview.CoreFunctionality.PrefixAllGlobals.NonPrefixedFunctionFound)
  333 | ERROR | Hook names invoked by a theme/plugin should start with the
 theme/plugin prefix. Found:
      |       | "wp_body_open".
      |       |
 (WPThemeReview.CoreFunctionality.PrefixAllGlobals.NonPrefixedHooknameFound)
 --------------------------------------------------------------------------------------------------------------

 }}}

 {{{
 FILE: /wp-content/themes/twentytwenty/template-parts/entry-header.php
 --------------------------------------------------------------------------------------------------------------
 FOUND 6 ERRORS AFFECTING 6 LINES
 --------------------------------------------------------------------------------------------------------------
  10 | ERROR | Global variables defined by a theme/plugin should start with
 the theme/plugin prefix. Found:
     |       | "$entry_header_classes".
     |       |
 (WPThemeReview.CoreFunctionality.PrefixAllGlobals.NonPrefixedVariableFound)
  13 | ERROR | Global variables defined by a theme/plugin should start with
 the theme/plugin prefix. Found:
     |       | "$entry_header_classes".
     |       |
 (WPThemeReview.CoreFunctionality.PrefixAllGlobals.NonPrefixedVariableFound)
  30 | ERROR | Global variables defined by a theme/plugin should start with
 the theme/plugin prefix. Found:
     |       | "$show_categories".
     |       |
 (WPThemeReview.CoreFunctionality.PrefixAllGlobals.NonPrefixedVariableFound)
  51 | ERROR | Global variables defined by a theme/plugin should start with
 the theme/plugin prefix. Found:
     |       | "$intro_text_width".
     |       |
 (WPThemeReview.CoreFunctionality.PrefixAllGlobals.NonPrefixedVariableFound)
  54 | ERROR | Global variables defined by a theme/plugin should start with
 the theme/plugin prefix. Found:
     |       | "$intro_text_width".
     |       |
 (WPThemeReview.CoreFunctionality.PrefixAllGlobals.NonPrefixedVariableFound)
  56 | ERROR | Global variables defined by a theme/plugin should start with
 the theme/plugin prefix. Found:
     |       | "$intro_text_width".
     |       |
 (WPThemeReview.CoreFunctionality.PrefixAllGlobals.NonPrefixedVariableFound)
 --------------------------------------------------------------------------------------------------------------
 }}}

 {{{

 FILE: /wp-content/themes/twentytwenty/template-parts/featured-image.php
 --------------------------------------------------------------------------------------------------------------
 FOUND 3 ERRORS AFFECTING 3 LINES
 --------------------------------------------------------------------------------------------------------------
  12 | ERROR | Global variables defined by a theme/plugin should start with
 the theme/plugin prefix. Found:
     |       | "$featured_media_inner_classes".
     |       |
 (WPThemeReview.CoreFunctionality.PrefixAllGlobals.NonPrefixedVariableFound)
  16 | ERROR | Global variables defined by a theme/plugin should start with
 the theme/plugin prefix. Found:
     |       | "$featured_media_inner_classes".
     |       |
 (WPThemeReview.CoreFunctionality.PrefixAllGlobals.NonPrefixedVariableFound)
  27 | ERROR | Global variables defined by a theme/plugin should start with
 the theme/plugin prefix. Found:
     |       | "$caption".
 (WPThemeReview.CoreFunctionality.PrefixAllGlobals.NonPrefixedVariableFound)
 --------------------------------------------------------------------------------------------------------------
 }}}

 {{{

 FILE: /wp-content/themes/twentytwenty/template-parts/footer-menus-
 widgets.php
 --------------------------------------------------------------------------------------------------------------
 FOUND 7 ERRORS AFFECTING 7 LINES
 --------------------------------------------------------------------------------------------------------------
  11 | ERROR | Global variables defined by a theme/plugin should start with
 the theme/plugin prefix. Found:
     |       | "$has_footer_menu".
     |       |
 (WPThemeReview.CoreFunctionality.PrefixAllGlobals.NonPrefixedVariableFound)
  12 | ERROR | Global variables defined by a theme/plugin should start with
 the theme/plugin prefix. Found:
     |       | "$has_social_menu".
     |       |
 (WPThemeReview.CoreFunctionality.PrefixAllGlobals.NonPrefixedVariableFound)
  14 | ERROR | Global variables defined by a theme/plugin should start with
 the theme/plugin prefix. Found:
     |       | "$has_sidebar_1".
     |       |
 (WPThemeReview.CoreFunctionality.PrefixAllGlobals.NonPrefixedVariableFound)
  15 | ERROR | Global variables defined by a theme/plugin should start with
 the theme/plugin prefix. Found:
     |       | "$has_sidebar_2".
     |       |
 (WPThemeReview.CoreFunctionality.PrefixAllGlobals.NonPrefixedVariableFound)
  27 | ERROR | Global variables defined by a theme/plugin should start with
 the theme/plugin prefix. Found:
     |       | "$footer_top_classes".
     |       |
 (WPThemeReview.CoreFunctionality.PrefixAllGlobals.NonPrefixedVariableFound)
  29 | ERROR | Global variables defined by a theme/plugin should start with
 the theme/plugin prefix. Found:
     |       | "$footer_top_classes".
     |       |
 (WPThemeReview.CoreFunctionality.PrefixAllGlobals.NonPrefixedVariableFound)
  30 | ERROR | Global variables defined by a theme/plugin should start with
 the theme/plugin prefix. Found:
     |       | "$footer_top_classes".
     |       |
 (WPThemeReview.CoreFunctionality.PrefixAllGlobals.NonPrefixedVariableFound)
 --------------------------------------------------------------------------------------------------------------
 }}}

 {{{

 FILE: /wp-content/themes/twentytwenty/template-parts/modal-menu.php
 --------------------------------------------------------------------------------------------------------------
 FOUND 6 ERRORS AFFECTING 6 LINES
 --------------------------------------------------------------------------------------------------------------
  27 | ERROR | Global variables defined by a theme/plugin should start with
 the theme/plugin prefix. Found:
     |       | "$mobile_menu_location".
     |       |
 (WPThemeReview.CoreFunctionality.PrefixAllGlobals.NonPrefixedVariableFound)
  31 | ERROR | Global variables defined by a theme/plugin should start with
 the theme/plugin prefix. Found:
     |       | "$mobile_menu_location".
     |       |
 (WPThemeReview.CoreFunctionality.PrefixAllGlobals.NonPrefixedVariableFound)
  33 | ERROR | Global variables defined by a theme/plugin should start with
 the theme/plugin prefix. Found:
     |       | "$mobile_menu_location".
     |       |
 (WPThemeReview.CoreFunctionality.PrefixAllGlobals.NonPrefixedVariableFound)
  35 | ERROR | Global variables defined by a theme/plugin should start with
 the theme/plugin prefix. Found:
     |       | "$mobile_menu_location".
     |       |
 (WPThemeReview.CoreFunctionality.PrefixAllGlobals.NonPrefixedVariableFound)
  40 | ERROR | Global variables defined by a theme/plugin should start with
 the theme/plugin prefix. Found:
     |       | "$expanded_nav_classes".
     |       |
 (WPThemeReview.CoreFunctionality.PrefixAllGlobals.NonPrefixedVariableFound)
  43 | ERROR | Global variables defined by a theme/plugin should start with
 the theme/plugin prefix. Found:
     |       | "$expanded_nav_classes".
     |       |
 (WPThemeReview.CoreFunctionality.PrefixAllGlobals.NonPrefixedVariableFound)
 --------------------------------------------------------------------------------------------------------------

 }}}

 {{{
 FILE: /wp-content/themes/twentytwenty/template-parts/navigation.php
 --------------------------------------------------------------------------------------------------------------
 FOUND 5 ERRORS AFFECTING 5 LINES
 --------------------------------------------------------------------------------------------------------------
  10 | ERROR | Global variables defined by a theme/plugin should start with
 the theme/plugin prefix. Found:
     |       | "$next_post".
 (WPThemeReview.CoreFunctionality.PrefixAllGlobals.NonPrefixedVariableFound)
  11 | ERROR | Global variables defined by a theme/plugin should start with
 the theme/plugin prefix. Found:
     |       | "$prev_post".
 (WPThemeReview.CoreFunctionality.PrefixAllGlobals.NonPrefixedVariableFound)
  15 | ERROR | Global variables defined by a theme/plugin should start with
 the theme/plugin prefix. Found:
     |       | "$pagination_classes".
     |       |
 (WPThemeReview.CoreFunctionality.PrefixAllGlobals.NonPrefixedVariableFound)
  18 | ERROR | Global variables defined by a theme/plugin should start with
 the theme/plugin prefix. Found:
     |       | "$pagination_classes".
     |       |
 (WPThemeReview.CoreFunctionality.PrefixAllGlobals.NonPrefixedVariableFound)
  20 | ERROR | Global variables defined by a theme/plugin should start with
 the theme/plugin prefix. Found:
     |       | "$pagination_classes".
     |       |
 (WPThemeReview.CoreFunctionality.PrefixAllGlobals.NonPrefixedVariableFound)
 --------------------------------------------------------------------------------------------------------------

 }}}

 {{{
 FILE: /wp-content/themes/twentytwenty/template-parts/pagination.php
 --------------------------------------------------------------------------------------------------------------
 FOUND 5 ERRORS AFFECTING 5 LINES
 --------------------------------------------------------------------------------------------------------------
  18 | ERROR | Global variables defined by a theme/plugin should start with
 the theme/plugin prefix. Found:
     |       | "$prev_text".
 (WPThemeReview.CoreFunctionality.PrefixAllGlobals.NonPrefixedVariableFound)
  23 | ERROR | Global variables defined by a theme/plugin should start with
 the theme/plugin prefix. Found:
     |       | "$next_text".
 (WPThemeReview.CoreFunctionality.PrefixAllGlobals.NonPrefixedVariableFound)
  29 | ERROR | Global variables defined by a theme/plugin should start with
 the theme/plugin prefix. Found:
     |       | "$posts_pagination".
     |       |
 (WPThemeReview.CoreFunctionality.PrefixAllGlobals.NonPrefixedVariableFound)
  39 | ERROR | Global variables defined by a theme/plugin should start with
 the theme/plugin prefix. Found:
     |       | "$posts_pagination".
     |       |
 (WPThemeReview.CoreFunctionality.PrefixAllGlobals.NonPrefixedVariableFound)
  44 | ERROR | Global variables defined by a theme/plugin should start with
 the theme/plugin prefix. Found:
     |       | "$posts_pagination".
     |       |
 (WPThemeReview.CoreFunctionality.PrefixAllGlobals.NonPrefixedVariableFound)
 --------------------------------------------------------------------------------------------------------------

 }}}

 Full page screenshot: [[Image(https://i.imgur.com/uQm8G0Y.png)]]

 I am very happy to contribute :)

 Thanks so much.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/49539>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list