I Got Massage From Reviewer .
- All global variables should be within a function or class.
- Data Validation issues have been found in your theme. All dynamic data must be correctly escaped for the context where it is rendered.
Please perform a global search for “echo $” and you will see several issues.
and how Do i fix both
and i can’t understand this
Please perform a global search for “echo $” and you will see several issues.
Thank you.
You must to call any global variables in functions or class. And esc_attr any variables before echo it.
Hi,
i place it within function but reviewer send that massage.
my codes.
function syptthemes_social($place, $title, $style) {
global $syptthemes_social_list;
........
}
function syptthemes_wp_title( $title, $sep ) {
if ( is_feed() ) {
return $title;
}
global $page, $paged;
.....
}
function syptthemes_sanitize_choices( $input, $setting ) {
global $wp_customize;
.....
}
function syptthemes_social_customize( $wp_customize ) {
global $syptthemes_social_list;
.....
}
Thank You.
sbp
5
Search forum. It is discussed many times before.
Regarding global, esp. check in relation to - theme options panel ( if applicable to your theme )
Search for global $ in theme.
I think good coding should not be used global in function.