New answers tagged

0

Woah there. You've just opened up a can of SQL injection. I use the default get_query_var('s') that I believe is automatically escaped by wordpress. Not quite - get_search_query() will do that, but get_query_var( 's' ) gets the "raw" value. Regardless, always use wpdb::prepare or similar escaping before executing SQL: $query = $wpdb->prepare( "...


1

WordPress do not have an enforceable coding standards. There are core coding standards, there are wordpress.com VIP coding standards etc. None of them come directly from god and since they are based on the idea that you are developing for PHP 5.2 they might not even be the best thing to follow if you don't have an explicit requirement to follow them. Use ...


0

Consider something like the following: echo esc_html( sprintf( _nx( '%1$s Comment on “%2$s”', '%1$s Comments on “%2$s”', $comment_count, 'Comments Title', 'theme-text-domain' ), number_format_i18n( $...



Top 50 recent answers are included