Support » Plugin: WP Socializer » [Plugin: WP Socializer] Bug causing all js files to be included twice

  • In wp-socializer 2.4.4 there is a bug that causes each js file to be be included two times.

    The problem is in function wpsr_footer() at line 1478 of file wp-socializer.php. The closing curly bracket for the function is in the wrong place. It needs to be moved to line 1489 so that it encloses the if statement: if(!$wpsr_settings[‘disablewpsr’]){…}

    I hope this is helpful 🙂

Viewing 1 replies (of 1 total)
  • Plugin Author vaakash


    I think there is no mistake in it. The function is correctly closed.

    1470	function wpsr_footer(){
    1471	        if(wpsr_addtofavorites_bt_used()){
    1472	                wpsr_addtofavorites_script();
    1473	        }
    1475	        if(wpsr_button_used('pinterest') == 1){
    1476	                echo wpsr_pinterest_script();
    1477	        }
    1478	}
    1480	if(!$wpsr_settings['disablewpsr']){
    1481	        if($wpsr_settings['scriptsplace'] == 'header'){
    1482	                add_action('wp_head', 'wpsr_scripts_adder');
    1483	        }else{
    1484	                add_action('wp_footer', 'wpsr_scripts_adder');
    1485	        }
    1487	        add_action('wp_footer', 'wpsr_footer');
    1488	}

    In the lines 1480-1488 a conditional “add_action” is made i.e the plugin is in disabled mode, then don’t print the scripts. That’s all. If it is moved inside the function, then the action will not be called.

    Thank you anyway.

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: WP Socializer] Bug causing all js files to be included twice’ is closed to new replies.