Plugin Directory

Changeset 1123857


Ignore:
Timestamp:
03/30/2015 07:31:49 PM (11 years ago)
Author:
vlastuin
Message:

Added email function after auto-update for debugging purposes.

Location:
vevida-optimizer/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • vevida-optimizer/trunk/convert_2_innodb.php

    r1121380 r1123857  
    4242    check_ajax_referer( 'vevida-optimizer-nonce' );
    4343    if ( !convertTables() ) {
    44         echo '<h2>Whoops, error!</h2><p>Turns out something went wrong... Please check your PHP error log file.</p>';
     44        echo '<h2>';
     45        _e( 'Whoops, error!', 'vevida-optimizer' );
     46        echo '</h2><p>';
     47        _e( 'Turns out something went wrong... Please check your PHP error log file.', 'vevida-optimizer' );
     48        echo '</p>';
    4549    } else {
    46         echo '<h2>Database convert complete!</h2><p>Either your database tables were already created with the InnoDB storage engine, or the convert process is completed successfully.</p>';
     50        echo '<h2>';
     51        _e( 'Database convert complete!', 'vevida-optimizer' );
     52        echo '</h2><p>';
     53        _e( 'Either your database tables were already created with the InnoDB storage engine, or the convert process is completed successfully.', 'vevida-optimizer' );
     54        echo '</p>';
    4755    }
    4856    wp_die();
  • vevida-optimizer/trunk/languages/vevida-optimizer-nl_NL.po

    r1117626 r1123857  
    55"Project-Id-Version: Vevida Optimizer 0.2\n"
    66"Report-Msgid-Bugs-To: http://wordpress.org/support/plugin/vevida-optimizer\n"
    7 "POT-Creation-Date: 2015-03-21 20:24:15+00:00\n"
    8 "PO-Revision-Date: 2015-03-21 21:25+0100\n"
     7"POT-Creation-Date: 2015-03-30 19:25:28+00:00\n"
     8"PO-Revision-Date: 2015-03-30 21:27+0100\n"
    99"Last-Translator: \n"
    1010"Language-Team: \n"
     
    1616"X-Generator: Poedit 1.7.5\n"
    1717
    18 #: convert_2_innodb.php:4 convert_2_innodb.php:5
    19 msgid "Convert DB tables"
     18#: convert_2_innodb.php:45
     19msgid "Whoops, error!"
     20msgstr "Helaas, een probleem!"
     21
     22#: convert_2_innodb.php:47
     23msgid "Turns out something went wrong... Please check your PHP error log file."
     24msgstr "Er is helaas iets misgegaan. Controleer uw PHP fouten log."
     25
     26#: convert_2_innodb.php:51
     27msgid "Database convert complete!"
     28msgstr "Database conversie gelukt!"
     29
     30#: convert_2_innodb.php:53
     31msgid ""
     32"Either your database tables were already created with the InnoDB storage "
     33"engine, or the convert process is completed successfully."
    2034msgstr ""
     35"Uw database was reeds volledig met InnoDB tabellen gevuld of het "
     36"conversieproces is succesvol afgerond."
    2137
    22 #: vevida-optimizer.php:79
     38#: vevida-optimizer.php:92
    2339msgid "Update Settings"
    2440msgstr "Update Instellingen"
    2541
    26 #: vevida-optimizer.php:93
     42#: vevida-optimizer.php:100
     43msgid "Convert DB tables"
     44msgstr "Converteer DB tabellen"
     45
     46#: vevida-optimizer.php:113
    2747msgid "Automatic update settings"
    2848msgstr "Instellingen voor automatische updates"
    2949
    30 #: vevida-optimizer.php:94
     50#: vevida-optimizer.php:114
    3151msgid ""
    3252"It is possible to disable the different kinds of automatic updates. Also, "
     
    3959"problematisch is."
    4060
    41 #: vevida-optimizer.php:114
     61#: vevida-optimizer.php:134
    4262msgid "Enable or disable automatic updates"
    4363msgstr "Automatische updates in- of uitschakelen"
    4464
    45 #: vevida-optimizer.php:120
     65#: vevida-optimizer.php:140
    4666msgid "Update to new major version"
    4767msgstr "Bijwerken van major versie updates"
    4868
    49 #: vevida-optimizer.php:126
     69#: vevida-optimizer.php:146
    5070msgid "e.g. WordPress 4.1 to 4.2"
    5171msgstr "Bijvoorbeeld: van Wordpress versie 4.1 naar 4.2"
    5272
    53 #: vevida-optimizer.php:131
     73#: vevida-optimizer.php:151
    5474msgid "Update to new minor version"
    5575msgstr "Bijwerken van minor versie updates"
    5676
    57 #: vevida-optimizer.php:137
     77#: vevida-optimizer.php:157
    5878msgid "e.g. WordPress 4.1 to 4.1.1"
    5979msgstr "Bijvoorbeeld: van Wordpress versie 4.1 naar 4.1.1"
    6080
    61 #: vevida-optimizer.php:142
     81#: vevida-optimizer.php:162
    6282msgid "Update themes"
    6383msgstr "Thema's bijwerken"
    6484
    65 #: vevida-optimizer.php:153
     85#: vevida-optimizer.php:173
    6686msgid "Update Translations"
    6787msgstr "Vertalingen bijwerken"
    6888
    69 #: vevida-optimizer.php:166
     89#: vevida-optimizer.php:186
    7090msgid "Enable or disable plugin updates"
    7191msgstr "Plugin updates in- of uitschakelen"
    7292
    73 #: vevida-optimizer.php:192
     93#: vevida-optimizer.php:211
     94msgid "Send email notifications"
     95msgstr "Stuur update meldingen per e-mail"
     96
     97#: vevida-optimizer.php:217
     98msgid "Enable notifications"
     99msgstr "Meldingen aanzetten"
     100
     101#: vevida-optimizer.php:232
    74102msgid ""
    75103"All updates are enabled by default. Only change this if your website "
     
    81109"probleem op, en heractiveer het automatisch bijwerken."
    82110
    83 #: vevida-optimizer.php:195
     111#: vevida-optimizer.php:235
    84112msgid ""
    85113"Some plugins require a different update method. Or the plugin simpy breaks as a "
     
    91119"automatisch bijwerken van die plugin (tijdelijk) worden uitgeschakeld."
    92120
    93 #: vevida-optimizer.php:207
     121#: vevida-optimizer.php:250
    94122msgid "Settings"
    95123msgstr "Instellingen"
  • vevida-optimizer/trunk/languages/vevida-optimizer.pot

    r1117626 r1123857  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Vevida Optimizer 1.0.3\n"
     5"Project-Id-Version: Vevida Optimizer 1.0.8\n"
    66"Report-Msgid-Bugs-To: http://wordpress.org/support/plugin/vevida-optimizer\n"
    7 "POT-Creation-Date: 2015-03-21 20:24:15+00:00\n"
     7"POT-Creation-Date: 2015-03-30 19:25:28+00:00\n"
    88"MIME-Version: 1.0\n"
    99"Content-Type: text/plain; charset=UTF-8\n"
     
    1313"Language-Team: LANGUAGE <LL@li.org>\n"
    1414
    15 #: convert_2_innodb.php:4 convert_2_innodb.php:5
     15#: convert_2_innodb.php:45
     16msgid "Whoops, error!"
     17msgstr ""
     18
     19#: convert_2_innodb.php:47
     20msgid "Turns out something went wrong... Please check your PHP error log file."
     21msgstr ""
     22
     23#: convert_2_innodb.php:51
     24msgid "Database convert complete!"
     25msgstr ""
     26
     27#: convert_2_innodb.php:53
     28msgid ""
     29"Either your database tables were already created with the InnoDB storage "
     30"engine, or the convert process is completed successfully."
     31msgstr ""
     32
     33#: vevida-optimizer.php:92
     34msgid "Update Settings"
     35msgstr ""
     36
     37#: vevida-optimizer.php:100
    1638msgid "Convert DB tables"
    1739msgstr ""
    1840
    19 #: vevida-optimizer.php:79
    20 msgid "Update Settings"
    21 msgstr ""
    22 
    23 #: vevida-optimizer.php:93
     41#: vevida-optimizer.php:113
    2442msgid "Automatic update settings"
    2543msgstr ""
    2644
    27 #: vevida-optimizer.php:94
     45#: vevida-optimizer.php:114
    2846msgid ""
    2947"It is possible to disable the different kinds of automatic updates. Also, "
     
    3250msgstr ""
    3351
    34 #: vevida-optimizer.php:114
     52#: vevida-optimizer.php:134
    3553msgid "Enable or disable automatic updates"
    3654msgstr ""
    3755
    38 #: vevida-optimizer.php:120
     56#: vevida-optimizer.php:140
    3957msgid "Update to new major version"
    4058msgstr ""
    4159
    42 #: vevida-optimizer.php:126
     60#: vevida-optimizer.php:146
    4361msgid "e.g. WordPress 4.1 to 4.2"
    4462msgstr ""
    4563
    46 #: vevida-optimizer.php:131
     64#: vevida-optimizer.php:151
    4765msgid "Update to new minor version"
    4866msgstr ""
    4967
    50 #: vevida-optimizer.php:137
     68#: vevida-optimizer.php:157
    5169msgid "e.g. WordPress 4.1 to 4.1.1"
    5270msgstr ""
    5371
    54 #: vevida-optimizer.php:142
     72#: vevida-optimizer.php:162
    5573msgid "Update themes"
    5674msgstr ""
    5775
    58 #: vevida-optimizer.php:153
     76#: vevida-optimizer.php:173
    5977msgid "Update Translations"
    6078msgstr ""
    6179
    62 #: vevida-optimizer.php:166
     80#: vevida-optimizer.php:186
    6381msgid "Enable or disable plugin updates"
    6482msgstr ""
    6583
    66 #: vevida-optimizer.php:192
     84#: vevida-optimizer.php:211
     85msgid "Send email notifications"
     86msgstr ""
     87
     88#: vevida-optimizer.php:217
     89msgid "Enable notifications"
     90msgstr ""
     91
     92#: vevida-optimizer.php:232
    6793msgid ""
    6894"All updates are enabled by default. Only change this if your website "
     
    7298msgstr ""
    7399
    74 #: vevida-optimizer.php:195
     100#: vevida-optimizer.php:235
    75101msgid ""
    76102"Some plugins require a different update method. Or the plugin simpy breaks "
     
    79105msgstr ""
    80106
    81 #: vevida-optimizer.php:207
     107#: vevida-optimizer.php:250
    82108msgid "Settings"
    83109msgstr ""
  • vevida-optimizer/trunk/readme.txt

    r1121385 r1123857  
    11=== Plugin Name ===
    22Contributors: vlastuin, janr
    3 Tags: auto-update, updates, mysql optimization
     3Tags: auto-update, updates, mysql optimization, update, automatic update, vevida, hosting
    44Requires at least: 3.9
    55Tested up to: 4.1.1
    6 Stable tag: 1.0.7
     6Stable tag: 1.0.8
    77License: GPLv2
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    9696== Changelog ==
    9797
     98= 1.0.8 =
     99Release date:
     100
     101* Added email function to send email with the update results after update
     102* Email function configurable in settings
     103* New translation strings added
     104
    98105= 1.0.7 =
    99106Release date: March 26th 2015
  • vevida-optimizer/trunk/vevida-optimizer.php

    r1121385 r1123857  
    33 * Plugin Name: Vevida Optimizer
    44 * Description: Configure automatic updates for each WordPress component, and optimize the mySQL database tables.
    5  * Version: 1.0.7
     5 * Version: 1.0.8
    66 * Author: Jan Vlastuin, Jan Reilink
    77 * Author URI: vevida.hosting
     
    6262    add_option( 'vevida_optimizer_theme_updates', true );
    6363    add_option( 'vevida_optimizer_translations_updates', true );
     64    add_option( 'vevida_optimizer_send_email', true );
    6465    $loaded_plugins = get_plugins();
    6566    foreach ($loaded_plugins as $key => $val) {
     
    6970}
    7071add_action( 'admin_init', 'vevida_optimizer_init_plugin' );
     72
     73function vevida_optimizer_send_update_mail() {
     74    wp_mail( get_option( 'admin_email' ),
     75            "Your website was automatically updated",
     76            '' );
     77}
     78if ( get_option( 'vevida_optimizer_send_email') ) {
     79    add_action( 'automatic_updates_complete', 'vevida_optimizer_send_update_mail');
     80//    add_action( 'admin_init', 'vevida_optimizer_send_update_mail' );
     81    add_filter( 'automatic_updates_send_debug_email', '__return_true' );
     82}
     83
    7184
    7285
     
    192205            register_setting( 'vevida_optimizer_settings_group', 'vevida_optimizer_plugin_'.$plugin_slug );
    193206        }
     207       
     208    /** Setting section 3, enable emails after update. **/
     209    add_settings_section(
     210        'vevida_optimizer_settings_section_3',
     211        __( 'Send email notifications', 'vevida-optimizer' ),
     212        'vevida_optimizer_settings_section_3_callback',
     213        'vevida_optimizer_settings'
     214    );   
     215    add_settings_field(
     216        'vevida_optimizer_send_email',
     217        __( 'Enable notifications', 'vevida-optimizer' ),
     218        'vevida_optimizer_checkbox_callback',
     219        'vevida_optimizer_settings',
     220        'vevida_optimizer_settings_section_3',
     221        array (
     222            'vevida_optimizer_send_email',
     223            '' )
     224    );
     225    register_setting( 'vevida_optimizer_settings_group', 'vevida_optimizer_translations_updates' );
     226       
    194227}
    195228add_action( 'admin_init', 'vevida_optimizer_settings_init' );
     
    201234function vevida_optimizer_settings_section_2_callback() {
    202235    echo( __( 'Some plugins require a different update method. Or the plugin simpy breaks as a result of the update. In that case automatic updates for the plugin can be (temporarily) disabled.', 'vevida-optimizer' ) );
     236}
     237function vevida_optimizer_settings_section_3_callback() {
     238    echo( __( 'An email can be sent after each automatic update to notify the site admin ('.get_option( 'admin_email' ).') of the update. This can be useful in troubleshooting the site after an automatic update.', 'vevida-optimizer' ) );
    203239}
    204240function vevida_optimizer_checkbox_callback( $args ) {
Note: See TracChangeset for help on using the changeset viewer.