| 1 |
<?php |
| 2 |
$footnoteOptions = get_option('easy_footnotes_options'); |
| 3 |
|
| 4 |
if ( isset($_POST['easy_footnote_hidden']) && $_POST['easy_footnote_hidden'] == 'Y' ) { |
| 5 |
//Form data sent |
| 6 |
$easyFootnoteLabel = $_POST['easy_footnotes_label']; |
| 7 |
if ($_POST['easy_footnote_check']) { |
| 8 |
$easyFootnoteCheck = true; |
| 9 |
} else { |
| 10 |
$easyFootnoteCheck = false; |
| 11 |
} |
| 12 |
$updateOptions = array( |
| 13 |
'footnoteLabel' => $easyFootnoteLabel, |
| 14 |
'useLabel' => $easyFootnoteCheck, |
| 15 |
); |
| 16 |
|
| 17 |
update_option('easy_footnotes_options', $updateOptions); |
| 18 |
|
| 19 |
?> |
| 20 |
<div class="updated"><p><strong><?php esc_html_e('Options saved.' ); ?></strong></p></div> |
| 21 |
<?php |
| 22 |
} else { |
| 23 |
//Normal page display |
| 24 |
$easyFootnoteLabel = $footnoteOptions['footnoteLabel']; |
| 25 |
$easyFootnoteCheck = $footnoteOptions['useLabel']; |
| 26 |
} |
| 27 |
?> |
| 28 |
|
| 29 |
<div class="wrap"> |
| 30 |
<?php echo "<h2>" . esc_html__( 'Easy Footnotes Settings', 'easy_footnotes_trdom' ) . "</h2>"; ?> |
| 31 |
|
| 32 |
<form name="easy_footnotes_form" method="post" action="<?php echo str_replace( '%7E', '~', $_SERVER['REQUEST_URI']); ?>"> |
| 33 |
<input type="hidden" name="easy_footnote_hidden" value="Y"> |
| 34 |
<?php echo "<h4>" . esc_html__( 'Easy Footnotes Settings', 'easy_footnotes_trdom' ) . "</h4>"; ?> |
| 35 |
<p><?php esc_html_e("Want to add a label to your footnotes section at the bottom of your post? Just enter some text here and check the box and you're good to go."); ?></p> |
| 36 |
<p><?php esc_html_e("Easy Footnotes Label: "); ?><input type="text" name="easy_footnotes_label" value="<?php echo esc_attr($easyFootnoteLabel); ?>" size="20"></p> |
| 37 |
|
| 38 |
<p><?php esc_html_e("Insert Easy Footnotes Label: "); ?><input type="checkbox" name="easy_footnote_check" <?php checked($easyFootnoteCheck); ?> size="20"><?php esc_html_e(""); ?></p> |
| 39 |
|
| 40 |
<p class="submit"> |
| 41 |
<input type="submit" name="Submit" value="<?php esc_attr_e('Update Options', 'easy_footnotes_trdom' ) ?>" /> |
| 42 |
</p> |
| 43 |
</form> |
| 44 |
|
| 45 |
<div class="easy-footnotes-shortcode-hint"> |
| 46 |
<p><?php echo __('Shortcode: [note]Insert your note here.[/note]', 'easy-footnotes'); ?></p> |
| 47 |
</div> |
| 48 |
|
| 49 |
<div class="efn-preview"> |
| 50 |
<a class="efn-theme-link" href="<?php echo esc_url( 'https://www.themes.pizza/utm_source=easy-footnotes&utm_medium=button&utm_campaign=efnupsell' ); ?>" target="_blank"><img src="<?php echo plugins_url( '/assets/zuul-wordpress-theme.jpg' , __FILE__ ); ?>" alt="Zuul WordPress Theme homepage in various color options" /></a> |
| 51 |
<div class="efn-preview-copy"> |
| 52 |
<h2><?php echo __( 'Tasty WordPress Themes', 'easy-footnotes' ); ?></h2> |
| 53 |
<p><?php printf( __( 'Love easy footnotes? Check out my premium themes now available on Themes.Pizza. Each theme is hand crafted from the finest ingredients with a specific purpose in mind. Need to start a side project / membership site? Try out <a href="%1s" target="_blank">Zuul</a>. Looking to establish yourself as an authoirty on a subject? Try out <a href="%2s" target="_blank">The Authority Pro</a>.', 'easy-footnotes' ), esc_url( 'https://www.themes.pizza/downloads/zuul-pro/utm_source=easy-footnotes&utm_medium=button&utm_campaign=efnupsell' ), esc_url( 'https://www.themes.pizza/downloads/the-authority-pro/utm_source=easy-footnotes&utm_medium=button&utm_campaign=efnupsell' ) ); ?></p> |
| 54 |
<p><?php echo __( 'All themes are 100% GPL. Use them on as many sites as you want and make something awesome! And for being a faithful Easy Footnotes user get 20% off with the code <strong>TASTYZA</strong>.', 'easy-footnotes' ); ?></p> |
| 55 |
<a class="efn-theme-button" href="<?php echo esc_url( 'https://www.themes.pizza/utm_source=easy-footnotes&utm_medium=button&utm_campaign=efnupsell' ); ?>" target="_blank"><?php echo __( 'Shop Now', 'easy-footnotes' ); ?></a> |
| 56 |
</div> |
| 57 |
</div> |
| 58 |
</div> |
| 59 |
|