function remplacer_termes_buddypress($text) { // Vérifier si le site est en français if (get_locale() === ‘fr_FR’) { // Remplacer ‘Listings’ par ‘Annonces’ $text = str_ireplace(‘Listings’, ‘Annonces’, $text); // Remplacer ‘Reviews’ par ‘Commentaires’ $text = str_ireplace(‘Reviews’, ‘Commentaires’, $text); // Remplacer ‘Favorites’ par…Continue reading
function custom_bp_user_activity_search($search_terms) { // Vérifiez que la recherche n’est pas vide if (empty($search_terms)) { return; } global $wpdb; // Sanitize le terme de recherche $search = implode(‘ ‘, array_map(‘esc_sql’, explode(‘ ‘, $search_terms))); // Recherche l’utilisateur par son nom d’utilisateur ou…Continue reading
add_action(‘bp_before_directory_activity_content’, function() { ?>Continue reading
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