'home_url()', '/[\s|]get_bloginfo\(\s?("|\')wpurl("|\')\s?\)/' => 'site_url()', '/[\s|]get_bloginfo\(\s?("|\')stylesheet_directory("|\')\s?\)/' => 'get_stylesheet_directory_uri()', '/[\s|]get_bloginfo\(\s?("|\')template_directory("|\')\s?\)/' => 'get_template_directory_uri()', '/[\s|]get_bloginfo\(\s?("|\')template_url("|\')\s?\)/' => 'get_template_directory_uri()', '/[\s|]get_bloginfo\(\s?("|\')text_direction("|\')\s?\)/' => 'is_rtl()', '/[\s|]get_bloginfo\(\s?("|\')feed_url("|\')\s?\)/' => 'get_feed_link( \'feed\' ) (where feed is rss, rss2, atom)', '/[\s|]bloginfo\(\s?("|\')url("|\')\s?\)/' => 'echo home_url()', '/[\s|]bloginfo\(\s?("|\')wpurl("|\')\s?\)/' => 'echo site_url()', '/[\s|]bloginfo\(\s?("|\')stylesheet_directory("|\')\s?\)/' => 'get_stylesheet_directory_uri()', '/[\s|]bloginfo\(\s?("|\')template_directory("|\')\s?\)/' => 'get_template_directory_uri()', '/[\s|]bloginfo\(\s?("|\')template_url("|\')\s?\)/' => 'get_template_directory_uri()', '/[\s|]bloginfo\(\s?("|\')text_direction("|\')\s?\)/' => 'is_rtl()', '/[\s|]bloginfo\(\s?("|\')feed_url("|\')\s?\)/' => 'get_feed_link( \'feed\' ) (where feed is rss, rss2, atom)', ); foreach ( $php_files as $php_key => $phpfile ) { foreach ( $checks as $key => $check ) { checkcount(); if ( preg_match( $key, $phpfile, $matches ) ) { $filename = tc_filename( $php_key ); $error = trim( esc_html( rtrim($matches[0], '(' ) ) ); $grep = tc_grep( rtrim( $matches[0], '(' ), $php_key ); $this->error[] = "RECOMMENDED: {$error} was found in the file {$filename}. Use {$check} instead.{$grep}"; $ret = false; } } } return $ret; } function getError() { return $this->error; } } $themechecks[] = new Suggested;