Changeset 1111767
- Timestamp:
- 03/13/2015 08:51:02 AM (11 years ago)
- Location:
- tags-manager/tags/0.4
- Files:
-
- 3 copied
-
. (copied) (copied from tags-manager/trunk)
-
google-tags.php (copied) (copied from tags-manager/trunk/google-tags.php) (8 diffs)
-
readme.txt (copied) (copied from tags-manager/trunk/readme.txt) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tags-manager/tags/0.4/google-tags.php
r1103118 r1111767 24 24 'manage_options', 25 25 'google_tags', 26 'my_google_tags' 27 28 26 'my_google_tags' 29 27 ); 30 28 } … … 37 35 <div class="wrap"> 38 36 <h2>Tags Manager by Googles</h2> 39 <h3> Google WebMasterToolのタグ, Google Analyticsのトラッキングレコード, Googleリマーケティングのタグ設定</h3>37 <h3>Set Up of Google WebMasterTool, Google Analytics and Google Remarketing </h3> 40 38 <form id="google-tags" method="post" action=""> 41 39 42 40 <?php wp_nonce_field( 'google-tabs-nonce-key', 'google-tags' ); ?> 43 41 44 <p><?php echo esc_html(__( 'Google ウェブマスターツールのタグ', 'google-tags' )); ?>:42 <p><?php echo esc_html(__( 'Google Webmastertool is here', 'google-tags' )); ?>: 45 43 <input type="text" name="google-webmaster-tool" value="<?php echo esc_attr(stripslashes(get_option('google-webmaster-tool'))); ?>" size="105"/></p> 46 44 47 <p><?php echo esc_html(__( 'Google アナリティクスのタグ', 'google-tags' )); ?>:</p>45 <p><?php echo esc_html(__( 'Google Analytics is here', 'google-tags' )); ?>:</p> 48 46 <textarea cols="40" rows="6" name="google-analytics"><?php echo esc_textarea(stripslashes(get_option('google-analytics'))); ?></textarea> 49 47 50 <p><?php echo esc_html(__( 'Google リマーケティングのタグ', 'google-tags' )); ?>:</p>48 <p><?php echo esc_html(__( 'Google Remarketing is here', 'google-tags' )); ?>:</p> 51 49 <textarea cols="40" rows="6" name="google-remarketing"><?php echo esc_textarea(stripslashes(get_option('google-remarketing'))); ?></textarea> 52 50 53 51 54 <p><input type="submit" value="<?php echo esc_attr(__( ' 保存する!', 'google_tags' ));?>" class="button button-primary button-large"></p>52 <p><input type="submit" value="<?php echo esc_attr(__( 'Submit', 'google_tags' ));?>" class="button button-primary button-large"></p> 55 53 56 54 </form> … … 63 61 64 62 function google_tags_admin_init() { 63 64 $e = new WP_Error(); 65 65 66 66 if(isset($_POST['google-tags']) && $_POST['google-tags']) { 67 if (check_admin_referer( 'google-tabs-nonce-key', 'google-tags' ) ){67 if (check_admin_referer( 'google-tabs-nonce-key', 'google-tags' ) ){ 68 68 69 69 if( isset($_POST['google-webmaster-tool']) && $_POST['google-webmaster-tool']) { 70 update_option( 'google-webmaster-tool', trim( $_POST['google-webmaster-tool'] ) ); 70 update_option( 'google-webmaster-tool', trim( $_POST['google-webmaster-tool'] ) ); 71 //アラート 72 $e->add( 'update', 'Post the Webmaster tag.', 'my_google_tags' ); 73 set_transient( 'my_google_tags_notice', $e->get_error_messages(), 5 ); 74 71 75 72 76 } else { 73 77 74 update_option( 'google-webmaster-tool', '' ); 78 update_option( 'google-webmaster-tool', ''); 79 75 80 } 76 81 77 82 if( isset($_POST['google-analytics']) && $_POST['google-analytics']) { 78 83 update_option( 'google-analytics', trim( $_POST['google-analytics'] ) ); 84 //アラート 85 $e->add( 'update', 'Post the Analytics tag.', 'my_google_tags' ); 86 set_transient( 'my_google_tags_notice', $e->get_error_messages(), 5 ); 79 87 80 88 } else { … … 85 93 if( isset($_POST['google-remarketing']) && $_POST['google-remarketing']) { 86 94 update_option( 'google-remarketing', trim( $_POST['google-remarketing'] ) ); 95 //アラート 96 $e->add( 'update', 'Post the Remarketing tag.', 'my_google_tags' ); 97 set_transient( 'my_google_tags_notice', $e->get_error_messages(), 5 ); 87 98 88 99 } else { … … 94 105 wp_safe_redirect( menu_page_url( 'google-tags', false )); 95 106 107 108 96 109 } 110 97 111 } 98 112 99 113 } 100 114 … … 110 124 echo $webmaster. "\n"; 111 125 } 126 112 127 113 128 } … … 138 153 139 154 155 //エラー処理 156 add_action('admin_notices', 'google_tags_notices'); 157 158 function google_tags_notices() { 159 160 ?> 161 <?php if ( $messages = get_transient( 'my_google_tags_notice' ) ): ?> 162 <div class="updated"> 163 <ul> 164 <?php foreach( $messages as $message ): ?> 165 <li><?php echo esc_html( $message ); ?></li> 166 <?php endforeach; ?> 167 168 169 </ul> 170 </div> 171 <?php endif; ?> 172 173 <?php 174 } 140 175 141 176 … … 143 178 144 179 180 181 182 -
tags-manager/tags/0.4/readme.txt
r1103118 r1111767 2 2 Contributors: Junya Higashiyama 3 3 Tags: Google analytics, Google webmastertool, Google Adwords remarketing 4 Requires at least: 0. 35 Tested up to: 4. 0.16 Stable tag: tags/0. 34 Requires at least: 0.4 5 Tested up to: 4.1.1 6 Stable tag: tags/0.4 7 7 License: GPLv2 or later 8 8 License URI: http://bibunkaplan.com … … 28 28 29 29 == Changelog == 30 = 0.4= 31 * Show the post message and changing langauage from Japanese to English. 30 32 = 0.3= 31 33 * change details.
Note: See TracChangeset
for help on using the changeset viewer.