Soft rejection

Here is the comment from your Envato Quality team reviewer:

  1. Don’t use translating functions like this: https://envato.d.pr/ifTKTK and more.

More info: https://developer.wordpress.org/reference/functions/esc_html_e/

  1. Still. There may still be unescaped strings. It’s best to do the output escaping as late as possible, ideally as data is being outputted. Example(s): https://envato.d.pr/WXQMqa and more.

  2. https://envato.d.pr/xL7xxF - You should avoid and not to hardcode custom post_class(). Main reason for this is being able to remove the class when needed i.e. child themes.

ref: http://themeshaper.com/2014/11/20/mastering-the-post_class-function/

Note: The screenshots above are examples. There may be more issues that are similar. Please make sure to check all files and fix all instances of each issue before submitting another update.
Thank you!

Hi

you should:

  1. you have used multiple text-domain, this is the correct format:

esc_html_e( string $text, string $domain = ‘default’ )

example: esc_html_e( $textstring, ‘text-domain’ )

  1. you should escaped strings before render.
    example: echo esc_attr( esc_url( $src ) );

  2. you have hard code for class: post_class(‘post’);
    you should avoid to do this. check the ref. link to know more.

Thanks

Thanks for your help @mgscoder . I have made changes like this Iam I Right ?

1 .

                    if ( is_day() ) :
                    echo esc_html( get_the_date('F j, Y') );

                    elseif ( is_month() ) :
                        echo esc_html( get_the_date('F Y') );

                    elseif ( is_year() ) :
                        echo esc_html( get_the_date('Y') );

                    else :
                        esc_html_e( 'Archives', 'softino' );

2 .

<?php echo esc_url( wp_get_attachment_url(get_post_thumbnail_id()) );?>

3 .

add_filter(‘post_class’,‘softino_extra_class’);
function softino_extra_class( $classes ) {
$classes[ ] = ‘post’;
return $classes;
}

1 Like