function modify_appearance_menu() { if (!current_user_can(‘administrator’)) { // Remove access to themes and customize for all users except administrators remove_submenu_page(‘themes.php’, ‘themes.php’); remove_submenu_page(‘themes.php’, ‘customize.php’); // Block access to /wp-admin/themes.php and /wp-admin/customize.php global $pagenow; $restricted_pages = array(‘themes.php’, ‘customize.php’); if (in_array($pagenow, $restricted_pages)) { wp_redirect(admin_url());…Continue reading
/** * Enqueue script and styles for child theme */ function woodmart_child_enqueue_styles() { wp_enqueue_style( ‘child-style’, get_stylesheet_directory_uri() . ‘/style.css’, array( ‘woodmart-style’ ), woodmart_get_theme_info( ‘Version’ ) ); } add_action( ‘wp_enqueue_scripts’, ‘woodmart_child_enqueue_styles’, 10010 ); define(‘ALLOW_UNFILTERED_UPLOADS’, true); function add_whatsapp_buttonlux() { ?> // Please enter…Continue reading
/** * Conditionally alter the activation limit for the a license key. * * Example: Licenses created prior to 2020 are set to unlimited. * * @param int $limit The current activation limit. * @param int $download_id The download ID…Continue reading
/* Increase WordPress upload size, post size, and max execution time Original doc link: https://wpforms.com/how-to-change-max-file-upload-size-in-wordpress/ For support, please visit: https://www.facebook.com/groups/wpformsvip */ @ini_set( ‘upload_max_size’ , ‘256M’ ); @ini_set( ‘post_max_size’, ‘256M’); @ini_set( ‘max_execution_time’, ‘300’ );Continue reading
/** * @link https://library.wpcode.com/snippet/924z3w1o/ */ /** * Register a new {my-custom-tag} Smart Tag. */ add_filter( ‘simpay_payment_details_template_tags’, function( $tags ) { $tags[] = ‘my-custom-tag’; return $tags; } ); /** * Output a value for the {my-custom-tag} Smart Tag. */ add_filter( ‘simpay_payment_confirmation_template_tag_my-custom-tag’,…Continue reading
/* Include field descriptions inside email notifications Original doc link: https://wpforms.com/developers/how-to-include-field-descriptions-inside-email-notifications/ For support, please visit: https://www.facebook.com/groups/wpformsvip */ function wpf_dev_remove_line_breaks_csv( $export_data, $request_data, $entry ) { array_walk( $export_data, static function( &$row ) { $row = str_replace( “\n”, ‘ ‘, $row ); }…Continue reading
/* Redirect Lost Password to Custom Password Reset Original doc link: https://wpforms.com/how-to-customize-the-wordpress-password-reset-form/ For support, please visit: https://www.facebook.com/groups/wpformsvip */ function my_custom_lostpassword_url() { return home_url( ‘/reset-password/’ ); } add_filter( ‘lostpassword_url’, ‘my_custom_lostpassword_url’ );Continue reading
/** * Customize strings for WPForms form validation * * @link https://wpforms.com/developers/change-validation-messages-for-wpml/ */ function wpforms_dev_frontend_strings( $strings ) { $currentLanguage = defined( ‘ICL_LANGUAGE_CODE’ ) ? ICL_LANGUAGE_CODE : null; switch ( $currentLanguage ) { // For French translation case ‘fr’: // Required…Continue reading
/* Change the completed scheduled tasks storage to 1 week Original doc link: https://wpforms.com/docs/how-to-troubleshoot-action-scheduler-issues-in-wpforms/ For support, please visit: https://www.facebook.com/groups/wpformsvip */ add_filter( ‘wpforms_tasks_admin_hide_as_menu’, ‘__return_false’ );Continue reading
/* Change the completed scheduled tasks storage to 1 week Original doc link: https://wpforms.com/docs/how-to-troubleshoot-action-scheduler-issues-in-wpforms/ For support, please visit: https://www.facebook.com/groups/wpformsvip */ function custom_as_retention_period() { return WEEK_IN_SECONDS; } add_filter( ‘action_scheduler_retention_period’, ‘custom_as_retention_period’ );Continue reading