ajax – WordPress (pagenow link) in ajaxurl change after i change plugin language

Question

i’m working in plugin, and when i change the plugin language the URL of ajax url is change
so how i can fix it? Or what should i use inested?

here is example:

Before Change plugin language:

    <title>Style Settings &lsaquo;</title>
    <script type="text/javascript">
    addLoadEvent = function(func){if(typeof jQuery!=='undefined')jQuery(function(){func();});else if(typeof wpOnload!=='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};
    var ajaxurl="/wp-admin/admin-ajax.php",
        pagenow = 'sobex-tech_page_sobex-tech-style',
        typenow = '',
        adminpage="sobex-tech_page_sobex-tech-style",
        thousandsSeparator=",",
        decimalPoint=",",
        isRtl = 1;
    </script>

after Change:

<title>تنظیمات استایل &lsaquo;</title>
<script type="text/javascript">
addLoadEvent = function(func){if(typeof jQuery!=='undefined')jQuery(function(){func();});else if(typeof wpOnload!=='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};
var ajaxurl="/wp-admin/admin-ajax.php",
    pagenow = '%d8%b3%d8%a7%d8%a8%da%a9%d8%b3-%d8%aa%da%a9_page_sobex-tech-style',
    typenow = '',
    adminpage="-d8-b3-d8-a7-d8-a8-da-a9-d8-b3--d8-aa-da-a9_page_sobex-tech-style",
    thousandsSeparator=",",
    decimalPoint=",",
    isRtl = 1;
</script>

0
fuxia 2 months 2022-06-05T12:05:31-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse