Skip to:
Content
Pages
Categories
Search
Top
Bottom

My plugin is broken BuddyPress users activation function


  • Nik_vr
    Participant

    @nik_vr

    Hello! In my site I use plugin to sanitize posts/pages URL’s. Code of plugin is simple (all no-latin symbols has changed to latin):

    function the_russian_url($title)
    {
     $cyr2lat_table = array(
       "Є"=>"YE","І"=>"I","Ѓ"=>"G","і"=>"i","№"=>"-N-","є"=>"ye","ѓ"=>"g",
       "Ґ"=>"G","Ё"=>"YO","Є"=>"E","Ї"=>"YI","І"=>"I",
       "і"=>"i","ґ"=>"g","ё"=>"yo","є"=>"e",
       "ї"=>"yi","А"=>"A","Б"=>"B","В"=>"V","Г"=>"G",
       "Д"=>"D","Е"=>"E","Ж"=>"ZH","З"=>"Z","И"=>"I",
       "Й"=>"Y","К"=>"K","Л"=>"L","М"=>"M","Н"=>"N",
       "О"=>"O","П"=>"P","Р"=>"R","С"=>"S","Т"=>"T",
       "У"=>"U","Ф"=>"F","Х"=>"H","Ц"=>"TS","Ч"=>"CH",
       "Ш"=>"SH","Щ"=>"SCH","Ъ"=>"","Ы"=>"YI","Ь"=>"",
       "Э"=>"E","Ю"=>"YU","Я"=>"YA","а"=>"a","б"=>"b",
       "в"=>"v","г"=>"g","д"=>"d","е"=>"e","ж"=>"zh",
       "з"=>"z","и"=>"i","й"=>"y","к"=>"k","л"=>"l",
       "м"=>"m","н"=>"n","о"=>"o","п"=>"p","р"=>"r",
       "с"=>"s","т"=>"t","у"=>"u","ф"=>"f","х"=>"h",
       "ц"=>"ts","ч"=>"ch","ш"=>"sh","щ"=>"sch","ъ"=>"",
    	"ы"=>"yi","ь"=>"","э"=>"e","ю"=>"yu","я"=>"ya",
    	" "=>"-","."=>"",'"'=>"-","""=>"-",'"'=>"-",
     );
    	
     global $wpdb;
     
     //оставляем только латиницу, цифры и тире
     //Дополнение — очищает слаги от вхождения ненужных в URL символов.
     //echo '<!--URL: '.$title.' -->';
     //if ($title!='')
     return str_replace("--","-",preg_replace("~[^A-Za-z0-9-]~","-",strtr($title,$cyr2lat_table)));
    }
    add_action('sanitize_title', 'the_russian_url');

    If I use this (very old) plugin in site with installed BuddyPress, in BuddyPress has not work new users activation function. If user click to link in activation email, or manual type activation code on activation page, it get message (Wrong activation code).

    If i disable my plugin, activation work good.

    Please, help my change my plugin. I need for both plug-in should work simultaneously.

    PS. Sorry for my bad English 🙂

  • You must be logged in to reply to this topic.
Skip to toolbar