• Resolved asha23

    (@asha23)


    This is terrible, as it causes my doctype to be ignored.

    Please change this so that all the scripts load into the head.

    Thanks

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter asha23

    (@asha23)

    Scripts should not be loaded outside of the head especially not before my doctype declaration.

    It’s a hack.

    Thread Starter asha23

    (@asha23)

    Have searched through the plugin. This looks like an injection as I can’t find references to it anywhere in the plugin itself.

    What is going on with this???

    Thread Starter asha23

    (@asha23)

    Here’s the code

    
    <script type="text/javascript">function heateorSssLoadEvent(e) {var t=window.onload;if (typeof window.onload!="function") {window.onload=e}else{window.onload=function() {t();e()}}};	var heateorSssSharingAjaxUrl = 'https://azanti.local/wp/wp-admin/admin-ajax.php', heateorSssCloseIconPath = 'https://azanti.local/content/plugins/sassy-social-share/public/../images/close.png', heateorSssPluginIconPath = 'https://azanti.local/content/plugins/sassy-social-share/public/../images/logo.png', heateorSssHorizontalSharingCountEnable = 0, heateorSssVerticalSharingCountEnable = 0, heateorSssSharingOffset = -10; var heateorSssMobileStickySharingEnabled = 0;var heateorSssCopyLinkMessage = "Link copied.";var heateorSssUrlCountFetched = [], heateorSssSharesText = 'Shares', heateorSssShareText = 'Share';function heateorSssPopup(e) {window.open(e,"popUpWindow","height=400,width=600,left=400,top=100,resizable,scrollbars,toolbar=0,personalbar=0,menubar=no,location=no,directories=no,status")}</script>			<style type="text/css">
    					.heateor_sss_horizontal_sharing .heateorSssSharing{
    							color: #fff;
    						border-width: 0px;
    			border-style: solid;
    			border-color: transparent;
    		}
    				.heateor_sss_horizontal_sharing .heateorSssTCBackground{
    			color:#666;
    		}
    				.heateor_sss_horizontal_sharing .heateorSssSharing:hover{
    						border-color: transparent;
    		}
    		.heateor_sss_vertical_sharing .heateorSssSharing{
    							color: #fff;
    						border-width: 0px;
    			border-style: solid;
    			border-color: transparent;
    		}
    				.heateor_sss_vertical_sharing .heateorSssTCBackground{
    			color:#666;
    		}
    				.heateor_sss_vertical_sharing .heateorSssSharing:hover{
    						border-color: transparent;
    		}
    		@media screen and (max-width:783px) {.heateor_sss_vertical_sharing{display:none!important}}			</style>
    • This reply was modified 6 years, 7 months ago by asha23.
    Thread Starter asha23

    (@asha23)

    The hack starts on line 146 of class-sassy-social-share-public.php

    Please fix this plugin and enqueue this inline script properly.

    Thread Starter asha23

    (@asha23)

    There is a stylesheet just plonked in there as well

    Plugin Author Heateor Support

    (@heateor)

    Scripts should not be loaded outside of the head especially not before my doctype declaration

    Plugin uses wp_head hook to place the Javascript variables (and the custom CSS you save in the Custom CSS option) in <head> of the webpage. It’s how your theme uses wp_head hook that prints that script and CSS at the webpage. You can confirm this by switching to another theme for a while.

    Thread Starter asha23

    (@asha23)

    The problem is, this puts a script above the <head> of the webpage.

    It will do this, because in the plugin it just echoes out a load of code.

    • This reply was modified 6 years, 7 months ago by asha23.
    Plugin Author Heateor Support

    (@heateor)

    Did you try switching to any default theme of WordPress? If you do, you will find that problem is with your theme.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Why does this put scripts above the declaration?’ is closed to new replies.