Skip to content

Commit

Permalink
add common functions that return int/float to autoEscapedFunctions
Browse files Browse the repository at this point in the history
  • Loading branch information
kkmuffme committed Sep 5, 2022
1 parent 17dbd17 commit 932fb94
Showing 1 changed file with 199 additions and 58 deletions.
257 changes: 199 additions & 58 deletions WordPress/Sniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,64 +109,205 @@ abstract class Sniff implements PHPCS_Sniff {
* @var array
*/
protected $autoEscapedFunctions = array(
'allowed_tags' => true,
'bloginfo' => true,
'body_class' => true,
'calendar_week_mod' => true,
'category_description' => true,
'checked' => true,
'comment_class' => true,
'count' => true,
'disabled' => true,
'do_shortcode' => true,
'do_shortcode_tag' => true,
'get_archives_link' => true,
'get_attachment_link' => true,
'get_avatar' => true,
'get_bookmark_field' => true,
'get_calendar' => true,
'get_comment_author_link' => true,
'get_current_blog_id' => true,
'get_delete_post_link' => true,
'get_search_form' => true,
'get_search_query' => true,
'get_the_author_link' => true,
'get_the_author' => true,
'get_the_date' => true,
'get_the_ID' => true,
'get_the_post_thumbnail' => true,
'get_the_term_list' => true,
'post_type_archive_title' => true,
'readonly' => true,
'selected' => true,
'single_cat_title' => true,
'single_month_title' => true,
'single_post_title' => true,
'single_tag_title' => true,
'single_term_title' => true,
'tag_description' => true,
'term_description' => true,
'the_author' => true,
'the_date' => true,
'the_title_attribute' => true,
'walk_nav_menu_tree' => true,
'wp_dropdown_categories' => true,
'wp_dropdown_users' => true,
'wp_generate_tag_cloud' => true,
'wp_get_archives' => true,
'wp_get_attachment_image' => true,
'wp_get_attachment_link' => true,
'wp_link_pages' => true,
'wp_list_authors' => true,
'wp_list_bookmarks' => true,
'wp_list_categories' => true,
'wp_list_comments' => true,
'wp_login_form' => true,
'wp_loginout' => true,
'wp_nav_menu' => true,
'wp_register' => true,
'wp_tag_cloud' => true,
'wp_title' => true,
'abs' => true,
'acos' => true,
'acosh' => true,
'allowed_tags' => true,
'array_push' => true,
'array_unshift' => true,
'asin' => true,
'asinh' => true,
'atan' => true,
'atan2' => true,
'atanh' => true,
'bccomp' => true,
'bcscale' => true,
'bloginfo' => true,
'body_class' => true,
'bzerrno' => true,
'cal_days_in_month' => true,
'cal_to_jd' => true,
'calendar_week_mod' => true,
'category_description' => true,
'ceil' => true,
'checked' => true,
'collator_compare' => true,
'collator_get_error_code' => true,
'comment_class' => true,
'connection_aborted' => true,
'connection_status' => true,
'connection_timeout' => true,
'cos' => true,
'cosh' => true,
'count' => true,
'crc32' => true,
'curl_errno' => true,
'curl_multi_add_handle' => true,
'curl_multi_errno' => true,
'curl_multi_exec' => true,
'curl_multi_remove_handle' => true,
'curl_multi_select' => true,
'curl_pause' => true,
'curl_share_errno' => true,
'date_timestamp_get' => true,
'datefmt_get_calendar' => true,
'datefmt_get_datetype' => true,
'datefmt_get_error_code' => true,
'datefmt_get_timetype' => true,
'deg2rad' => true,
'disabled' => true,
'do_shortcode' => true,
'do_shortcode_tag' => true,
'doubleval' => true,
'easter_date' => true,
'easter_days' => true,
'error_reporting' => true,
'exp' => true,
'expm1' => true,
'extract' => true,
'fdiv' => true,
'floor' => true,
'fmod' => true,
'fprintf' => true,
'frenchtojd' => true,
'fscanf' => true,
'fseek' => true,
'ftok' => true,
'ftp_mdtm' => true,
'ftp_nb_continue' => true,
'ftp_nb_fget' => true,
'ftp_nb_fput' => true,
'ftp_nb_get' => true,
'ftp_nb_put' => true,
'ftp_size' => true,
'func_num_args' => true,
'gc_collect_cycles' => true,
'gc_mem_caches' => true,
'geoip_id_by_name' => true,
'get_archives_link' => true,
'get_attachment_link' => true,
'get_avatar' => true,
'get_bookmark_field' => true,
'get_calendar' => true,
'get_comment_author_link' => true,
'get_current_blog_id' => true,
'get_delete_post_link' => true,
'get_resource_id' => true,
'get_search_form' => true,
'get_search_query' => true,
'get_the_ID' => true,
'get_the_author' => true,
'get_the_author_link' => true,
'get_the_date' => true,
'get_the_post_thumbnail' => true,
'get_the_term_list' => true,
'getrandmax' => true,
'gettimeofday' => true,
'gregoriantojd' => true,
'gzputs' => true,
'gzseek' => true,
'gzwrite' => true,
'hash_update_stream' => true,
'http_support' => true,
'hypot' => true,
'id3_get_genre_id' => true,
'id3_get_version' => true,
'idate' => true,
'imagefontheight' => true,
'imagefontwidth' => true,
'imagegetinterpolation' => true,
'imagetypes' => true,
'intdiv' => true,
'intl_get_error_code' => true,
'intlcal_field_difference' => true,
'intlcal_get_actual_maximum' => true,
'intlcal_get_actual_minimum' => true,
'intlcal_get_day_of_week_type' => true,
'intlcal_get_first_day_of_week' => true,
'intlcal_get_greatest_minimum' => true,
'intlcal_get_least_maximum' => true,
'intlcal_get_minimal_days_in_first_week' => true,
'intlcal_get_minimum' => true,
'intlcal_get_now' => true,
'intlcal_get_repeated_wall_time_option' => true,
'intlcal_get_skipped_wall_time_option' => true,
'intlcal_get_time' => true,
'intlcal_get_weekend_transition' => true,
'intlgregcal_get_gregorian_change' => true,
'intltz_count_equivalent_ids' => true,
'intltz_get_dst_savings' => true,
'intltz_get_error_code' => true,
'intltz_get_offset' => true,
'intltz_get_raw_offset' => true,
'json_last_error' => true,
'lcg_value' => true,
'levenshtein' => true,
'log' => true,
'log10' => true,
'log1p' => true,
'mb_ereg_search_getpos' => true,
'mb_strwidth' => true,
'mb_substr_count' => true,
'mhash_count' => true,
'microtime' => true,
'mt_getrandmax' => true,
'mt_rand' => true,
'ob_get_level' => true,
'ord' => true,
'pi' => true,
'post_type_archive_title' => true,
'print' => true,
'printf' => true,
'rand' => true,
'random_int' => true,
'readonly' => true,
'round' => true,
'selected' => true,
'similar_text' => true,
'single_cat_title' => true,
'single_month_title' => true,
'single_post_title' => true,
'single_tag_title' => true,
'single_term_title' => true,
'sizeof' => true,
'sqrt' => true,
'strcasecmp' => true,
'strcmp' => true,
'strcoll' => true,
'strcspn' => true,
'strnatcasecmp' => true,
'strnatcmp' => true,
'strncasecmp' => true,
'strncmp' => true,
'strspn' => true,
'substr_count' => true,
'tag_description' => true,
'term_description' => true,
'the_author' => true,
'the_date' => true,
'the_title_attribute' => true,
'umask' => true,
'version_compare' => true,
'vfprintf' => true,
'vprintf' => true,
'walk_nav_menu_tree' => true,
'wp_dropdown_categories' => true,
'wp_dropdown_users' => true,
'wp_generate_tag_cloud' => true,
'wp_get_archives' => true,
'wp_get_attachment_image' => true,
'wp_get_attachment_link' => true,
'wp_link_pages' => true,
'wp_list_authors' => true,
'wp_list_bookmarks' => true,
'wp_list_categories' => true,
'wp_list_comments' => true,
'wp_login_form' => true,
'wp_loginout' => true,
'wp_nav_menu' => true,
'wp_register' => true,
'wp_tag_cloud' => true,
'wp_title' => true,
);

/**
Expand Down

0 comments on commit 932fb94

Please sign in to comment.