Plugin Directory

Changeset 2179618


Ignore:
Timestamp:
10/24/2019 08:17:10 PM (6 years ago)
Author:
clash82
Message:

Fixed issue related to incorrect admin-ajax.php file path when WP is installed in subdirectory, fixed PHP 7.2 deprecations

Location:
wp-lemme-know/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • wp-lemme-know/trunk/assets/js/lemme-know.js

    r1566665 r2179618  
    1616    clash82.LemmeKnow = function (config) {
    1717        this.emailRegexPattern = /^(([^<>()\[\]\.,;:\s@\"]+(\.[^<>()\[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i;
     18
     19        this.adminAjaxUrl = config.adminAjaxUrl || '//'+ window.location.hostname+'/wp-admin/admin-ajax.php';
    1820
    1921        // default CSS classes
     
    9597        }
    9698
    97         xmlHttp.open('POST', '//'+ window.location.hostname+'/wp-admin/admin-ajax.php', true);
     99        xmlHttp.open('POST', this.adminAjaxUrl, true);
    98100        xmlHttp.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
    99101
  • wp-lemme-know/trunk/plugin.php

    r1740284 r2179618  
    55Plugin URI:  https://github.com/clash82/wp-lemme-know
    66Description: Sends e-mail notification for subscribers when a new post is published.
    7 Version:     0.4.0
     7Version:     0.5.0
    88Author:      Rafał Toborek
    99Author URI:  https://toborek.info/about/
  • wp-lemme-know/trunk/readme.txt

    r1740284 r2179618  
    44Tags: notifications, email, newsletter, subscribe2, mailing, smtp
    55Requires at least: 4.6
    6 Tested up to: 4.8.2
     6Tested up to: 5.2.4
    77Requires PHP: 5.4
    88Stable tag: trunk
     
    4646== Changelog ==
    4747
     48= v0.5.0=
     49* fixed: issue related to incorrect admin-ajax.php file path when WP is installed in subdirectory
     50
    4851= v0.4.0 =
    4952* fixed: send notifications only when `post` type content is published,
  • wp-lemme-know/trunk/src/dashboard.php

    r1534536 r2179618  
    1111add_action(
    1212    'wp_dashboard_setup',
    13     create_function('', 'return wp_add_dashboard_widget(
    14         "wp-lemme-know",
    15         "Lemme Know",
    16         "wp_lemme_know_dashboard_callback"
    17     );')
     13    function() {
     14        wp_add_dashboard_widget(
     15            'wp-lemme-know',
     16            'Lemme Know',
     17            'wp_lemme_know_dashboard_callback'
     18        );
     19    }
    1820);
    1921
  • wp-lemme-know/trunk/src/settings.php

    r1740284 r2179618  
    3737add_action(
    3838    'admin_menu',
    39     create_function('', 'return add_options_page(
    40         "Lemme Know",
    41         "Lemme Know",
    42         "manage_options",
    43         "wp-lemme-know",
    44         "wp_lemme_know_options_page"
    45     );')
     39    function() {
     40        return add_options_page(
     41            'Lemme Know',
     42            'Lemme Know',
     43            'manage_options',
     44            'wp-lemme-know',
     45            'wp_lemme_know_options_page'
     46        );
     47    }
    4648);
    4749
  • wp-lemme-know/trunk/src/widget.php

    r1534536 r2179618  
    126126add_action(
    127127    'widgets_init',
    128     create_function('', 'return register_widget(
    129         "WP_LemmeKnowWidget"
    130     );')
     128    function() {
     129        register_widget('WP_LemmeKnowWidget');
     130    }
    131131);
  • wp-lemme-know/trunk/templates/widget.php

    r1566665 r2179618  
    2222    (function() {
    2323        new clash82.LemmeKnow({
     24            adminAjaxUrl: '<?= sprintf('%sadmin-ajax.php', get_admin_url()); ?>',
    2425            widgetId: '<?= $fieldSettings['widget_id']; ?>',
    2526            errorMsg: '<?= $fieldSettings['error_msg']; ?>',
Note: See TracChangeset for help on using the changeset viewer.