| 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><style></em> and <em></style></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></body></em> of website. |
| 39 |
</label><br/> |
| 40 |
By default, the plugin adds Custom CSS before <em></head></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></head></em> section of your website. Google Search Console Verification, Bing Verification and any other codes. Include <em><script></em> and <em></script></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></body></em> section of your website. You can add Google Anaylytics Tracking Code, Facebook Scripts, third party ad scripts etc here. Include <em><script></em> and <em></script></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> |