/** * Register the Smart Tag so it will be available to select in the form builder. * * @link https://wpforms.com/developers/how-to-create-a-custom-smart-tag/ */ function wpf_dev_register_smarttag_grad_year( $tags ) { // Key is the tag, item is the tag name. $tags[ ‘grad_year’ ]…Continue reading
/** * Register the Smart Tag so it will be available to select in the form builder. * * @link https://wpforms.com/developers/how-to-create-a-custom-smart-tag/ */ function wpf_dev_register_smarttag_user_login( $tags ) { // Key is the tag, item is the tag name. $tags[ ‘user_login’ ]…Continue reading
/** * Register the Smart Tag so it will be available to select in the form builder. * * @link https://wpforms.com/developers/how-to-create-a-custom-smart-tag/ */ function wpf_dev_register_smarttag_birth_date( $tags ) { // Key is the tag, item is the tag name. $tags[ ‘birth_date’ ]…Continue reading
// This code is part of the template, $tplData[‘hasShellZip’] is provided through TplMng $hasShellZip = $tplData[‘hasShellZip’]; if ($hasShellZip) { esc_html_e(‘The “Shell Zip” mode allows…’, ‘duplicator-pro’); ?>Continue reading
// ❌ The output of this function is not readable public function displayHtml() { //some logic here echo ‘ ‘; echo ‘‘; echo ‘‘; echo __(‘Some text’, ‘duplicator-pro’); echo ‘ ‘; } // ❌ This function needs to escape large…Continue reading
// ❌ 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
add_filter(‘the_generator’, ‘__return_empty_string’);Continue reading
// Don’t log license activations and deactivations. add_filter( ‘edd_sl_log_license_activation’, ‘__return_false’ ); add_filter( ‘edd_sl_log_license_deactivation’, ‘__return_false’ );Continue reading
/** * 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 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