• Resolved drtonyb

    (@drtonyb)


    I cannot believe that developers working on Gutenberg have coded like this:

    function gutenberg_block_core_page_list_render_nested_page_list( $nested_pages, $active_page_ancestor_ids = array(), $colors, $depth = 0 ) {

    \wp-content\plugins\gutenberg\build\block-library\blocks\page-list.php on line 138

    But, you’re not the only bad coders in the wp plugin world. I’ve encountered numerous other plugins doing this also.

    Programming 101 – you never have a function parameter that is required FOLLOWING an optional parameter.

    Prior to php8, this practice was tolerated by php7 and php5. Now php8 throws a Deprecated warning.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Bad coding practice’ is closed to new replies.