Changeset 2397736
- Timestamp:
- 10/12/2020 04:54:43 AM (5 years ago)
- Location:
- app-log/trunk
- Files:
-
- 1 added
- 7 edited
-
admin/aplg-settings.php (modified) (3 diffs)
-
app-log-samples.php (modified) (1 diff)
-
app-log.php (modified) (3 diffs)
-
assets/css/aplg-settings.css (added)
-
lang/aplg-ja.mo (modified) (previous)
-
lang/aplg-ja.po (modified) (5 diffs)
-
lang/aplg.pot (modified) (3 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
app-log/trunk/admin/aplg-settings.php
r2352080 r2397736 41 41 array( $this, 'render_options_page' ) 42 42 ); 43 44 // Include css file for settings 45 wp_enqueue_style( 'aplg-settings', plugin_dir_url( __DIR__ ) . 'assets/css/aplg-settings.css' ); 43 46 } 44 47 … … 61 64 array( $this, 'render_log_directory_setting_field' ), 62 65 'aplg_settings', 63 'aplg_settings_section' 66 'aplg_settings_section', 67 array( 'class' => 'aplg_settings_label' ), 64 68 ); 65 69 66 70 add_settings_field( 67 71 'enable_disable_maillog', 68 __( ' Enable/Disable Mail Log', 'aplg' ),72 __( 'Log emails sent by WordPress', 'aplg' ), 69 73 array( $this, 'render_enable_disable_maillog' ), 70 74 'aplg_settings', 71 'aplg_settings_section' 75 'aplg_settings_section', 76 array( 'class' => 'aplg_settings_label' ), 72 77 ); 73 78 } … … 86 91 $options = get_option( 'aplg_settings' ); 87 92 ?> 88 <input type="checkbox" name="aplg_settings[enable_disable_maillog]" <?php checked( $options['enable_disable_maillog'], 1 ); ?> value="1"> 93 <label> 94 <input type="checkbox" name="aplg_settings[enable_disable_maillog]" <?php checked( $options? $options['enable_disable_maillog'] : 0, 1 ); ?> value="1"> 95 <?php echo __( 'Enable', 'aplg' ); ?> 96 </label> 89 97 <?php 90 98 } -
app-log/trunk/app-log-samples.php
r2352080 r2397736 33 33 public function log_mail( $args ) { 34 34 $options = get_option( 'aplg_settings' ); 35 if ( array_key_exists( 'enable_disable_maillog', $options ) && '1' === $options['enable_disable_maillog'] ) {35 if ( $options && array_key_exists( 'enable_disable_maillog', $options ) && '1' === $options['enable_disable_maillog'] ) { 36 36 applog( $args['subject'] . '|' . $args['message'] ); 37 37 } -
app-log/trunk/app-log.php
r2354412 r2397736 4 4 Plugin URI: 5 5 Description: A simple logger for debugging. 6 Version: 1.1 6 Version: 1.1.1 7 7 Author: PRESSMAN 8 8 Author URI: https://www.pressman.ne.jp/ … … 35 35 require_once plugin_dir_path( __FILE__ ) . 'app-log-samples.php'; 36 36 37 register_activation_hook( __FILE__, array( $this, 'set_applog_options' ) ); 38 register_uninstall_hook( __FILE__, array( __CLASS__, 'remove_applog_options' ) ); 39 37 40 // Load text domain 38 41 add_action( 'init', array( $this, 'load_aplg_textdomain' ), 10 ); … … 52 55 53 56 /** 57 * プラグインを有効化する時にオプションを追加する 58 * 59 * @return void 60 */ 61 public function set_applog_options() { 62 $option = get_option( 'aplg_settings' ); 63 if ( ! $option ) { 64 $default_settings = array( 65 'log_directory' => Aplg_Settings::get_path_to_logdir(), 66 'enable_disable_maillog' => 0, 67 ); 68 update_option( 'aplg_settings', $default_settings ); 69 } 70 } 71 72 /** 73 * Applog設定をオプションから削除 74 * 75 * @return void 76 */ 77 public static function remove_applog_options() { 78 delete_option( 'aplg_settings' ); 79 } 80 81 /** 54 82 * Loads the text domain for app log plugin 55 83 */ -
app-log/trunk/lang/aplg-ja.po
r2354412 r2397736 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: App Log 1.1 \n"5 "Project-Id-Version: App Log 1.1.1\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/app-log\n" 7 7 "Language-Team: \n" … … 10 10 "Content-Transfer-Encoding: 8bit\n" 11 11 "POT-Creation-Date: 2020-07-29T02:35:19+00:00\n" 12 "PO-Revision-Date: 2020- 08-07T06:01:23+00:00\n"12 "PO-Revision-Date: 2020-10-09T05:08:50+00:00\n" 13 13 "X-Generator: Poedit 2.3.1\n" 14 14 "X-Domain: aplg\n" … … 44 44 #: admin/aplg-dashboard.php:105 45 45 msgid "No logs found." 46 msgstr " まだログがありません。"46 msgstr "ログはありません。" 47 47 48 48 #: admin/aplg-dashboard.php:117 … … 68 68 #: admin/aplg-dashboard.php:231 classes/class-aplg-logger.php:122 69 69 msgid "%s successfully deleted." 70 msgstr "%sを 正常に削除されました。"70 msgstr "%sを削除しました。" 71 71 72 72 #: admin/aplg-settings.php:37 admin/aplg-settings.php:53 … … 76 76 #: admin/aplg-settings.php:60 77 77 msgid "Log Directory" 78 msgstr "ログ 場所"78 msgstr "ログディレクトリ" 79 79 80 80 #: admin/aplg-settings.php:68 81 msgid "Enable/Disable Mail Log" 82 msgstr "メールログ 有効化・無効化" 81 msgid "Log emails sent by WordPress" 82 msgstr "WordPressが送信するメールをログとして記録" 83 84 #: admin/aplg-settings.php:90 85 msgid "Enable" 86 msgstr "有効化する" 83 87 84 88 #: classes/class-aplg-logger.php:114 classes/class-aplg-logger.php:127 -
app-log/trunk/lang/aplg.pot
r2354412 r2397736 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: App Log 1.1 \n"5 "Project-Id-Version: App Log 1.1.1\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/app-log\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 11 11 "Content-Transfer-Encoding: 8bit\n" 12 12 "POT-Creation-Date: 2020-07-29T02:35:19+00:00\n" 13 "PO-Revision-Date: 2020- 08-07T06:01:23+00:00\n"13 "PO-Revision-Date: 2020-10-09T05:08:50+00:00\n" 14 14 "X-Generator: WP-CLI 2.4.0\n" 15 15 "X-Domain: aplg\n" … … 80 80 81 81 #: admin/aplg-settings.php:68 82 msgid "Enable/Disable Mail Log" 82 msgid "Log emails sent by WordPress" 83 msgstr "" 84 85 #: admin/aplg-settings.php:90 86 msgid "Enable" 83 87 msgstr "" 84 88 -
app-log/trunk/readme.txt
r2354412 r2397736 5 5 Tested up to: 5.4.2 6 6 Requires PHP: 5.6.20 7 Stable tag: 1.1 7 Stable tag: 1.1.1 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 21 21 22 22 == Changelog == 23 = 1.1.1 = 24 * bug fix on warning message displayed during password reset 25 * updated Japanese translation and some field labels 26 23 27 = 1.1 = 24 28 * added log level
Note: See TracChangeset
for help on using the changeset viewer.