PluginProbe ʕ •ᴥ•ʔ
Meta Tag Manager / 2.1
Meta Tag Manager v2.1
trunk 0.2 0.3 0.4 0.5 1.0 1.1 1.2 2.0 2.0.1 2.0.2 2.1 2.1.1 2.1.2 2.1.3 2.2 2.3 3.0 3.0.2 3.1 3.2 3.3
meta-tag-manager / mtm-admin-settings.php
meta-tag-manager Last commit date
css 10 years ago js 10 years ago languages 10 years ago meta-tag-manager-admin.php 10 years ago meta-tag-manager.php 9 years ago mtm-admin-settings.php 9 years ago mtm-builder.php 10 years ago mtm-encodings.php 9 years ago mtm-tag-admin.php 9 years ago mtm-tag.php 9 years ago mtm-update.php 9 years ago readme.txt 5 years ago
mtm-admin-settings.php
116 lines
1 <?php
2 if( !defined('ABSPATH') ) exit;
3
4 $count = 0;
5 if (is_admin () and !empty($_REQUEST['mtm_nonce']) && wp_verify_nonce($_REQUEST['mtm_nonce'], 'mtm_options_submitted') ) {
6 $mtm_data = MTM_Builder::get_post();
7 update_option ( 'mtm_data', $mtm_data );
8 //quickly sanitize the post type custom data and save
9 $mtm_custom = array('post-types'=>array());
10 if( !empty($_REQUEST['mtm-post-types']) ){
11 $post_types = get_post_types(array('public'=>true), 'names');
12 foreach( $_REQUEST['mtm-post-types'] as $post_type ){
13 if( in_array($post_type, $post_types) ){
14 $mtm_custom['post-types'][] = $post_type;
15 }
16 }
17 }
18 update_option('mtm_custom', $mtm_custom);
19 echo '<div id="message" class="updated fade"><p><strong>' . __ ( 'Settings saved.' ) . '</strong></p></div>'; // No textdomain: phrase used in core, too
20 } else {
21 $mtm_custom = get_option('mtm_custom', array('post-type'=>array()));
22 }
23 ?>
24 <script type="text/javascript" charset="utf-8"><?php include('js/meta-tag-manager-settings.js'); ?></script>
25 <div class="wrap tabs-active">
26 <h1><?php esc_html_e( 'Meta Tag Manager', 'meta-tag-manager' ); ?></h1>
27 <h2 class="nav-tab-wrapper">
28 <a href="#builder" id="mtm-menu-builder" class="nav-tab nav-tab-active"><?php esc_html_e('Custom Meta Tags','meta-tag-manager'); ?></a>
29 <a href="#general" id="mtm-menu-general" class="nav-tab"><?php esc_html_e('General Options','meta-tag-manager'); ?></a>
30 </h2>
31 <div id="poststuff">
32 <div id="post-body" class="metabox-holder columns-2 mtm-settings">
33 <div id="postbox-container-2" class="postbox-container">
34 <form action="" method="post">
35 <?php wp_nonce_field('mtm_options_submitted', 'mtm_nonce'); ?>
36 <div class="mtm-menu-general mtm-menu-group" style="display:none;">
37 <div id="mtm-post-types" class="postbox mtm-post-types">
38 <h2 class="hndle"><?php esc_html_e('Post Type Support', 'meta-tag-manager'); ?></h2>
39 <div class="inside">
40 <p><?php esc_html_e('Enable the meta tag builder on the edit pages of your selected post types below. This will allow you to create specific post types for specific posts on your site.', 'meta-tag-manager'); ?></p>
41 <?php
42 //Post Types
43 $post_type_options = array();
44 foreach( get_post_types(array('public'=>true), 'objects') as $post_type){
45 $post_type_options[$post_type->labels->name] = $post_type->name;
46 }
47 ?>
48 <select name="mtm-post-types[]" class="mtm-post-types-select" multiple>
49 <option value=""><?php esc_html_e('choose one or more post types', 'meta-tag-manager'); ?></option>
50 <?php
51 echo MTM_Builder::output_select_options($post_type_options, $mtm_custom['post-types']);
52 ?>
53 </select>
54 </div>
55 </div>
56 </div>
57 <div class="mtm-menu-builder mtm-menu-group">
58 <p><?php esc_html_e('Use the meta tag builder to create meta tags which will be used on your site. You can choose what kind of meta tag to display, as well as where to display them such as on all your pages, just the home page or specific post types and taxonomies.', 'meta-tag-manager'); ?></p>
59 <p><?php esc_html_e('You can also enter a reference name at the top of each field card (something to help you remember the meta tag) and then enter the values below it that you want the meta tag to hold.', 'meta-tag-manager'); ?></p>
60 <p><?php esc_html_e('For adding meta tags to specific post types, please click on the \'General Options\' tab above.', 'meta-tag-manager'); ?></p>
61 <?php MTM_Builder::output(Meta_Tag_Manager::get_data(), array('context'=>true, 'reference'=>true)); ?>
62 </div>
63 <div class="mtm-actions">
64 <button type="submit" class="button-primary"><?php esc_html_e('Save Changes','meta-tag-manager'); ?></button>
65 </div>
66 </form>
67 </div>
68 <div id="postbox-container-1" class="postbox-container">
69 <div id="mtm-plugin-info" class="postbox ">
70 <button type="button" class="handlediv button-link"
71 aria-expanded="true">
72 <span class="screen-reader-text"><?php echo sprintf(esc_html__('Toggle panel: %s'), esc_html__('About This Plugin','meta-tag-manager')); ?></span>
73 <span class="toggle-indicator" aria-hidden="true"></span>
74 </button>
75 <h2 class="hndle ui-sortable-handle">
76 <span><?php esc_html_e('About This Plugin','meta-tag-manager'); ?></span>
77 </h2>
78 <div class="inside">
79 <p>
80 <?php echo sprintf(esc_html__('This plugin was developed by %s.', 'meta-tag-manager'), '<a href="http://msyk.es/?utm_source=meta-tag-manager&utm_medium=settings&utm_campaign=plugins" target="_blank">Marcus Sykes</a>'); ?>
81 </p>
82 <p style="color:green; font-weight:bold;">
83 <?php
84 echo sprintf(esc_html__('Please leave us a %s review on %s to show your support and help us keep making this plugin better!','meta-tag-manager'),
85 '<a href="http://wordpress.org/support/view/plugin-reviews/meta-tag-manager?filter=5" target="_blank">�
86
87
88
89
90 </a>',
91 '<a href="https://wordpress.org/plugins/meta-tag-manager/" target="_blank">WordPress.org</a>'
92 );
93 ?>
94 </p>
95 </div>
96 </div>
97 <div id="mtm-plugin-support" class="postbox ">
98 <button type="button" class="handlediv button-link"
99 aria-expanded="true">
100 <span class="screen-reader-text"><?php echo sprintf(esc_html__('Toggle panel: %s'), esc_html__('Need Help?','meta-tag-manager')); ?></span>
101 <span class="toggle-indicator" aria-hidden="true"></span>
102 </button>
103 <h2 class="hndle ui-sortable-handle">
104 <span><?php esc_html_e('Need Help?','meta-tag-manager'); ?></span>
105 </h2>
106 <div class="inside">
107 <p>
108 <?php echo sprintf(esc_html__('Please visit our %s if you have any questions.', 'meta-tag-manager'),
109 '<a href="http://wordpress.org/support/plugin/meta-tag-manager/" target="_blank">'.esc_html__('Support Forum','meta-tag-manager').'</a>'); ?>
110 </p>
111 </div>
112 </div>
113 </div>
114 </div><!-- #post-body -->
115 </div><!-- #poststuff -->
116 </div>