What is the best way to ignore wordpress administration using add_filter($title) also when Ajax request

There are a couple of things here that should always be kept in-mind when you’re thinking of administrators and WordPress is_admin().

  1. is_admin() tells you only whether or not the current WordPress request has been sent to the WP admin backend. This also, actually, include admin-ajax.php requests. It doesn’t tell you whether or not the current logged-in user has administrator priviledges.
  2. A consistent approach to determining whether the current logged-in user has administrator priviledges, is current_user_can( 'manage_options' ). There are scenarios, which are rare, where the result of this could be misleading, but for your purposes, you can ignore that.
  3. You can only test capabilities on a logged-in user if WordPress “knows” that the user is logged-in. For most requests, this is after (and only after) the init action has fired. plugins_loaded is too early.

With all that said, taking your code exactly as you’ve provided and adjusting the hook and the method to determine whether or not you ignore an admin, this is the code you would use:

function atv_convert_multilingual() {
    $ignoreadmin = current_user_can( 'manage_options' );
    if ( !$ignoreadmin ) {
        add_filter( 'the_title', 'atv_translate_title', 10, 2 );
        //other add_filter().
    }
}

add_action( 'init', 'atv_convert_multilingual' );

deneme bonusudeneme bonusu veren sitelerpulibet girişOnwin Güncel Giriştürkçe altyazılı pornocanlı bahis casino