Plugin Directory

Changeset 2397736


Ignore:
Timestamp:
10/12/2020 04:54:43 AM (5 years ago)
Author:
pressmaninc
Message:

V1.1.1

Location:
app-log/trunk
Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • app-log/trunk/admin/aplg-settings.php

    r2352080 r2397736  
    4141            array( $this, 'render_options_page' )
    4242        );
     43
     44        // Include css file for settings
     45        wp_enqueue_style( 'aplg-settings', plugin_dir_url( __DIR__ ) . 'assets/css/aplg-settings.css' );
    4346    }
    4447
     
    6164            array( $this, 'render_log_directory_setting_field' ),
    6265            'aplg_settings',
    63             'aplg_settings_section'
     66            'aplg_settings_section',
     67            array( 'class' => 'aplg_settings_label' ),
    6468        );
    6569
    6670        add_settings_field(
    6771            'enable_disable_maillog',
    68             __( 'Enable/Disable Mail Log', 'aplg' ),
     72            __( 'Log emails sent by WordPress', 'aplg' ),
    6973            array( $this, 'render_enable_disable_maillog' ),
    7074            'aplg_settings',
    71             'aplg_settings_section'
     75            'aplg_settings_section',
     76            array( 'class' => 'aplg_settings_label' ),
    7277        );
    7378    }
     
    8691        $options = get_option( 'aplg_settings' );
    8792        ?>
    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>
    8997        <?php
    9098    }
  • app-log/trunk/app-log-samples.php

    r2352080 r2397736  
    3333    public function log_mail( $args ) {
    3434        $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'] ) {
    3636            applog( $args['subject'] . '|' . $args['message'] );
    3737        }
  • app-log/trunk/app-log.php

    r2354412 r2397736  
    44Plugin URI:
    55Description: A simple logger for debugging.
    6 Version: 1.1
     6Version: 1.1.1
    77Author: PRESSMAN
    88Author URI: https://www.pressman.ne.jp/
     
    3535        require_once plugin_dir_path( __FILE__ ) . 'app-log-samples.php';
    3636
     37        register_activation_hook( __FILE__, array( $this, 'set_applog_options' ) );
     38        register_uninstall_hook( __FILE__, array( __CLASS__, 'remove_applog_options' ) );
     39
    3740        // Load text domain
    3841        add_action( 'init', array( $this, 'load_aplg_textdomain' ), 10 );
     
    5255
    5356    /**
     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    /**
    5482     * Loads the text domain for app log plugin
    5583     */
  • app-log/trunk/lang/aplg-ja.po

    r2354412 r2397736  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: App Log 1.1\n"
     5"Project-Id-Version: App Log 1.1.1\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/app-log\n"
    77"Language-Team: \n"
     
    1010"Content-Transfer-Encoding: 8bit\n"
    1111"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"
    1313"X-Generator: Poedit 2.3.1\n"
    1414"X-Domain: aplg\n"
     
    4444#: admin/aplg-dashboard.php:105
    4545msgid "No logs found."
    46 msgstr "まだログがありません。"
     46msgstr "ログはありません。"
    4747
    4848#: admin/aplg-dashboard.php:117
     
    6868#: admin/aplg-dashboard.php:231 classes/class-aplg-logger.php:122
    6969msgid "%s successfully deleted."
    70 msgstr "%sを正常に削除されました。"
     70msgstr "%sを削除しました。"
    7171
    7272#: admin/aplg-settings.php:37 admin/aplg-settings.php:53
     
    7676#: admin/aplg-settings.php:60
    7777msgid "Log Directory"
    78 msgstr "ログ場所"
     78msgstr "ログディレクトリ"
    7979
    8080#: admin/aplg-settings.php:68
    81 msgid "Enable/Disable Mail Log"
    82 msgstr "メールログ 有効化・無効化"
     81msgid "Log emails sent by WordPress"
     82msgstr "WordPressが送信するメールをログとして記録"
     83
     84#: admin/aplg-settings.php:90
     85msgid "Enable"
     86msgstr "有効化する"
    8387
    8488#: classes/class-aplg-logger.php:114 classes/class-aplg-logger.php:127
  • app-log/trunk/lang/aplg.pot

    r2354412 r2397736  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: App Log 1.1\n"
     5"Project-Id-Version: App Log 1.1.1\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/app-log\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1111"Content-Transfer-Encoding: 8bit\n"
    1212"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"
    1414"X-Generator: WP-CLI 2.4.0\n"
    1515"X-Domain: aplg\n"
     
    8080
    8181#: admin/aplg-settings.php:68
    82 msgid "Enable/Disable Mail Log"
     82msgid "Log emails sent by WordPress"
     83msgstr ""
     84
     85#: admin/aplg-settings.php:90
     86msgid "Enable"
    8387msgstr ""
    8488
  • app-log/trunk/readme.txt

    r2354412 r2397736  
    55Tested up to: 5.4.2
    66Requires PHP: 5.6.20
    7 Stable tag: 1.1
     7Stable tag: 1.1.1
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    2121
    2222== Changelog ==
     23= 1.1.1 =
     24* bug fix on warning message displayed during password reset
     25* updated Japanese translation and some field labels
     26
    2327= 1.1 =
    2428* added log level
Note: See TracChangeset for help on using the changeset viewer.