• 06-04-2017, 01:24:19
    #1
    Merhabalar bu konu hakkın da bir çok yazı yazılmış fakat 4. sürümden itibaren wordpress bazı kodların dizimini kabul etmiyor.



    Oluşturma engelleyici JavaScript'i kaldırın

    Kaldırılacak veya optimize edilecek dosyalar ,

    wp-includes/js/jquery/jquery.js?ver=1.12.4
    wp-includes/js/jquery/jquery-migrate.min.js?ver=1.4.1

    Dosya yolu: wp-includes/script-loader.php 186 - 189 satırları arası

    Kod:
    // jQuery
    $scripts->add( 'jquery', false, array( 'jquery-core', 'jquery-migrate' ), '1.12.4' );
    $scripts->add( 'jquery-core', '/wp-includes/js/jquery/jquery.js', array(), '1.12.4' );
    $scripts->add( 'jquery-migrate', "/wp-includes/js/jquery/jquery-migrate$suffix.js", array(), '1.4.1' );


    Çözümü :

    Bunu silip:

    // jQuery
    	$scripts->add( 'jquery', false, array( 'jquery-core', 'jquery-migrate' ), '1.12.4' );
    	$scripts->add( 'jquery-core', '/wp-includes/js/jquery/jquery.js', array(), '1.12.4' );
    	$scripts->add( 'jquery-migrate', "/wp-includes/js/jquery/jquery-migrate$suffix.js", array(), '1.4.1' );
    Bunu ekleyin:
    /Making jQuery Google API
    function modify_jquery() {
    	if (!is_admin()) {
    		// comment out the next two lines to load the local copy of jQuery
    		wp_deregister_script('jquery');
    		wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js', false, '1.8.1');
    		wp_enqueue_script('jquery');
    	}
    }
    add_action('init', 'modify_jquery');
  • 06-04-2017, 03:28:04
    #2
    by_error adlı üyeden alıntı: mesajı görüntüle
    Merhabalar bu konu hakkın da bir çok yazı yazılmış fakat 4. sürümden itibaren wordpress bazı kodların dizimini kabul etmiyor.



    Oluşturma engelleyici JavaScript'i kaldırın

    Kaldırılacak veya optimize edilecek dosyalar ,

    wp-includes/js/jquery/jquery.js?ver=1.12.4
    wp-includes/js/jquery/jquery-migrate.min.js?ver=1.4.1

    Dosya yolu: wp-includes/script-loader.php 186 - 189 satırları arası

    Kod:
    // jQuery
    $scripts->add( 'jquery', false, array( 'jquery-core', 'jquery-migrate' ), '1.12.4' );
    $scripts->add( 'jquery-core', '/wp-includes/js/jquery/jquery.js', array(), '1.12.4' );
    $scripts->add( 'jquery-migrate', "/wp-includes/js/jquery/jquery-migrate$suffix.js", array(), '1.4.1' );


    Çözümü :

    Bunu silip:

    // jQuery
    	$scripts->add( 'jquery', false, array( 'jquery-core', 'jquery-migrate' ), '1.12.4' );
    	$scripts->add( 'jquery-core', '/wp-includes/js/jquery/jquery.js', array(), '1.12.4' );
    	$scripts->add( 'jquery-migrate', "/wp-includes/js/jquery/jquery-migrate$suffix.js", array(), '1.4.1' );
    Bunu ekleyin:
    /Making jQuery Google API
    function modify_jquery() {
    	if (!is_admin()) {
    		// comment out the next two lines to load the local copy of jQuery
    		wp_deregister_script('jquery');
    		wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js', false, '1.8.1');
    		wp_enqueue_script('jquery');
    	}
    }
    add_action('init', 'modify_jquery');
    Merhaba uyguladım ancak site kapandı, sanırsam hata var
  • 06-04-2017, 03:30:51
    #3
    Evet ne yazık ki başka çare bulamadım ben benim de düzenleyicim çalışmıyor ama olsun.
  • 20-01-2020, 13:59:21
    #4
    /Making jQuery Google API basına // koyun
    //Making jQuery Google API şeklinde olura acılır