PluginProbe
Add Custom Codes – Insert Header, Footer, Custom PHP Snippets, CSS, Javascript / trunk
Add Custom Codes – Insert Header, Footer, Custom PHP Snippets, CSS, Javascript vtrunk
trunk 1.0 2.0 3.0 3.5 4.0 4.1 4.2 4.3 4.4 4.5 4.6 4.7 4.71 4.80 5.0
add-custom-codes / global-form.php

global-form.php in Add Custom Codes – Insert Header, Footer, Custom PHP Snippets, CSS, Javascript trunk, at global-form.php

74 lines 4.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 // If this file was called directly, abort.
3 if ( ! defined( 'ABSPATH' ) ) {
4 exit;
5 }
6 ?>
7 <?php
8 // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- value comes from Settings API redirect after a verified save.
9 if ( isset( $_GET['settings-updated'] ) && sanitize_text_field( wp_unslash( $_GET['settings-updated'] ) ) ) : ?>
10 <div class="notice notice-success is-dismissible"><p><?php esc_html_e('Changes saved! Please clear your cache if the changes are not reflected on the website.', 'add-custom-codes'); ?></p></div>
11 <?php endif; ?>
12
13 <div class="wrap">
14 <h2><?php esc_html_e( 'Add Custom Codes by Mak', 'add-custom-codes' ) ?></h2>
15 <div class="full_row">
16 <div class="accodes_cols">
17 <form method="post" action="options.php">
18 <?php settings_fields( 'accodes-settings-group' ); ?>
19 <?php wp_nonce_field('accodes_save_settings', 'accodes_nonce'); ?>
20 <?php do_settings_sections( 'accodes-settings-group' ); ?>
21
22 <?php
23 $accodes_global_css = "";
24 $accodes_global_css = get_option('custom-css-codes-input');
25 ?>
26 <p><label for="custom-css-codes-input" class="accodes-label green-label"><?php esc_html_e( 'Custom CSS (Global)', 'add-custom-codes' ) ?></label><br/>
27 You can add custom css (global) codes below. DO NOT INCLUDE <em>&lt;style&gt;</em> and <em>&lt;/style&gt;</em> tags:</p>
28 <textarea class="codemirror-accodes-css" id="custom-css-codes-input" name="custom-css-codes-input"><?php echo esc_attr( $accodes_global_css ); ?></textarea>
29
30 <?php
31 // $css_on_footer ='';
32 $accodes_css_on_footer = get_option('accodes_global_css_on_footer', false);
33 ?>
34 <p>
35 <label for="accodes_global_css_on_footer" class="accodes-checkbox-label">
36 <input type="checkbox" <?php echo checked( $accodes_css_on_footer, 1, false ); ?>
37 name="accodes_global_css_on_footer" id="accodes_global_css_on_footer" value="1"/>
38 Insert Custom CSS before <em>&lt;/body&gt;</em> of website.
39 </label><br/>
40 By default, the plugin adds Custom CSS before <em>&lt;/head&gt;</em> section of your website.
41 </p>
42 <?php submit_button(); ?>
43
44
45 <div class="accodes-spacer"></div>
46
47 <p><label for="custom-header-codes-input" class="accodes-label green-label">
48 <?php esc_html_e( 'Global Header Codes', 'add-custom-codes' ) ?></label><br/>
49 Global Codes or scripts to add before <em>&lt;/head&gt;</em> section of your website. Google Search Console Verification, Bing Verification and any other codes. Include <em>&lt;script&gt;</em> and <em>&lt;/script&gt;</em> tags when necessary: </p>
50 <textarea class="codemirror" id="custom-verification-codes-input" name="custom-header-codes-input"><?php echo esc_attr(get_option('custom-header-codes-input') ); ?></textarea>
51 <?php submit_button(); ?>
52
53 <div class="accodes-spacer" style="border: ;background: #dce4e6;width: 100%;height: 1px;margin: 30px 0px;"></div>
54
55 <p><label for="custom-footer-codes-input" class="accodes-label green-label">
56 <?php esc_html_e( 'Global Footer Codes', 'add-custom-codes' ) ?></label><br/>
57 Global Codes or scripts to add before <em>&lt;/body&gt;</em> section of your website. You can add Google Anaylytics Tracking Code, Facebook Scripts, third party ad scripts etc here. Include <em>&lt;script&gt;</em> and <em>&lt;/script&gt;</em> tags when necessary: </p>
58 <textarea class="codemirror" placeholder="" id="custom-analytics-codes-input" name="custom-footer-codes-input"><?php echo esc_attr( get_option('custom-footer-codes-input') ); ?></textarea>
59 <?php submit_button(); ?>
60
61 </form>
62 </div>
63 <div class="accodes_cols2">
64 <div class="accodes_box">
65 <h3>Hey, How is the plugin?</h3>
66 <p>Thank you for using <em>Add Custom Codes by Mak</em>. It will be free forever to use, pinky promise! To report bugs & issues or to request additional features, please visit plugin's <a href="https://wordpress.org/support/plugin/add-custom-codes/" target="_blank" >support forum</a> or <a href="https://maktalseo.com/contact-us/" target="_blank" >contact us</a>. <br/><br/>If you found this plugin useful, please donate something or hire us for your next project!</p>
67
68 <center><a class="accodes_donate blue" href="https://donate.stripe.com/9AQdRz5xJ87c9i0bIS" target="_blank">Donate now</a></center>
69
70 <center><a class="accodes_donate orange" href="https://maktalseo.com/" target="_blank">Hire us!</a></center>
71 </div>
72 </div>
73 <div class="clear"></div>
74 </div>