Escaping data with wp_kses

// ❌ Don’t use html tags in escaping functions like esc_html, esc_attr and their localized equivalents // Expected output: This part of the text is bold and this part underlined. esc_html_e( ‘This part of the text is bold and this…Continue reading

Basic WP escaping functions

// ❌ Don’t use _e(), __(), _x() etc. to output data // ✅ Use the escaped versions instead esc_html_e(), esc_html__(), esc_html_x() etc. // ❌ Don’t echo any HTML attributes without escapingContinue reading

Disable delayed customer recalculations

/** * Bypasses the CRON event that is scheduled 5 minutes after a purchase that recalculates a customers stats. * * Note: This may impact the performance of the checkout process. */ add_filter( ‘edd_recalculate_bypass_cron’, ‘__return_true’ );Continue reading

Allow SVG Files Upload (copy)

/** * Allow SVG uploads for administrator users. * * @param array $upload_mimes Allowed mime types. * * @return mixed */ add_filter( ‘upload_mimes’, function ( $upload_mimes ) { // By default, only administrator users are allowed to add SVGs. //…Continue reading