add_action(‘template_redirect’, function() { if (is_page() && strpos($_SERVER[‘REQUEST_URI’], ‘/activity/%5B1’) !== false) { wp_redirect(home_url(‘/activity/’)); exit; } });Continue reading
function custom_redirect_app_pages() { // Vérifiez si l’URL actuelle correspond à ‘app/register-2’ ou ‘app/activate’ $request_uri = $_SERVER[‘REQUEST_URI’]; if (strpos($request_uri, ‘/app/register-2’) !== false || strpos($request_uri, ‘/app/activate’) !== false) { // Rediriger vers la nouvelle URL wp_redirect(‘https://francodeal.com/se-connecter-sur-mon-espace-fd/’); exit(); } } add_action(‘template_redirect’, ‘custom_redirect_app_pages’);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 ) { case ‘fr’: $strings[ ‘val_required’ ] = ‘Ce champ…Continue reading
// Add duplicate button to post/page list of actions. add_filter( ‘post_row_actions’, ‘wpcode_snippet_duplicate_post_link’, 10, 2 ); add_filter( ‘page_row_actions’, ‘wpcode_snippet_duplicate_post_link’, 10, 2 ); // Let’s make sure the function doesn’t already exist. if ( ! function_exists( ‘wpcode_snippet_duplicate_post_link’ ) ) { /** *…Continue reading
/** * Force no-cache via HTTP headers. */ function my_no_cache_headers() { // Use WordPress core helper to set typical no-cache headers: nocache_headers(); // Or you could manually set them if needed: // header( ‘Cache-Control: no-store, no-cache, must-revalidate, max-age=0’ ); //…Continue reading
/* 1.0 Ricrea elenco dei brand del plugin BRAND v1 * 2.0 RICHIAMA IMMAGINE DEL BRAND ELENCATO */ //if(is_user_logged_in() ){ // 1.0 Ricrea elenco dei brand del plugin BRAND // Serve per aggiungere il titolo del brand sotto immagine visibile…Continue reading
add_action(‘wp_ajax_fetch_vg_data’, ‘fetch_vg_data’); add_action(‘wp_ajax_nopriv_fetch_vg_data’, ‘fetch_vg_data’); function fetch_vg_data() { $vg_nummer = sanitize_text_field($_POST[‘test’]); // Update to match the URL parameter global $wpdb; $result = $wpdb->get_row( $wpdb->prepare(“SELECT `email`, `inkontakt_id`, `link_test`, `new_link_test` , `new_link_test_2` FROM vg_nummern WHERE `vg_nummer` = %s”, $vg_nummer) ); if ($result) {…Continue reading