first commit

This commit is contained in:
User A0264400
2026-04-01 23:20:16 +03:00
commit a766acdc90
23071 changed files with 4933189 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
/**
* Admin Styles for Header and Footer Scripts
*/
/* Fix CodeMirror container in meta box */
.jamify_hfs_meta_control .CodeMirror {
border: 1px solid #ccc;
height: auto;
min-height: 300px;
background: #fff;
}
.jamify_hfs_meta_control .CodeMirror-scroll {
min-height: 300px;
}
/* Fix gutter visibility */
.jamify_hfs_meta_control .CodeMirror-gutters {
left: 0 !important;
background-color: #f7f7f7;
border-right: 1px solid #ddd;
}
/* Ensure proper width matching generic WP inputs */
.jamify_hfs_meta_control {
margin-top: 10px;
}

View File

@@ -0,0 +1,22 @@
<?php
/**
* Plugin meta for single post or page type.
*
* @package Header and Footer Scripts
* @author Anand Kumar <anand@anandkumar.net>
* @copyright Copyright (c) 2013 - 2026, Anand Kumar
* @link https://github.com/anandkumar/header-and-footer-scripts
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}?>
<div class="jamify_hfs_meta_control">
<p><?php esc_html_e('The code below will be inserted into the &lt;head&gt; section of this specific page/post.', 'header-and-footer-scripts'); ?></p>
<p>
<textarea id="jamify_hfs_inpost_head_script" name="_inpost_head_script[synth_header_script]" rows="5" style="width:98%;font-family:monospace;"><?php if(!empty($meta['synth_header_script'])) echo esc_textarea( $meta['synth_header_script'] ); ?></textarea>
</p>
</div>

View File

@@ -0,0 +1,92 @@
<?php
/**
* Plugin Options page
*
* @package Header and Footer Scripts
* @author Anand Kumar <anand@anandkumar.net>
* @copyright Copyright (c) 2013 - 2026, Anand Kumar
* @link https://github.com/anandkumar/header-and-footer-scripts
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}?>
<div class="wrap">
<h2><?php esc_html_e( 'Header and Footer Scripts - Options', 'header-and-footer-scripts'); ?> <a class="add-new-h2" target="_blank" href="<?php echo esc_url( "https://github.com/anandkumar/header-and-footer-scripts/wiki" ); ?>"><?php esc_html_e( 'Read Tutorial', 'header-and-footer-scripts'); ?></a></h2>
<hr />
<div id="poststuff">
<div id="post-body" class="metabox-holder columns-2">
<div id="post-body-content">
<div class="postbox">
<div class="inside">
<form name="dofollow" action="options.php" method="post">
<?php settings_fields( 'header-and-footer-scripts' ); ?>
<h3 class="shfs-labels"><?php esc_html_e( 'Permissions', 'header-and-footer-scripts'); ?></h3>
<p><?php esc_html_e( 'By default, only Administrators can add scripts. Use the options below to grant access to other roles.', 'header-and-footer-scripts'); ?></p>
<fieldset>
<label for="jamify_hfs_allow_author">
<input type="checkbox" name="jamify_hfs_allow_author" id="jamify_hfs_allow_author" value="yes" <?php checked( 'yes', get_option( 'jamify_hfs_allow_author' ) ); ?>>
<?php esc_html_e( 'Allow Authors to add scripts', 'header-and-footer-scripts'); ?>
</label>
<br>
<label for="jamify_hfs_allow_contributor">
<input type="checkbox" name="jamify_hfs_allow_contributor" id="jamify_hfs_allow_contributor" value="yes" <?php checked( 'yes', get_option( 'jamify_hfs_allow_contributor' ) ); ?>>
<?php esc_html_e( 'Allow Contributors to add scripts', 'header-and-footer-scripts'); ?>
</label>
</fieldset>
<p class="description" style="color: #ea580c; font-weight: bold;">
<?php esc_html_e( 'Security Warning: Enabling these options grants the "unfiltered_html" capability. This allows users to execute arbitrary JavaScript. Only enable this for trusted users.', 'header-and-footer-scripts'); ?>
</p>
<hr />
<h3 class="shfs-labels" for="jamify_hfs_insert_header"><?php esc_html_e( 'Head Scripts (&lt;head&gt;)', 'header-and-footer-scripts'); ?></h3>
<p><?php esc_html_e( 'Scripts entered here will be output in the &lt;head&gt; section.', 'header-and-footer-scripts'); ?></p>
<textarea style="width:98%;font-family:monospace;" rows="10" cols="57" id="jamify_hfs_insert_header" name="jamify_hfs_insert_header"><?php echo esc_html( get_option( 'jamify_hfs_insert_header' ) ); ?></textarea>
<p><label for="jamify_hfs_insert_header_priority"><?php esc_html_e('Priority', 'header-and-footer-scripts'); ?></label>
<input type="number" value="<?php echo \esc_html( \get_option( 'jamify_hfs_insert_header_priority', 10 ) ); ?>" name="jamify_hfs_insert_header_priority" id="jamify_hfs_insert_header_priority" style="width:6em;" /> <?php \esc_html_e('Default', 'header-and-footer-scripts'); ?>: 10</p><hr />
<h3 class="shfs-labels" for="jamify_hfs_insert_body"><?php esc_html_e( 'Body Scripts (After &lt;body&gt;)', 'header-and-footer-scripts'); ?></h3>
<p><?php esc_html_e( 'Scripts entered here will be output immediately after the opening &lt;body&gt; tag.', 'header-and-footer-scripts'); ?></p>
<textarea style="width:98%;font-family:monospace;" rows="10" cols="57" id="jamify_hfs_insert_body" name="jamify_hfs_insert_body"><?php echo esc_html( get_option( 'jamify_hfs_insert_body' ) ); ?></textarea>
<p><label for="jamify_hfs_insert_body_priority"><?php esc_html_e('Priority', 'header-and-footer-scripts'); ?></label>
<input type="number" value="<?php echo \esc_html( \get_option( 'jamify_hfs_insert_body_priority', 10 ) ); ?>" name="jamify_hfs_insert_body_priority" id="jamify_hfs_insert_body_priority" style="width:6em;" /> <?php \esc_html_e('Default', 'header-and-footer-scripts'); ?>: 10</p><hr />
<h3 class="shfs-labels footerlabel" for="jamify_hfs_insert_footer"><?php esc_html_e( 'Footer Scripts (Before &lt;/body&gt;)', 'header-and-footer-scripts'); ?></h3>
<p><?php esc_html_e( 'Scripts entered here will be output immediately before the closing &lt;/body&gt; tag.', 'header-and-footer-scripts'); ?></p>
<textarea style="width:98%;font-family:monospace;" rows="10" cols="57" id="jamify_hfs_insert_footer" name="jamify_hfs_insert_footer"><?php echo esc_html( get_option( 'jamify_hfs_insert_footer' ) ); ?></textarea>
<p><label for="jamify_hfs_insert_footer_priority"><?php esc_html_e('Priority', 'header-and-footer-scripts'); ?></label>
<input type="number" value="<?php echo \esc_html( \get_option( 'jamify_hfs_insert_footer_priority', 10 ) ); ?>" name="jamify_hfs_insert_footer_priority" id="jamify_hfs_insert_footer_priority" style="width:6em;" /> <?php \esc_html_e('Default', 'header-and-footer-scripts'); ?>: 10</p><hr />
<h3 class="shfs-labels"><?php esc_html_e( 'Uninstall Code Cleanup', 'header-and-footer-scripts'); ?></h3>
<fieldset>
<label for="jamify_hfs_clean_on_uninstall">
<input type="checkbox" name="jamify_hfs_clean_on_uninstall" id="jamify_hfs_clean_on_uninstall" value="yes" <?php checked( 'yes', get_option( 'jamify_hfs_clean_on_uninstall' ) ); ?>>
<?php esc_html_e( 'Delete all data on uninstall', 'header-and-footer-scripts'); ?>
</label>
</fieldset>
<p class="description" style="color: #ea580c; font-weight: bold;">
<?php esc_html_e( 'Warning: If checked, all saved scripts and settings will be permanently erased when you delete the plugin. This action cannot be undone.', 'header-and-footer-scripts'); ?>
</p>
<p class="submit">
<input class="button button-primary" type="submit" name="Submit" value="<?php esc_html_e( 'Save settings', 'header-and-footer-scripts'); ?>" />
</p>
</form>
</div>
</div>
</div>
<?php require_once(JAMIFY_HFS_PLUGIN_DIR . '/inc/sidebar.php'); ?>
</div>
</div>
</div>

View File

@@ -0,0 +1,49 @@
<?php
/**
* Plugin info and self promotion.
*
* @package Header and Footer Scripts
* @author Anand Kumar <anand@anandkumar.net>
* @copyright Copyright (c) 2013 - 2026, Anand Kumar
* @link https://github.com/anandkumar/header-and-footer-scripts
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}?>
<div id="postbox-container-1" class="postbox-container">
<div class="postbox">
<h3 class="hndle"><?php esc_html_e( 'Need Help?', 'header-and-footer-scripts'); ?></h3>
<div class="inside">
<p><?php esc_html_e( 'Check the documentation for usage instructions, or ask a question if you need help.', 'header-and-footer-scripts'); ?></p>
<p><strong><a href="<?php echo esc_url( "https://github.com/anandkumar/header-and-footer-scripts/wiki" ); ?>" class="button"><?php esc_html_e('Explore Docs and Support', 'header-and-footer-scripts'); ?></a></strong></p>
</div>
</div>
<div class="postbox">
<h3 class="hndle"><?php esc_html_e( 'Contribute!', 'header-and-footer-scripts'); ?></h3>
<div class="inside">
<p><?php esc_html_e( 'Help us to make this plugin even better. Please follow the link to know more and contribute.', 'header-and-footer-scripts'); ?></p>
<p><a href="<?php echo esc_url( "https://github.com/anandkumar/header-and-footer-scripts" ); ?>" class="button"><?php esc_html_e( 'Contribute', 'header-and-footer-scripts'); ?></a></p>
</div>
</div>
<div class="postbox">
<h3 class="hndle"><?php esc_html_e( 'Rate 5 Stars', 'header-and-footer-scripts'); ?></h3>
<div class="inside">
<p><?php esc_html_e( 'Find this plugin useful rate it 5 stars and leave a nice little comment at wordpress.org. I would really appreciate that.', 'header-and-footer-scripts'); ?></p>
<p><a href="<?php echo esc_url( "https://wordpress.org/support/plugin/header-and-footer-scripts/reviews/" ); ?>" class="button"><?php esc_html_e( 'Rate 5 Stars', 'header-and-footer-scripts'); ?></a></p>
</div>
</div>
<div class="postbox">
<h3 class="hndle"><?php esc_html_e( 'Join Our Community', 'header-and-footer-scripts'); ?></h3>
<div class="inside">
<p><?php esc_html_e( 'Join the discussions and share your ideas.', 'header-and-footer-scripts'); ?></p>
<p><a href="<?php echo esc_url( "https://github.com/anandkumar/header-and-footer-scripts/discussions" ); ?>" class="button"><?php esc_html_e( 'Join Discussions', 'header-and-footer-scripts'); ?></a></p>
</div>
</div>
</div>

View File

@@ -0,0 +1,155 @@
msgid ""
msgstr ""
"Project-Id-Version: Header and Footer Scripts 2.4.2\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/header-and-footer-scripts\n"
"POT-Creation-Date: 2026-02-01 12:05:00+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
#: shfs.php:106
msgid "Insert Script to &lt;head&gt;"
msgstr ""
#: shfs.php:117
msgid "Header and Footer Scripts"
msgstr ""
#: shfs.php:231
msgid "Header and Footer Scripts permission system has been updated. Please check the "
msgstr ""
#: shfs.php:232
msgid "Settings"
msgstr ""
#: shfs.php:233
msgid "to configure Author/Contributor access if needed."
msgstr ""
#: inc/sidebar.php:18
msgid "Need Help?"
msgstr ""
#: inc/sidebar.php:20
msgid "Check the documentation for usage instructions, or ask a question if you need help."
msgstr ""
#: inc/sidebar.php:21
msgid "Explore Docs and Support"
msgstr ""
#: inc/sidebar.php:26
msgid "Contribute!"
msgstr ""
#: inc/sidebar.php:28
msgid "Help us to make this plugin even better. Please follow the link to know more and contribute."
msgstr ""
#: inc/sidebar.php:29
msgid "Contribute"
msgstr ""
#: inc/sidebar.php:34 inc/sidebar.php:37
msgid "Rate 5 Stars"
msgstr ""
#: inc/sidebar.php:36
msgid "Find this plugin useful rate it 5 stars and leave a nice little comment at wordpress.org. I would really appreciate that."
msgstr ""
#: inc/sidebar.php:42
msgid "Join Our Community"
msgstr ""
#: inc/sidebar.php:44
msgid "Join the discussions and share your ideas."
msgstr ""
#: inc/sidebar.php:45
msgid "Join Discussions"
msgstr ""
#: inc/options.php:16
msgid "Header and Footer Scripts - Options"
msgstr ""
#: inc/options.php:16
msgid "Read Tutorial"
msgstr ""
#: inc/options.php:28
msgid "Permissions"
msgstr ""
#: inc/options.php:29
msgid "By default, only Administrators can add scripts. Use the options below to grant access to other roles."
msgstr ""
#: inc/options.php:34
msgid "Allow Authors to add scripts"
msgstr ""
#: inc/options.php:39
msgid "Allow Contributors to add scripts"
msgstr ""
#: inc/options.php:44
msgid "Security Warning: Enabling these options grants the \"unfiltered_html\" capability. This allows users to execute arbitrary JavaScript. Only enable this for trusted users."
msgstr ""
#: inc/options.php:48
msgid "Head Scripts (&lt;head&gt;)"
msgstr ""
#: inc/options.php:49
msgid "Scripts entered here will be output in the &lt;head&gt; section."
msgstr ""
#: inc/options.php:52 inc/options.php:59 inc/options.php:66
msgid "Priority"
msgstr ""
#: inc/options.php:53 inc/options.php:60 inc/options.php:67
msgid "Default"
msgstr ""
#: inc/options.php:55
msgid "Body Scripts (After &lt;body&gt;)"
msgstr ""
#: inc/options.php:56
msgid "Scripts entered here will be output immediately after the opening &lt;body&gt; tag."
msgstr ""
#: inc/options.php:62
msgid "Footer Scripts (Before &lt;/body&gt;)"
msgstr ""
#: inc/options.php:63
msgid "Scripts entered here will be output immediately before the closing &lt;/body&gt; tag."
msgstr ""
#: inc/options.php:69
msgid "Uninstall Code Cleanup"
msgstr ""
#: inc/options.php:73
msgid "Delete all data on uninstall"
msgstr ""
#: inc/options.php:77
msgid "Warning: If checked, all saved scripts and settings will be permanently erased when you delete the plugin. This action cannot be undone."
msgstr ""
#: inc/options.php:81
msgid "Save settings"
msgstr ""
#: inc/meta.php:18
msgid "The code below will be inserted into the &lt;head&gt; section of this specific page/post."
msgstr ""

View File

@@ -0,0 +1,157 @@
msgid ""
msgstr ""
"Project-Id-Version: Header and Footer Scripts 2.4.2\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/header-and-footer-scripts\n"
"POT-Creation-Date: 2026-02-01 12:05:00+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"PO-Revision-Date: 2026-02-01 12:10:00+00:00\n"
"Last-Translator: Anand Kumar <anand@anandkumar.net>\n"
"Language-Team: Hindi <hi_IN@li.org>\n"
"Language: hi_IN\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: shfs.php:106
msgid "Insert Script to &lt;head&gt;"
msgstr "&lt;head&gt; में स्क्रिप्ट डालें"
#: shfs.php:117
msgid "Header and Footer Scripts"
msgstr "हेडर और फुटर स्क्रिप्ट्स"
#: shfs.php:231
msgid "Header and Footer Scripts permission system has been updated. Please check the "
msgstr "हेडर और फुटर स्क्रिप्ट्स अनुमति प्रणाली अपडेट कर दी गई है। कृपया जांचें "
#: shfs.php:232
msgid "Settings"
msgstr "सेटिंग्स"
#: shfs.php:233
msgid "to configure Author/Contributor access if needed."
msgstr "यदि आवश्यक हो तो लेखक/योगदानकर्ता पहुंच को कॉन्फ़िगर करने के लिए।"
#: inc/sidebar.php:18
msgid "Need Help?"
msgstr "मदद चाहिए?"
#: inc/sidebar.php:20
msgid "Check the documentation for usage instructions, or ask a question if you need help."
msgstr "उपयोग निर्देशों के लिए दस्तावेज़ देखें, या यदि आपको सहायता की आवश्यकता है तो प्रश्न पूछें।"
#: inc/sidebar.php:21
msgid "Explore Docs and Support"
msgstr "दस्तावेज़ और सहायता देखें"
#: inc/sidebar.php:26
msgid "Contribute!"
msgstr "योगदान करें!"
#: inc/sidebar.php:28
msgid "Help us to make this plugin even better. Please follow the link to know more and contribute."
msgstr "इस प्लगइन को और बेहतर बनाने में हमारी मदद करें। अधिक जानने और योगदान करने के लिए कृपया लिंक का अनुसरण करें।"
#: inc/sidebar.php:29
msgid "Contribute"
msgstr "योगदान करें"
#: inc/sidebar.php:34 inc/sidebar.php:37
msgid "Rate 5 Stars"
msgstr "5 स्टार रेट करें"
#: inc/sidebar.php:36
msgid "Find this plugin useful rate it 5 stars and leave a nice little comment at wordpress.org. I would really appreciate that."
msgstr "यदि आपको यह प्लगइन उपयोगी लगता है तो इसे 5 स्टार रेट करें और wordpress.org पर एक अच्छी टिप्पणी छोड़ें। मैं वास्तव में इसकी सराहना करूंगा।"
#: inc/sidebar.php:42
msgid "Join Our Community"
msgstr "हमारे समुदाय में शामिल हों"
#: inc/sidebar.php:44
msgid "Join the discussions and share your ideas."
msgstr "चर्चा में शामिल हों और अपने विचार साझा करें।"
#: inc/sidebar.php:45
msgid "Join Discussions"
msgstr "चर्चा में शामिल हों"
#: inc/options.php:16
msgid "Header and Footer Scripts - Options"
msgstr "हेडर और फुटर स्क्रिप्ट्स - विकल्प"
#: inc/options.php:16
msgid "Read Tutorial"
msgstr "ट्यूटोरियल पढ़ें"
#: inc/options.php:28
msgid "Permissions"
msgstr "अनुमतियाँ"
#: inc/options.php:29
msgid "By default, only Administrators can add scripts. Use the options below to grant access to other roles."
msgstr "तयशुदा तौर पर, केवल प्रशासक ही स्क्रिप्ट जोड़ सकते हैं। अन्य भूमिकाओं को पहुंच प्रदान करने के लिए नीचे दिए गए विकल्पों का उपयोग करें।"
#: inc/options.php:34
msgid "Allow Authors to add scripts"
msgstr "लेखकों को स्क्रिप्ट जोड़ने की अनुमति दें"
#: inc/options.php:39
msgid "Allow Contributors to add scripts"
msgstr "योगदानकर्ताओं को स्क्रिप्ट जोड़ने की अनुमति दें"
#: inc/options.php:44
msgid "Security Warning: Enabling these options grants the \"unfiltered_html\" capability. This allows users to execute arbitrary JavaScript. Only enable this for trusted users."
msgstr "सुरक्षा चेतावनी: इन विकल्पों को सक्षम करने से \"unfiltered_html\" क्षमता मिलती है। यह उपयोगकर्ताओं को मनमानी जावास्क्रिप्ट निष्पादित करने की अनुमति देता है। इसे केवल विश्वसनीय उपयोगकर्ताओं के लिए सक्षम करें।"
#: inc/options.php:48
msgid "Head Scripts (&lt;head&gt;)"
msgstr "हेड स्क्रिप्ट्स (&lt;head&gt;)"
#: inc/options.php:49
msgid "Scripts entered here will be output in the &lt;head&gt; section."
msgstr "यहाँ दर्ज की गई स्क्रिप्ट &lt;head&gt; अनुभाग में आउटपुट होंगी।"
#: inc/options.php:52 inc/options.php:59 inc/options.php:66
msgid "Priority"
msgstr "प्राथमिकता"
#: inc/options.php:53 inc/options.php:60 inc/options.php:67
msgid "Default"
msgstr "डिफ़ॉल्ट"
#: inc/options.php:55
msgid "Body Scripts (After &lt;body&gt;)"
msgstr "बॉडी स्क्रिप्ट्स (&lt;body&gt; के बाद)"
#: inc/options.php:56
msgid "Scripts entered here will be output immediately after the opening &lt;body&gt; tag."
msgstr "यहाँ दर्ज की गई स्क्रिप्ट &lt;body&gt; टैग खुलने के तुरंत बाद आउटपुट होंगी।"
#: inc/options.php:62
msgid "Footer Scripts (Before &lt;/body&gt;)"
msgstr "फुटर स्क्रिप्ट्स (&lt;/body&gt; से पहले)"
#: inc/options.php:63
msgid "Scripts entered here will be output immediately before the closing &lt;/body&gt; tag."
msgstr "यहाँ दर्ज की गई स्क्रिप्ट &lt;/body&gt; टैग बंद होने से ठीक पहले आउटपुट होंगी।"
#: inc/options.php:69
msgid "Uninstall Code Cleanup"
msgstr "अनइंस्टॉल कोड सफाई"
#: inc/options.php:73
msgid "Delete all data on uninstall"
msgstr "अनइंस्टॉल पर सारा डेटा हटा दें"
#: inc/options.php:77
msgid "Warning: If checked, all saved scripts and settings will be permanently erased when you delete the plugin. This action cannot be undone."
msgstr "चेतावनी: यदि चेक किया गया है, तो प्लगइन हटाने पर सभी सहेजी गई स्क्रिप्ट और सेटिंग्स स्थायी रूप से मिटा दी जाएंगी। यह कार्रवाई पूर्ववत नहीं की जा सकती।"
#: inc/options.php:81
msgid "Save settings"
msgstr "सेटिंग्स सहेजें"
#: inc/meta.php:18
msgid "The code below will be inserted into the &lt;head&gt; section of this specific page/post."
msgstr "नीचे दिया गया कोड इस विशिष्ट पृष्ठ/पोस्ट के &lt;head&gt; अनुभाग में डाला जाएगा।"

View File

@@ -0,0 +1,155 @@
msgid ""
msgstr ""
"Project-Id-Version: Header and Footer Scripts 2.4.2\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/header-and-footer-scripts\n"
"POT-Creation-Date: 2026-02-01 12:05:00+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
#: shfs.php:106
msgid "Insert Script to &lt;head&gt;"
msgstr ""
#: shfs.php:117
msgid "Header and Footer Scripts"
msgstr ""
#: shfs.php:231
msgid "Header and Footer Scripts permission system has been updated. Please check the "
msgstr ""
#: shfs.php:232
msgid "Settings"
msgstr ""
#: shfs.php:233
msgid "to configure Author/Contributor access if needed."
msgstr ""
#: inc/sidebar.php:18
msgid "Need Help?"
msgstr ""
#: inc/sidebar.php:20
msgid "Check the documentation for usage instructions, or ask a question if you need help."
msgstr ""
#: inc/sidebar.php:21
msgid "Explore Docs and Support"
msgstr ""
#: inc/sidebar.php:26
msgid "Contribute!"
msgstr ""
#: inc/sidebar.php:28
msgid "Help us to make this plugin even better. Please follow the link to know more and contribute."
msgstr ""
#: inc/sidebar.php:29
msgid "Contribute"
msgstr ""
#: inc/sidebar.php:34 inc/sidebar.php:37
msgid "Rate 5 Stars"
msgstr ""
#: inc/sidebar.php:36
msgid "Find this plugin useful rate it 5 stars and leave a nice little comment at wordpress.org. I would really appreciate that."
msgstr ""
#: inc/sidebar.php:42
msgid "Join Our Community"
msgstr ""
#: inc/sidebar.php:44
msgid "Join the discussions and share your ideas."
msgstr ""
#: inc/sidebar.php:45
msgid "Join Discussions"
msgstr ""
#: inc/options.php:16
msgid "Header and Footer Scripts - Options"
msgstr ""
#: inc/options.php:16
msgid "Read Tutorial"
msgstr ""
#: inc/options.php:28
msgid "Permissions"
msgstr ""
#: inc/options.php:29
msgid "By default, only Administrators can add scripts. Use the options below to grant access to other roles."
msgstr ""
#: inc/options.php:34
msgid "Allow Authors to add scripts"
msgstr ""
#: inc/options.php:39
msgid "Allow Contributors to add scripts"
msgstr ""
#: inc/options.php:44
msgid "Security Warning: Enabling these options grants the \"unfiltered_html\" capability. This allows users to execute arbitrary JavaScript. Only enable this for trusted users."
msgstr ""
#: inc/options.php:48
msgid "Head Scripts (&lt;head&gt;)"
msgstr ""
#: inc/options.php:49
msgid "Scripts entered here will be output in the &lt;head&gt; section."
msgstr ""
#: inc/options.php:52 inc/options.php:59 inc/options.php:66
msgid "Priority"
msgstr ""
#: inc/options.php:53 inc/options.php:60 inc/options.php:67
msgid "Default"
msgstr ""
#: inc/options.php:55
msgid "Body Scripts (After &lt;body&gt;)"
msgstr ""
#: inc/options.php:56
msgid "Scripts entered here will be output immediately after the opening &lt;body&gt; tag."
msgstr ""
#: inc/options.php:62
msgid "Footer Scripts (Before &lt;/body&gt;)"
msgstr ""
#: inc/options.php:63
msgid "Scripts entered here will be output immediately before the closing &lt;/body&gt; tag."
msgstr ""
#: inc/options.php:69
msgid "Uninstall Code Cleanup"
msgstr ""
#: inc/options.php:73
msgid "Delete all data on uninstall"
msgstr ""
#: inc/options.php:77
msgid "Warning: If checked, all saved scripts and settings will be permanently erased when you delete the plugin. This action cannot be undone."
msgstr ""
#: inc/options.php:81
msgid "Save settings"
msgstr ""
#: inc/meta.php:18
msgid "The code below will be inserted into the &lt;head&gt; section of this specific page/post."
msgstr ""

View File

@@ -0,0 +1,166 @@
=== Header and Footer Scripts ===
Contributors: anand_kumar, jamify
Donate link: https://github.com/anandkumar/header-and-footer-scripts
Tags: head, header, footer, scripts, post
Requires at least: 4.6
Tested up to: 6.9
Stable tag: 2.4.2
Requires PHP: 5.6
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Header and Footer Scripts plugin allows you to add scripts to WordPress site's <head> and just before closing <body> tag.
== Description ==
An essential WordPress plugin to easily insert scripts and styles (like Google Analytics, CSS, etc.) into your website's header and footer.
Looking for a way to add Google Analytics, Facebook Pixel, or custom tracking code to your website's header or footer?
Header and Footer Scripts is a simple yet powerful plugin that lets you inject code—such as Google Analytics, custom CSS, Facebook Pixel, and chat widgets—directly into your site's header (`<head>`) or footer.
No bloat, no ads. This lightweight plugin simply does what it says: inserts code into your header and footer efficiently.
All you have to do is add the appropriate HTML code.
Don't forget to wrap your code with proper tags.
<script type="text/javascript">
YOUR JS CODE HERE
</script>
Or for CSS:
<style type="text/css">
YOUR CSS CODE HERE
</style>
= Why use this plugin: =
* Insert scripts globally into the header and footer of your entire website.
* Supports all script types including HTML, JavaScript, and CSS.
* Add specific scripts to the header of individual posts or pages.
* To insert code to Custom Post Type [New Feature].
The plugin should be compatible with WooCommerce.
= What it does not offer =
* You can't insert/execute PHP codes.
Almost all WordPress themes support this "Header and Footer Scripts" plugin. If the codes are not appearing in your site [ask for support] or look at your theme file if they have standard `wp_head` and `wp_footer` hooks.
= Important Links =
For further information you are welcomed to follow these links:
* **[Read Documentation][1]**
* **[Get Support][2]**
* **[GitHub Repository][3]**
[1]: https://github.com/anandkumar/header-and-footer-scripts/wiki
[2]: https://wordpress.org/support/plugin/header-and-footer-scripts/
[3]: https://github.com/anandkumar/header-and-footer-scripts
== Installation ==
There is nothing special about installation of this plugin. It is as simple as uploading the plugin files to your plugins directory.
Upload the plugin to `/wp-content/plugins` and activate. OR Search "Header and Footer Scripts" from `WP Dashbard --> Plugins --> Add New` then hit Install and then activate.
Once the plugin is activated you will see "Header and Footer Scripts" menu item under settings of WordPress dashboard. Also a meta box on Post and Page edit page.
== Screenshots ==
1. Access this page from `Dashboard --> Settings --> Header and Footer Scripts`
2. This box will appear below the compose box on posts and pages. If not please refer to [our docs][4] if it's not there.
== Frequently Asked Questions ==
**Q. How could I access support and troubleshoot problem?**
A. I couldn't handle wp.org forums on regular basis. You are suggested to visit [GitHub Wiki](https://github.com/anandkumar/header-and-footer-scripts/wiki) for more updated plugin documentation and troubleshoot your problem.
**Q: Is there any paid version of the plugin available?**
A. Nope, There is none. If you need more feature send us feedback or feature request.
== Changelog ==
= 2.4.2 =
* Fix: Resolved critical issue where scripts added to per-post meta box were not saving.
* Fix: Corrected CodeMirror editor rendering (borders, height) and gutter visibility (line numbers) in meta box.
* Improvement: Updated English copy throughout the plugin for better clarity and professionalism.
* New: Added Hindi (hi_IN) translation.
* New: Included language template (.pot) and translation files.
= 2.4.1 =
* New Feature: Added "Clean on Uninstall" option to allow users to remove all data upon deletion.
* Fix: Resolved issue where sidebar was not loading on settings page due to deprecated constant.
* Improvement: Enhanced WPCS compliance with comprehensive DocBlocks and formatting fixes.
* Improvement: Added strict sanitization to settings authentication to resolve Plugin Check warnings.
= 2.4.0 =
* Internal: Refactored codebase to "Jamify HFS" naming standards (`jamify_hfs_` prefix) while maintaining full backward compatibility.
* New Feature: Added support for wp_body_open hook to insert scripts immediately after body tag.
* New Feature: Added Syntax Highlighting for script editors in settings page.
* Improvement: Modernized permission system to use 'unfiltered_html' capability.
* Improvement: Added settings to allow Authors and Contributors to add scripts.
* Improvement: Added admin notice for backward compatibility migration.
= 2.3.1 =
* Security: Hardened nonce implementation with static action names.
* Security: Added strict sanitization for access level settings.
* Security: Improved input validation with isset() checks and wp_unslash().
* Security: Replaced __FILE__ menu slug to prevent path exposure.
* Security: Added security warning for privilege delegation.
* New: Added uninstall.php for clean database removal.
* Fix: Added proper ABSPATH checks to all files.
* Improvement: Added phpcs:ignore comments for intentional raw output.
= 2.3.0 =
* Fix: Stored Cross-Site Scripting (XSS) vulnerability.
* New Feature: Add minimum capability required to add scripts to posts.
= 2.2.1 =
* Updated readme.txt.
= 2.2.0 =
* New feature: Now set priority to sitewide script.
* Fix: Monoscript font for text area.
* Improved readme.txt.
* Reverted to PHP v5.6 as many people can't move to latest one.
= 2.1.1 =
* Fixed a bug causing singular post type scripts to appear in archives.
* Compatibility checked upto WordPress 5.2.2
* Now require PHP v7.0 at least.
= 2.1.0 =
* Support to Custom Post Type (CPT).
* Improved ReadMe
= 2.0.1 =
* Uniform Coding style.
* Improved Translatable strings.
* Fixed Links
* Code Cleanup
= 2.0.0 =
* Visual Improvements.
* better directory structure.
= 1.3.4 =
* Fixed variable undefined notice
= 1.3.3 =
* Started using PHP5 style construct
= 1.3.2 =
* Fixed https issue
= 1.1.0 =
* Made for official WordPress Repo.
* Added Single post Header script metabox
* Minor Bug Fixes
= 1.0.0 =
* Initial Public Release
== Upgrade Notice ==
Upgrade for more functionality and bug fixes.

View File

@@ -0,0 +1,418 @@
<?php
/**
* Plugin Name: Header and Footer Scripts
* Plugin URI: https://github.com/anandkumar/header-and-footer-scripts
* Description: Essential WordPress plugin for almost every website to insert codes like Javascript and CSS. Inserting script to your wp_head and wp_footer made easy.
* Version: 2.4.2
* Author: Anand Kumar
* Author URI: http://www.anandkumar.net
* Text Domain: header-and-footer-scripts
* Domain Path: /lang
* License: GPLv2 or later
*/
/*
Header and Footer Scripts
Copyright (C) 2013 - 2026, Anand Kumar <anand@anandkumar.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
define( 'JAMIFY_HFS_PLUGIN_DIR', str_replace( '\\', '/', dirname( __FILE__ ) ) );
if ( !class_exists( 'HeaderAndFooterScripts' ) ) {
class HeaderAndFooterScripts {
/**
* Constructor.
*/
public function __construct() {
add_action( 'init', array( $this, 'init' ) );
add_action( 'admin_init', array( $this, 'admin_init' ) );
add_action( 'admin_menu', array( $this, 'admin_menu' ) );
add_action( 'admin_notices', array( $this, 'admin_notices' ) );
add_action( 'update_option_jamify_hfs_allow_author', array( $this, 'update_role_author' ), 10, 2 );
add_action( 'update_option_jamify_hfs_allow_contributor', array( $this, 'update_role_contributor' ), 10, 2 );
add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
add_action( 'wp_head', array( $this, 'wp_head' ), \get_option( 'jamify_hfs_insert_header_priority', 10 ) );
add_action( 'wp_body_open', array( $this, 'wp_body_open' ), \get_option( 'jamify_hfs_insert_body_priority', 10 ) );
add_action( 'wp_footer', array( $this, 'wp_footer' ), \get_option( 'jamify_hfs_insert_footer_priority', 10 ) );
}
/**
* Load textdomain for internationalization.
*/
public function init() {
load_plugin_textdomain( 'header-and-footer-scripts', false, dirname( plugin_basename( __FILE__ ) ) . '/lang' );
}
/**
* Initialize admin settings, migration logic, and meta boxes.
*/
public function admin_init() {
// Migration Logic
$options_to_migrate = array(
'shfs_insert_header' => 'jamify_hfs_insert_header',
'shfs_insert_body' => 'jamify_hfs_insert_body',
'shfs_insert_footer' => 'jamify_hfs_insert_footer',
'shfs_insert_header_priority' => 'jamify_hfs_insert_header_priority',
'shfs_insert_body_priority' => 'jamify_hfs_insert_body_priority',
'shfs_insert_footer_priority' => 'jamify_hfs_insert_footer_priority',
'shfs_allow_author' => 'jamify_hfs_allow_author',
'shfs_allow_contributor' => 'jamify_hfs_allow_contributor',
);
foreach ( $options_to_migrate as $old => $new ) {
if ( false === get_option( $new ) && false !== get_option( $old ) ) {
update_option( $new, get_option( $old ) );
}
}
// register settings for sitewide script
register_setting( 'header-and-footer-scripts', 'jamify_hfs_insert_header', 'trim' );
register_setting( 'header-and-footer-scripts', 'jamify_hfs_insert_body', 'trim' );
register_setting( 'header-and-footer-scripts', 'jamify_hfs_insert_footer', 'trim' );
register_setting( 'header-and-footer-scripts', 'jamify_hfs_insert_header_priority', 'intval' );
register_setting( 'header-and-footer-scripts', 'jamify_hfs_insert_body_priority', 'intval' );
register_setting( 'header-and-footer-scripts', 'jamify_hfs_insert_footer_priority', 'intval' );
register_setting( 'header-and-footer-scripts', 'jamify_hfs_allow_author', 'sanitize_text_field' );
register_setting( 'header-and-footer-scripts', 'jamify_hfs_allow_contributor', 'sanitize_text_field' );
register_setting( 'header-and-footer-scripts', 'jamify_hfs_clean_on_uninstall', 'sanitize_text_field' );
// add meta box to all post types
foreach ( get_post_types( '', 'names' ) as $type ) {
if ( current_user_can( 'unfiltered_html' ) ) {
add_meta_box( 'jamify_hfs_all_post_meta', esc_html__( 'Insert Script to &lt;head&gt;', 'header-and-footer-scripts' ), array( $this, 'meta_setup' ), $type, 'normal', 'high' );
}
}
add_action( 'save_post', array( $this, 'post_meta_save' ) );
}
/**
* Register the options page.
*/
public function admin_menu() {
$page = add_submenu_page( 'options-general.php', esc_html__( 'Header and Footer Scripts', 'header-and-footer-scripts' ), esc_html__( 'Header and Footer Scripts', 'header-and-footer-scripts' ), 'manage_options', 'header-and-footer-scripts', array( $this, 'jamify_hfs_options_panel' ) );
}
/**
* Enqueue admin scripts (CodeMirror).
*
* @param string $hook Current admin page hook.
*/
public function admin_enqueue_scripts( $hook ) {
if ( 'settings_page_header-and-footer-scripts' !== $hook && 'post.php' !== $hook && 'post-new.php' !== $hook ) {
return;
}
// Enqueue code editor for syntax highlighting
$settings = wp_enqueue_code_editor( array( 'type' => 'text/html' ) );
// Enqueue admin styles
wp_enqueue_style( 'jamify-hfs-admin-css', plugins_url( 'css/jamify-hfs-admin.css', __FILE__ ), array(), '2.4.2' );
// If the code editor is enabled, we need to initialize it.
if ( false !== $settings ) {
wp_add_inline_script(
'code-editor',
sprintf(
'jQuery( function() {
if ( jQuery( "#jamify_hfs_insert_header" ).length ) { wp.codeEditor.initialize( "jamify_hfs_insert_header", %1$s ); }
if ( jQuery( "#jamify_hfs_insert_body" ).length ) { wp.codeEditor.initialize( "jamify_hfs_insert_body", %1$s ); }
if ( jQuery( "#jamify_hfs_insert_footer" ).length ) { wp.codeEditor.initialize( "jamify_hfs_insert_footer", %1$s ); }
if ( jQuery( "#jamify_hfs_inpost_head_script" ).length ) {
var inpostSettings = wp.codeEditor.initialize( "jamify_hfs_inpost_head_script", %1$s );
var cm = inpostSettings.codemirror;
// Fallback for some WP versions where initialize returns jQuery object or structure differs.
if ( ! cm && jQuery( "#jamify_hfs_inpost_head_script" ).next( ".CodeMirror" ).length ) {
cm = jQuery( "#jamify_hfs_inpost_head_script" ).next( ".CodeMirror" ).get( 0 ).CodeMirror;
}
if ( cm ) {
cm.on( "change", function() {
cm.save();
jQuery( "#jamify_hfs_inpost_head_script" ).trigger( "change" );
} );
// Refresh to ensure gutter renders correctly
setTimeout( function() { cm.refresh(); }, 1 );
}
}
} );',
wp_json_encode( $settings )
)
);
}
}
/**
* Output scripts in wp_head.
*/
public function wp_head() {
$meta = get_option( 'jamify_hfs_insert_header', '' );
if ( '' !== $meta ) {
echo $meta, "\n"; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
}
$shfs_post_meta = get_post_meta( get_the_ID(), '_inpost_head_script', true );
if ( is_singular() && '' !== $shfs_post_meta ) {
echo $shfs_post_meta['synth_header_script'], "\n"; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
}
}
/**
* Output scripts in wp_body_open.
*/
public function wp_body_open() {
if ( ! is_admin() && ! is_feed() && ! is_robots() && ! is_trackback() ) {
$meta = get_option( 'jamify_hfs_insert_body', '' );
if ( '' !== $meta ) {
echo $meta, "\n"; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
}
}
}
/**
* Output scripts in wp_footer.
*/
public function wp_footer() {
if ( ! is_admin() && ! is_feed() && ! is_robots() && ! is_trackback() ) {
$text = get_option( 'jamify_hfs_insert_footer', '' );
$text = convert_smilies( $text );
$text = do_shortcode( $text );
if ( '' !== $text ) {
echo $text, "\n"; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
}
}
}
/**
* Render the plugin options page.
*/
public function jamify_hfs_options_panel() {
// Load options page
require_once JAMIFY_HFS_PLUGIN_DIR . '/inc/options.php';
}
/**
* Display admin notices (e.g. migration warning).
*/
public function admin_notices() {
// Check for previous version option to show notice
if ( get_option( 'shfs_script_access_level' ) ) {
$dismiss_link = add_query_arg( 'shfs_dismiss_notice', 'true' );
if ( isset( $_GET['shfs_dismiss_notice'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
delete_option( 'shfs_script_access_level' );
} else {
?>
<div class="notice notice-warning is-dismissible">
<p>
<?php esc_html_e( 'Header and Footer Scripts permission system has been updated. Please check the ', 'header-and-footer-scripts' ); ?>
<a href="<?php echo esc_url( admin_url( 'options-general.php?page=header-and-footer-scripts' ) ); ?>"><?php esc_html_e( 'Settings', 'header-and-footer-scripts' ); ?></a>
<?php esc_html_e( 'to configure Author/Contributor access if needed.', 'header-and-footer-scripts' ); ?>
<a href="<?php echo esc_url( $dismiss_link ); ?>" style="float:right; text-decoration:none;">X</a>
</p>
</div>
<?php
}
}
}
/**
* Update 'author' role capabilities when option changes.
*
* @param mixed $old_value Old option value.
* @param mixed $new_value New option value.
*/
public function update_role_author( $old_value, $new_value ) {
$role = get_role( 'author' );
if ( 'yes' === $new_value ) {
$role->add_cap( 'unfiltered_html' );
} else {
$role->remove_cap( 'unfiltered_html' );
}
}
/**
* Update 'contributor' role capabilities when option changes.
*
* @param mixed $old_value Old option value.
* @param mixed $new_value New option value.
*/
public function update_role_contributor( $old_value, $new_value ) {
$role = get_role( 'contributor' );
if ( 'yes' === $new_value ) {
$role->add_cap( 'unfiltered_html' );
} else {
$role->remove_cap( 'unfiltered_html' );
}
}
/**
* Render the post meta box.
*/
public function meta_setup() {
global $post;
// using an underscore, prevents the meta variable
// from showing up in the custom fields section
$meta = get_post_meta( $post->ID, '_inpost_head_script', true );
// instead of writing HTML here, lets do an include
include_once JAMIFY_HFS_PLUGIN_DIR . '/inc/meta.php';
// create a custom nonce for submit verification later
echo '<input type="hidden" name="jamify_hfs_post_meta_noncename" value="' . esc_attr( wp_create_nonce( 'jamify_hfs_post_meta_save' ) ) . '" />';
}
/**
* Save post meta data.
*
* @param int $post_id The ID of the post being saved.
* @return int Post ID.
*/
public function post_meta_save( $post_id ) {
// authentication checks
// make sure data came from our meta box
if ( ! isset( $_POST['jamify_hfs_post_meta_noncename'] )
|| ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['jamify_hfs_post_meta_noncename'] ) ), 'jamify_hfs_post_meta_save' ) ) {
return $post_id;
}
// check user permissions
if ( isset( $_POST['post_type'] ) && 'page' === $_POST['post_type'] ) {
if ( ! current_user_can( 'edit_page', $post_id ) ) {
return $post_id;
}
} else {
if ( ! current_user_can( 'edit_post', $post_id ) ) {
return $post_id;
}
}
// check configured access level
if ( ! current_user_can( 'unfiltered_html' ) ) {
return $post_id;
}
$current_data = get_post_meta( $post_id, '_inpost_head_script', true );
$new_data = isset( $_POST['_inpost_head_script'] ) ? wp_unslash( $_POST['_inpost_head_script'] ) : null; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Intentional raw input for script insertion.
$this->post_meta_clean( $new_data );
if ( $current_data ) {
if ( is_null( $new_data ) ) {
delete_post_meta( $post_id, '_inpost_head_script' );
} else {
update_post_meta( $post_id, '_inpost_head_script', $new_data );
}
} elseif ( ! is_null( $new_data ) ) {
add_post_meta( $post_id, '_inpost_head_script', $new_data, true );
}
return $post_id;
}
/**
* Clean empty values from the meta array.
*
* @param array $arr The array to clean.
*/
public function post_meta_clean( &$arr ) {
if ( is_array( $arr ) ) {
foreach ( $arr as $i => $v ) {
if ( is_array( $arr[ $i ] ) ) {
$this->post_meta_clean( $arr[ $i ] );
if ( ! count( $arr[ $i ] ) ) {
unset( $arr[ $i ] );
}
} else {
if ( trim( $arr[ $i ] ) == '' ) {
unset( $arr[ $i ] );
}
}
}
if ( ! count( $arr ) ) {
$arr = null;
}
}
}
}
$jamify_hfs = new HeaderAndFooterScripts();
// Legacy global for backward compatibility
$GLOBALS['shfs_header_and_footer_scripts'] = $jamify_hfs;
}
/**
* Backward Compatibility Shims
* These functions ensure that external code calling the old global functions
* continues to work by delegating to the new class instance.
*/
if ( ! function_exists( 'shfs_meta_setup' ) ) {
function shfs_meta_setup() {
global $jamify_hfs;
if ( isset( $jamify_hfs ) ) {
$jamify_hfs->meta_setup();
}
}
}
if ( ! function_exists( 'shfs_post_meta_save' ) ) {
function shfs_post_meta_save( $post_id ) {
global $jamify_hfs;
if ( isset( $jamify_hfs ) ) {
return $jamify_hfs->post_meta_save( $post_id );
}
return $post_id;
}
}
if ( ! function_exists( 'shfs_post_meta_clean' ) ) {
function shfs_post_meta_clean( &$arr ) {
global $jamify_hfs;
if ( isset( $jamify_hfs ) ) {
$jamify_hfs->post_meta_clean( $arr );
}
}
}

View File

@@ -0,0 +1,34 @@
<?php
/**
* Fired when the plugin is being uninstalled.
*
* @package Header and Footer Scripts
* @author Anand Kumar <anand@anandkumar.net>
* @copyright Copyright (c) 2013 - 2026, Anand Kumar
* @link https://github.com/anandkumar/header-and-footer-scripts
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*/
// If uninstall not called from WordPress, then exit.
if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
exit;
}
if ( 'yes' !== get_option( 'jamify_hfs_clean_on_uninstall' ) ) {
exit;
}
delete_option( 'shfs_insert_header' );
delete_option( 'shfs_insert_footer' );
delete_option( 'shfs_insert_header_priority' );
delete_option( 'shfs_insert_footer_priority' );
delete_option( 'shfs_script_access_level' );
delete_option( 'jamify_hfs_insert_header' );
delete_option( 'jamify_hfs_insert_body' );
delete_option( 'jamify_hfs_insert_footer' );
delete_option( 'jamify_hfs_insert_header_priority' );
delete_option( 'jamify_hfs_insert_body_priority' );
delete_option( 'jamify_hfs_insert_footer_priority' );
delete_option( 'jamify_hfs_allow_author' );
delete_option( 'jamify_hfs_allow_contributor' );
delete_option( 'jamify_hfs_clean_on_uninstall' );