Plugin Directory

Changeset 2526791


Ignore:
Timestamp:
05/05/2021 05:16:54 PM (5 years ago)
Author:
firetree
Message:

Update to version 1.4.0 from GitHub

Location:
hey-notify
Files:
6 added
24 edited
1 copied

Legend:

Unmodified
Added
Removed
  • hey-notify/tags/1.4.0/assets/js/admin.js

    r2476609 r2526791  
    99  var originalText = e.target.innerHTML;
    1010  e.target.innerHTML = heynotify.messages.running;
     11  e.target.classList.add("updating-message");
    1112  e.target.setAttribute("disabled", "");
    1213
     
    2324    }),
    2425  });
     26  e.target.classList.remove("updating-message");
    2527  if (200 === response.status) {
    2628    e.target.innerHTML = heynotify.messages.done;
     29    e.target.classList.add("updated-message");
    2730  } else {
    2831    e.target.innerHTML = heynotify.messages.error;
     
    3033  setTimeout(function () {
    3134    e.target.innerHTML = originalText;
     35    e.target.classList.remove("updated-message");
    3236    e.target.removeAttribute("disabled");
    3337  }, 3000);
  • hey-notify/tags/1.4.0/hey-notify.php

    r2476609 r2526791  
    44 * Plugin URI: https://heynotifywp.com/
    55 * Description: Get notified when things happen in WordPress.
    6  * Version: 1.3.0
     6 * Version: 1.4.0
    77 * Author: FireTree Design, LLC <info@firetreedesign.com>
    88 * Author URI: https://firetreedesign.com/
    99 * Text Domain: hey-notify
     10 * Domain Path: /languages
    1011 * License:     GPL-2.0+
    1112 * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
     
    1920}
    2021
    21 define( 'HEY_NOTIFY_VERSION', '1.3.0' );
     22define( 'HEY_NOTIFY_VERSION', '1.4.0' );
    2223define( 'HEY_NOTIFY_PLUGIN_FILE', __FILE__ );
    2324define( 'HEY_NOTIFY_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
     
    3536require_once HEY_NOTIFY_PLUGIN_DIR . 'includes/scripts.php';
    3637require_once HEY_NOTIFY_PLUGIN_DIR . 'includes/rest-api.php';
     38require_once HEY_NOTIFY_PLUGIN_DIR . 'includes/languages.php';
    3739
    3840// Events.
     
    4749require_once HEY_NOTIFY_PLUGIN_DIR . 'includes/services/class-slack.php';
    4850require_once HEY_NOTIFY_PLUGIN_DIR . 'includes/services/class-discord.php';
     51require_once HEY_NOTIFY_PLUGIN_DIR . 'includes/services/class-microsoft-teams.php';
    4952require_once HEY_NOTIFY_PLUGIN_DIR . 'includes/services/class-email.php';
  • hey-notify/tags/1.4.0/includes/cpt.php

    r2476609 r2526791  
    187187}
    188188
     189/**
     190 * Render the add-ons page
     191 *
     192 * @return void
     193 */
    189194function addons_page() {
    190195    ?>
  • hey-notify/tags/1.4.0/includes/events/cpt/class-cpt-event.php

    r2466792 r2526791  
    106106            case "{$this->type}_draft":
    107107                add_action( 'auto-draft_to_draft', array( $hook, 'draft' ), 10, 1 );
     108                add_action( 'future_to_draft', array( $hook, 'draft' ), 10, 1 );
     109                add_action( 'new_to_draft', array( $hook, 'draft' ), 10, 1 );
     110                add_action( 'pending_to_draft', array( $hook, 'draft' ), 10, 1 );
     111                add_action( 'private_to_draft', array( $hook, 'draft' ), 10, 1 );
     112                add_action( 'publish_to_draft', array( $hook, 'draft' ), 10, 1 );
     113                add_action( 'trash_to_draft', array( $hook, 'draft' ), 10, 1 );
    108114                break;
    109115            case "{$this->type}_published":
     
    111117                add_action( 'draft_to_publish', array( $hook, 'published' ), 10, 1 );
    112118                add_action( 'future_to_publish', array( $hook, 'published' ), 10, 1 );
     119                add_action( 'new_to_publish', array( $hook, 'published' ), 10, 1 );
    113120                add_action( 'pending_to_publish', array( $hook, 'published' ), 10, 1 );
     121                add_action( 'private_to_publish', array( $hook, 'published' ), 10, 1 );
     122                add_action( 'trash_to_publish', array( $hook, 'published' ), 10, 1 );
    114123                break;
    115124            case "{$this->type}_scheduled":
    116125                add_action( 'auto-draft_to_future', array( $hook, 'scheduled' ), 10, 1 );
    117126                add_action( 'draft_to_future', array( $hook, 'scheduled' ), 10, 1 );
     127                add_action( 'new_to_future', array( $hook, 'scheduled' ), 10, 1 );
     128                add_action( 'pending_to_future', array( $hook, 'scheduled' ), 10, 1 );
     129                add_action( 'private_to_future', array( $hook, 'scheduled' ), 10, 1 );
     130                add_action( 'publish_to_future', array( $hook, 'scheduled' ), 10, 1 );
     131                add_action( 'trash_to_future', array( $hook, 'scheduled' ), 10, 1 );
    118132                break;
    119133            case "{$this->type}_pending":
    120134                add_action( 'auto-draft_to_pending', array( $hook, 'pending' ), 10, 1 );
    121135                add_action( 'draft_to_pending', array( $hook, 'pending' ), 10, 1 );
     136                add_action( 'future_to_pending', array( $hook, 'pending' ), 10, 1 );
     137                add_action( 'new_to_pending', array( $hook, 'pending' ), 10, 1 );
     138                add_action( 'private_to_pending', array( $hook, 'pending' ), 10, 1 );
     139                add_action( 'publish_to_pending', array( $hook, 'pending' ), 10, 1 );
     140                add_action( 'trash_to_pending', array( $hook, 'pending' ), 10, 1 );
    122141                break;
    123142            case "{$this->type}_updated":
  • hey-notify/tags/1.4.0/includes/events/page/class-page-event.php

    r2349284 r2526791  
    7878            case 'page_draft':
    7979                add_action( 'auto-draft_to_draft', array( $hook, 'page_draft' ), 10, 1 );
     80                add_action( 'future_to_draft', array( $hook, 'page_draft' ), 10, 1 );
     81                add_action( 'new_to_draft', array( $hook, 'page_draft' ), 10, 1 );
     82                add_action( 'pending_to_draft', array( $hook, 'page_draft' ), 10, 1 );
     83                add_action( 'private_to_draft', array( $hook, 'page_draft' ), 10, 1 );
     84                add_action( 'publish_to_draft', array( $hook, 'page_draft' ), 10, 1 );
     85                add_action( 'trash_to_draft', array( $hook, 'page_draft' ), 10, 1 );
    8086                break;
    8187            case 'page_published':
     
    8389                add_action( 'draft_to_publish', array( $hook, 'page_published' ), 10, 1 );
    8490                add_action( 'future_to_publish', array( $hook, 'page_published' ), 10, 1 );
     91                add_action( 'new_to_publish', array( $hook, 'page_published' ), 10, 1 );
    8592                add_action( 'pending_to_publish', array( $hook, 'page_published' ), 10, 1 );
     93                add_action( 'private_to_publish', array( $hook, 'page_published' ), 10, 1 );
     94                add_action( 'trash_to_publish', array( $hook, 'page_published' ), 10, 1 );
    8695                break;
    8796            case 'page_scheduled':
    8897                add_action( 'auto-draft_to_future', array( $hook, 'page_scheduled' ), 10, 1 );
    8998                add_action( 'draft_to_future', array( $hook, 'page_scheduled' ), 10, 1 );
     99                add_action( 'new_to_future', array( $hook, 'page_scheduled' ), 10, 1 );
     100                add_action( 'pending_to_future', array( $hook, 'page_scheduled' ), 10, 1 );
     101                add_action( 'private_to_future', array( $hook, 'page_scheduled' ), 10, 1 );
     102                add_action( 'publish_to_future', array( $hook, 'page_scheduled' ), 10, 1 );
     103                add_action( 'trash_to_future', array( $hook, 'page_scheduled' ), 10, 1 );
    90104                break;
    91105            case 'page_pending':
    92106                add_action( 'auto-draft_to_pending', array( $hook, 'page_pending' ), 10, 1 );
    93107                add_action( 'draft_to_pending', array( $hook, 'page_pending' ), 10, 1 );
     108                add_action( 'future_to_pending', array( $hook, 'page_pending' ), 10, 1 );
     109                add_action( 'new_to_pending', array( $hook, 'page_pending' ), 10, 1 );
     110                add_action( 'private_to_pending', array( $hook, 'page_pending' ), 10, 1 );
     111                add_action( 'publish_to_pending', array( $hook, 'page_pending' ), 10, 1 );
     112                add_action( 'trash_to_pending', array( $hook, 'page_pending' ), 10, 1 );
    94113                break;
    95114            case 'page_updated':
  • hey-notify/tags/1.4.0/includes/events/post/class-post-event.php

    r2349284 r2526791  
    7979            case 'post_draft':
    8080                add_action( 'auto-draft_to_draft', array( $hook, 'post_draft' ), 10, 1 );
     81                add_action( 'future_to_draft', array( $hook, 'post_draft' ), 10, 1 );
     82                add_action( 'new_to_draft', array( $hook, 'post_draft' ), 10, 1 );
     83                add_action( 'pending_to_draft', array( $hook, 'post_draft' ), 10, 1 );
     84                add_action( 'private_to_draft', array( $hook, 'post_draft' ), 10, 1 );
     85                add_action( 'publish_to_draft', array( $hook, 'post_draft' ), 10, 1 );
     86                add_action( 'trash_to_draft', array( $hook, 'post_draft' ), 10, 1 );
    8187                break;
    8288            case 'post_published':
     
    8490                add_action( 'draft_to_publish', array( $hook, 'post_published' ), 10, 1 );
    8591                add_action( 'future_to_publish', array( $hook, 'post_published' ), 10, 1 );
     92                add_action( 'new_to_publish', array( $hook, 'post_published' ), 10, 1 );
    8693                add_action( 'pending_to_publish', array( $hook, 'post_published' ), 10, 1 );
     94                add_action( 'private_to_publish', array( $hook, 'post_published' ), 10, 1 );
     95                add_action( 'trash_to_publish', array( $hook, 'post_published' ), 10, 1 );
    8796                break;
    8897            case 'post_scheduled':
    8998                add_action( 'auto-draft_to_future', array( $hook, 'post_scheduled' ), 10, 1 );
    9099                add_action( 'draft_to_future', array( $hook, 'post_scheduled' ), 10, 1 );
     100                add_action( 'new_to_future', array( $hook, 'post_scheduled' ), 10, 1 );
     101                add_action( 'pending_to_future', array( $hook, 'post_scheduled' ), 10, 1 );
     102                add_action( 'private_to_future', array( $hook, 'post_scheduled' ), 10, 1 );
     103                add_action( 'publish_to_future', array( $hook, 'post_scheduled' ), 10, 1 );
     104                add_action( 'trash_to_future', array( $hook, 'post_scheduled' ), 10, 1 );
    91105                break;
    92106            case 'post_pending':
    93107                add_action( 'auto-draft_to_pending', array( $hook, 'post_pending' ), 10, 1 );
    94108                add_action( 'draft_to_pending', array( $hook, 'post_pending' ), 10, 1 );
     109                add_action( 'future_to_pending', array( $hook, 'post_pending' ), 10, 1 );
     110                add_action( 'new_to_pending', array( $hook, 'post_pending' ), 10, 1 );
     111                add_action( 'private_to_pending', array( $hook, 'post_pending' ), 10, 1 );
     112                add_action( 'publish_to_pending', array( $hook, 'post_pending' ), 10, 1 );
     113                add_action( 'trash_to_pending', array( $hook, 'post_pending' ), 10, 1 );
    95114                break;
    96115            case 'post_updated':
  • hey-notify/tags/1.4.0/includes/fields.php

    r2466792 r2526791  
    7676        )
    7777        ->add_tab(
    78             __( 'Uninstall', 'hey-notify' ),
    79             apply_filters( 'hey_notify_settings_uninstall', array() )
    80         )
    81         ->add_tab(
    82             __( 'Licenses', 'hey-notify' ),
    83             apply_filters( 'hey_notify_settings_licenses', array() )
     78            __( 'Custom Post Types', 'hey-notify' ),
     79            apply_filters( 'hey_notify_settings_cpt', array() )
    8480        );
    8581
  • hey-notify/tags/1.4.0/includes/filters.php

    r2476609 r2526791  
    8383
    8484/**
    85  * Settings - Services fields
     85 * Settings - General fields
    8686 *
    8787 * @param array $fields Fields.
     
    9696            ->set_options( get_service_options() )
    9797    );
     98
     99    $fields = settings_cpt_fields( $fields );
     100
     101    if ( has_filter( 'hey_notify_settings_uninstall' ) ) {
     102        $fields = array_merge( $fields, apply_filters( 'hey_notify_settings_uninstall', array() ) );
     103    }
     104
     105    if ( has_filter( 'hey_notify_settings_licenses' ) ) {
     106        $fields[] = (
     107            Field::make( 'separator', 'hey_notify_licenses_separator', __( 'License Keys', 'hey-notify' ) )
     108        );
     109
     110        $fields = array_merge( $fields, apply_filters( 'hey_notify_settings_licenses', array() ) );
     111    }
     112    return $fields;
     113}
     114
     115/**
     116 * Settings - Custom Post Type fields
     117 *
     118 * @param array $fields Fields.
     119 * @return array
     120 */
     121function settings_cpt_fields( $fields = array() ) {
    98122    $fields[] = (
    99123        Field::make( 'separator', 'hey_notify_cpt_separator', __( 'Custom Post Type Settings', 'hey-notify' ) )
     
    109133                sprintf(
    110134                    '<a class="button" id="hey-notify-cpt-refresh">%s</a><span id="hey-notify-cpt-refresh-status"></span>',
    111                     __( 'Refresh Custom Post Types', 'hey-notify' )
     135                    __( 'Refresh custom post types', 'hey-notify' )
    112136                )
    113137            )
  • hey-notify/tags/1.4.0/includes/scripts.php

    r2476609 r2526791  
    5252        array(
    5353            'messages' => array(
    54                 'done'    => __( 'Done Refreshing Custom Post Types', 'hey-notify' ),
    55                 'running' => __( 'Refreshing Custom Post Types...', 'hey-notify' ),
     54                'done'    => __( 'Done refreshing custom post types', 'hey-notify' ),
     55                'running' => __( 'Refreshing custom post types...', 'hey-notify' ),
    5656                'error'   => __( 'Oops, there was an error', 'hey-notify' ),
    5757            ),
  • hey-notify/tags/1.4.0/languages/hey-notify.pot

    r2476609 r2526791  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Hey Notify 1.3.0\n"
     5"Project-Id-Version: Hey Notify 1.4.0\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/hey-notify\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2021-02-17T00:21:28+00:00\n"
     12"POT-Creation-Date: 2021-04-21T17:54:23+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.4.0\n"
     
    103103msgstr ""
    104104
    105 #: includes/cpt.php:201
     105#: includes/cpt.php:206
    106106msgid "Hey Notify Add-ons"
    107107msgstr ""
    108108
    109 #: includes/cpt.php:203
     109#: includes/cpt.php:208
    110110msgid "The following are available add-ons to extend Hey Notify functionality."
    111111msgstr ""
    112112
    113 #: includes/cpt.php:216
     113#: includes/cpt.php:221
    114114msgid "Installed"
    115115msgstr ""
    116116
    117 #: includes/cpt.php:218
     117#: includes/cpt.php:223
    118118msgid "Activate"
    119119msgstr ""
    120120
    121 #: includes/cpt.php:220
     121#: includes/cpt.php:225
    122122msgid "Get this add-on"
    123123msgstr ""
     
    607607
    608608#: includes/fields.php:78
    609 msgid "Uninstall"
    610 msgstr ""
    611 
    612 #: includes/fields.php:82
    613 msgid "Licenses"
     609msgid "Custom Post Types"
    614610msgstr ""
    615611
     
    646642msgstr ""
    647643
    648 #: includes/filters.php:99
     644#: includes/filters.php:107
     645msgid "License Keys"
     646msgstr ""
     647
     648#: includes/filters.php:123
    649649msgid "Custom Post Type Settings"
    650650msgstr ""
    651651
    652 #: includes/filters.php:102
     652#: includes/filters.php:126
    653653msgid "Only display public Custom Post Types"
    654654msgstr ""
    655655
    656 #: includes/filters.php:111
    657 msgid "Refresh Custom Post Types"
     656#: includes/filters.php:135
     657msgid "Refresh custom post types"
    658658msgstr ""
    659659
    660660#: includes/scripts.php:54
    661 msgid "Done Refreshing Custom Post Types"
     661msgid "Done refreshing custom post types"
    662662msgstr ""
    663663
    664664#: includes/scripts.php:55
    665 msgid "Refreshing Custom Post Types..."
     665msgid "Refreshing custom post types..."
    666666msgstr ""
    667667
     
    677677#: includes/services/class-discord.php:79
    678678#: includes/services/class-discord.php:273
     679#: includes/services/class-microsoft-teams.php:81
     680#: includes/services/class-microsoft-teams.php:269
    679681#: includes/services/class-slack.php:81
    680682#: includes/services/class-slack.php:342
     
    689691#: includes/services/class-discord.php:81
    690692#: includes/services/class-discord.php:275
     693#: includes/services/class-microsoft-teams.php:83
     694#: includes/services/class-microsoft-teams.php:271
    691695#: includes/services/class-slack.php:83
    692696#: includes/services/class-slack.php:344
     
    737741msgstr ""
    738742
     743#: includes/services/class-microsoft-teams.php:65
     744#: includes/services/class-microsoft-teams.php:266
     745msgid "Microsoft Teams"
     746msgstr ""
     747
     748#: includes/services/class-microsoft-teams.php:83
     749#: includes/services/class-microsoft-teams.php:271
     750msgid "The webhook that you created for your Microsoft Teams channel."
     751msgstr ""
     752
     753#: includes/services/class-microsoft-teams.php:95
     754#: includes/services/class-microsoft-teams.php:272
     755#: includes/services/class-slack.php:123
     756#: includes/services/class-slack.php:351
     757msgid "Color"
     758msgstr ""
     759
     760#: includes/services/class-microsoft-teams.php:96
     761#: includes/services/class-microsoft-teams.php:273
     762#: includes/services/class-slack.php:124
     763#: includes/services/class-slack.php:352
     764msgid "Select a color to use for the message attachment."
     765msgstr ""
     766
     767#: includes/services/class-microsoft-teams.php:142
     768#: includes/services/class-microsoft-teams.php:143
     769#: includes/services/class-microsoft-teams.php:150
     770msgid "Notification from Hey Notify"
     771msgstr ""
     772
     773#: includes/services/class-microsoft-teams.php:191
     774msgid "View"
     775msgstr ""
     776
     777#: includes/services/class-microsoft-teams.php:268
     778msgid "Default Settings for Microsoft Teams"
     779msgstr ""
     780
    739781#: includes/services/class-slack.php:65
    740782#: includes/services/class-slack.php:339
     
    762804msgstr ""
    763805
    764 #: includes/services/class-slack.php:123
    765 #: includes/services/class-slack.php:351
    766 msgid "Color"
    767 msgstr ""
    768 
    769 #: includes/services/class-slack.php:124
    770 #: includes/services/class-slack.php:352
    771 msgid "Select a color to use for the message attachment."
    772 msgstr ""
    773 
    774806#: includes/services/class-slack.php:237
    775807msgid "Attached image"
  • hey-notify/tags/1.4.0/readme.md

    r2476609 r2526791  
    1111- Slack
    1212- Discord
     13- Microsoft Teams
    1314- Email
    1415
  • hey-notify/tags/1.4.0/readme.txt

    r2476609 r2526791  
    33Tags: notifications, slack, discord, email, ninja forms, gravity forms
    44Requires at least: 4.3
    5 Tested up to: 5.6
     5Tested up to: 5.7
    66Requires PHP: 5.3
    7 Stable tag: 1.3.0
     7Stable tag: 1.4.0
    88License: GPLv2 or later
    99License URI: http://ww.gnu.org/licenses/gpl-2.0.html
     
    1919* Slack
    2020* Discord
     21* Microsoft Teams
    2122* Email
    2223
     
    7475== Changelog ==
    7576
     77= 1.4.0 =
     78* Added support for Microsoft Teams.
     79* Improved the type of status changes than can be detected for Posts, Pages, and Custom Post Types.
     80* Reorganized the Settings page.
     81
    7682= 1.3.0 =
    7783* Added default settings for Slack and Discord.
  • hey-notify/trunk/assets/js/admin.js

    r2476609 r2526791  
    99  var originalText = e.target.innerHTML;
    1010  e.target.innerHTML = heynotify.messages.running;
     11  e.target.classList.add("updating-message");
    1112  e.target.setAttribute("disabled", "");
    1213
     
    2324    }),
    2425  });
     26  e.target.classList.remove("updating-message");
    2527  if (200 === response.status) {
    2628    e.target.innerHTML = heynotify.messages.done;
     29    e.target.classList.add("updated-message");
    2730  } else {
    2831    e.target.innerHTML = heynotify.messages.error;
     
    3033  setTimeout(function () {
    3134    e.target.innerHTML = originalText;
     35    e.target.classList.remove("updated-message");
    3236    e.target.removeAttribute("disabled");
    3337  }, 3000);
  • hey-notify/trunk/hey-notify.php

    r2476609 r2526791  
    44 * Plugin URI: https://heynotifywp.com/
    55 * Description: Get notified when things happen in WordPress.
    6  * Version: 1.3.0
     6 * Version: 1.4.0
    77 * Author: FireTree Design, LLC <info@firetreedesign.com>
    88 * Author URI: https://firetreedesign.com/
    99 * Text Domain: hey-notify
     10 * Domain Path: /languages
    1011 * License:     GPL-2.0+
    1112 * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
     
    1920}
    2021
    21 define( 'HEY_NOTIFY_VERSION', '1.3.0' );
     22define( 'HEY_NOTIFY_VERSION', '1.4.0' );
    2223define( 'HEY_NOTIFY_PLUGIN_FILE', __FILE__ );
    2324define( 'HEY_NOTIFY_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
     
    3536require_once HEY_NOTIFY_PLUGIN_DIR . 'includes/scripts.php';
    3637require_once HEY_NOTIFY_PLUGIN_DIR . 'includes/rest-api.php';
     38require_once HEY_NOTIFY_PLUGIN_DIR . 'includes/languages.php';
    3739
    3840// Events.
     
    4749require_once HEY_NOTIFY_PLUGIN_DIR . 'includes/services/class-slack.php';
    4850require_once HEY_NOTIFY_PLUGIN_DIR . 'includes/services/class-discord.php';
     51require_once HEY_NOTIFY_PLUGIN_DIR . 'includes/services/class-microsoft-teams.php';
    4952require_once HEY_NOTIFY_PLUGIN_DIR . 'includes/services/class-email.php';
  • hey-notify/trunk/includes/cpt.php

    r2476609 r2526791  
    187187}
    188188
     189/**
     190 * Render the add-ons page
     191 *
     192 * @return void
     193 */
    189194function addons_page() {
    190195    ?>
  • hey-notify/trunk/includes/events/cpt/class-cpt-event.php

    r2466792 r2526791  
    106106            case "{$this->type}_draft":
    107107                add_action( 'auto-draft_to_draft', array( $hook, 'draft' ), 10, 1 );
     108                add_action( 'future_to_draft', array( $hook, 'draft' ), 10, 1 );
     109                add_action( 'new_to_draft', array( $hook, 'draft' ), 10, 1 );
     110                add_action( 'pending_to_draft', array( $hook, 'draft' ), 10, 1 );
     111                add_action( 'private_to_draft', array( $hook, 'draft' ), 10, 1 );
     112                add_action( 'publish_to_draft', array( $hook, 'draft' ), 10, 1 );
     113                add_action( 'trash_to_draft', array( $hook, 'draft' ), 10, 1 );
    108114                break;
    109115            case "{$this->type}_published":
     
    111117                add_action( 'draft_to_publish', array( $hook, 'published' ), 10, 1 );
    112118                add_action( 'future_to_publish', array( $hook, 'published' ), 10, 1 );
     119                add_action( 'new_to_publish', array( $hook, 'published' ), 10, 1 );
    113120                add_action( 'pending_to_publish', array( $hook, 'published' ), 10, 1 );
     121                add_action( 'private_to_publish', array( $hook, 'published' ), 10, 1 );
     122                add_action( 'trash_to_publish', array( $hook, 'published' ), 10, 1 );
    114123                break;
    115124            case "{$this->type}_scheduled":
    116125                add_action( 'auto-draft_to_future', array( $hook, 'scheduled' ), 10, 1 );
    117126                add_action( 'draft_to_future', array( $hook, 'scheduled' ), 10, 1 );
     127                add_action( 'new_to_future', array( $hook, 'scheduled' ), 10, 1 );
     128                add_action( 'pending_to_future', array( $hook, 'scheduled' ), 10, 1 );
     129                add_action( 'private_to_future', array( $hook, 'scheduled' ), 10, 1 );
     130                add_action( 'publish_to_future', array( $hook, 'scheduled' ), 10, 1 );
     131                add_action( 'trash_to_future', array( $hook, 'scheduled' ), 10, 1 );
    118132                break;
    119133            case "{$this->type}_pending":
    120134                add_action( 'auto-draft_to_pending', array( $hook, 'pending' ), 10, 1 );
    121135                add_action( 'draft_to_pending', array( $hook, 'pending' ), 10, 1 );
     136                add_action( 'future_to_pending', array( $hook, 'pending' ), 10, 1 );
     137                add_action( 'new_to_pending', array( $hook, 'pending' ), 10, 1 );
     138                add_action( 'private_to_pending', array( $hook, 'pending' ), 10, 1 );
     139                add_action( 'publish_to_pending', array( $hook, 'pending' ), 10, 1 );
     140                add_action( 'trash_to_pending', array( $hook, 'pending' ), 10, 1 );
    122141                break;
    123142            case "{$this->type}_updated":
  • hey-notify/trunk/includes/events/page/class-page-event.php

    r2349284 r2526791  
    7878            case 'page_draft':
    7979                add_action( 'auto-draft_to_draft', array( $hook, 'page_draft' ), 10, 1 );
     80                add_action( 'future_to_draft', array( $hook, 'page_draft' ), 10, 1 );
     81                add_action( 'new_to_draft', array( $hook, 'page_draft' ), 10, 1 );
     82                add_action( 'pending_to_draft', array( $hook, 'page_draft' ), 10, 1 );
     83                add_action( 'private_to_draft', array( $hook, 'page_draft' ), 10, 1 );
     84                add_action( 'publish_to_draft', array( $hook, 'page_draft' ), 10, 1 );
     85                add_action( 'trash_to_draft', array( $hook, 'page_draft' ), 10, 1 );
    8086                break;
    8187            case 'page_published':
     
    8389                add_action( 'draft_to_publish', array( $hook, 'page_published' ), 10, 1 );
    8490                add_action( 'future_to_publish', array( $hook, 'page_published' ), 10, 1 );
     91                add_action( 'new_to_publish', array( $hook, 'page_published' ), 10, 1 );
    8592                add_action( 'pending_to_publish', array( $hook, 'page_published' ), 10, 1 );
     93                add_action( 'private_to_publish', array( $hook, 'page_published' ), 10, 1 );
     94                add_action( 'trash_to_publish', array( $hook, 'page_published' ), 10, 1 );
    8695                break;
    8796            case 'page_scheduled':
    8897                add_action( 'auto-draft_to_future', array( $hook, 'page_scheduled' ), 10, 1 );
    8998                add_action( 'draft_to_future', array( $hook, 'page_scheduled' ), 10, 1 );
     99                add_action( 'new_to_future', array( $hook, 'page_scheduled' ), 10, 1 );
     100                add_action( 'pending_to_future', array( $hook, 'page_scheduled' ), 10, 1 );
     101                add_action( 'private_to_future', array( $hook, 'page_scheduled' ), 10, 1 );
     102                add_action( 'publish_to_future', array( $hook, 'page_scheduled' ), 10, 1 );
     103                add_action( 'trash_to_future', array( $hook, 'page_scheduled' ), 10, 1 );
    90104                break;
    91105            case 'page_pending':
    92106                add_action( 'auto-draft_to_pending', array( $hook, 'page_pending' ), 10, 1 );
    93107                add_action( 'draft_to_pending', array( $hook, 'page_pending' ), 10, 1 );
     108                add_action( 'future_to_pending', array( $hook, 'page_pending' ), 10, 1 );
     109                add_action( 'new_to_pending', array( $hook, 'page_pending' ), 10, 1 );
     110                add_action( 'private_to_pending', array( $hook, 'page_pending' ), 10, 1 );
     111                add_action( 'publish_to_pending', array( $hook, 'page_pending' ), 10, 1 );
     112                add_action( 'trash_to_pending', array( $hook, 'page_pending' ), 10, 1 );
    94113                break;
    95114            case 'page_updated':
  • hey-notify/trunk/includes/events/post/class-post-event.php

    r2349284 r2526791  
    7979            case 'post_draft':
    8080                add_action( 'auto-draft_to_draft', array( $hook, 'post_draft' ), 10, 1 );
     81                add_action( 'future_to_draft', array( $hook, 'post_draft' ), 10, 1 );
     82                add_action( 'new_to_draft', array( $hook, 'post_draft' ), 10, 1 );
     83                add_action( 'pending_to_draft', array( $hook, 'post_draft' ), 10, 1 );
     84                add_action( 'private_to_draft', array( $hook, 'post_draft' ), 10, 1 );
     85                add_action( 'publish_to_draft', array( $hook, 'post_draft' ), 10, 1 );
     86                add_action( 'trash_to_draft', array( $hook, 'post_draft' ), 10, 1 );
    8187                break;
    8288            case 'post_published':
     
    8490                add_action( 'draft_to_publish', array( $hook, 'post_published' ), 10, 1 );
    8591                add_action( 'future_to_publish', array( $hook, 'post_published' ), 10, 1 );
     92                add_action( 'new_to_publish', array( $hook, 'post_published' ), 10, 1 );
    8693                add_action( 'pending_to_publish', array( $hook, 'post_published' ), 10, 1 );
     94                add_action( 'private_to_publish', array( $hook, 'post_published' ), 10, 1 );
     95                add_action( 'trash_to_publish', array( $hook, 'post_published' ), 10, 1 );
    8796                break;
    8897            case 'post_scheduled':
    8998                add_action( 'auto-draft_to_future', array( $hook, 'post_scheduled' ), 10, 1 );
    9099                add_action( 'draft_to_future', array( $hook, 'post_scheduled' ), 10, 1 );
     100                add_action( 'new_to_future', array( $hook, 'post_scheduled' ), 10, 1 );
     101                add_action( 'pending_to_future', array( $hook, 'post_scheduled' ), 10, 1 );
     102                add_action( 'private_to_future', array( $hook, 'post_scheduled' ), 10, 1 );
     103                add_action( 'publish_to_future', array( $hook, 'post_scheduled' ), 10, 1 );
     104                add_action( 'trash_to_future', array( $hook, 'post_scheduled' ), 10, 1 );
    91105                break;
    92106            case 'post_pending':
    93107                add_action( 'auto-draft_to_pending', array( $hook, 'post_pending' ), 10, 1 );
    94108                add_action( 'draft_to_pending', array( $hook, 'post_pending' ), 10, 1 );
     109                add_action( 'future_to_pending', array( $hook, 'post_pending' ), 10, 1 );
     110                add_action( 'new_to_pending', array( $hook, 'post_pending' ), 10, 1 );
     111                add_action( 'private_to_pending', array( $hook, 'post_pending' ), 10, 1 );
     112                add_action( 'publish_to_pending', array( $hook, 'post_pending' ), 10, 1 );
     113                add_action( 'trash_to_pending', array( $hook, 'post_pending' ), 10, 1 );
    95114                break;
    96115            case 'post_updated':
  • hey-notify/trunk/includes/fields.php

    r2466792 r2526791  
    7676        )
    7777        ->add_tab(
    78             __( 'Uninstall', 'hey-notify' ),
    79             apply_filters( 'hey_notify_settings_uninstall', array() )
    80         )
    81         ->add_tab(
    82             __( 'Licenses', 'hey-notify' ),
    83             apply_filters( 'hey_notify_settings_licenses', array() )
     78            __( 'Custom Post Types', 'hey-notify' ),
     79            apply_filters( 'hey_notify_settings_cpt', array() )
    8480        );
    8581
  • hey-notify/trunk/includes/filters.php

    r2476609 r2526791  
    8383
    8484/**
    85  * Settings - Services fields
     85 * Settings - General fields
    8686 *
    8787 * @param array $fields Fields.
     
    9696            ->set_options( get_service_options() )
    9797    );
     98
     99    $fields = settings_cpt_fields( $fields );
     100
     101    if ( has_filter( 'hey_notify_settings_uninstall' ) ) {
     102        $fields = array_merge( $fields, apply_filters( 'hey_notify_settings_uninstall', array() ) );
     103    }
     104
     105    if ( has_filter( 'hey_notify_settings_licenses' ) ) {
     106        $fields[] = (
     107            Field::make( 'separator', 'hey_notify_licenses_separator', __( 'License Keys', 'hey-notify' ) )
     108        );
     109
     110        $fields = array_merge( $fields, apply_filters( 'hey_notify_settings_licenses', array() ) );
     111    }
     112    return $fields;
     113}
     114
     115/**
     116 * Settings - Custom Post Type fields
     117 *
     118 * @param array $fields Fields.
     119 * @return array
     120 */
     121function settings_cpt_fields( $fields = array() ) {
    98122    $fields[] = (
    99123        Field::make( 'separator', 'hey_notify_cpt_separator', __( 'Custom Post Type Settings', 'hey-notify' ) )
     
    109133                sprintf(
    110134                    '<a class="button" id="hey-notify-cpt-refresh">%s</a><span id="hey-notify-cpt-refresh-status"></span>',
    111                     __( 'Refresh Custom Post Types', 'hey-notify' )
     135                    __( 'Refresh custom post types', 'hey-notify' )
    112136                )
    113137            )
  • hey-notify/trunk/includes/scripts.php

    r2476609 r2526791  
    5252        array(
    5353            'messages' => array(
    54                 'done'    => __( 'Done Refreshing Custom Post Types', 'hey-notify' ),
    55                 'running' => __( 'Refreshing Custom Post Types...', 'hey-notify' ),
     54                'done'    => __( 'Done refreshing custom post types', 'hey-notify' ),
     55                'running' => __( 'Refreshing custom post types...', 'hey-notify' ),
    5656                'error'   => __( 'Oops, there was an error', 'hey-notify' ),
    5757            ),
  • hey-notify/trunk/languages/hey-notify.pot

    r2476609 r2526791  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Hey Notify 1.3.0\n"
     5"Project-Id-Version: Hey Notify 1.4.0\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/hey-notify\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2021-02-17T00:21:28+00:00\n"
     12"POT-Creation-Date: 2021-04-21T17:54:23+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.4.0\n"
     
    103103msgstr ""
    104104
    105 #: includes/cpt.php:201
     105#: includes/cpt.php:206
    106106msgid "Hey Notify Add-ons"
    107107msgstr ""
    108108
    109 #: includes/cpt.php:203
     109#: includes/cpt.php:208
    110110msgid "The following are available add-ons to extend Hey Notify functionality."
    111111msgstr ""
    112112
    113 #: includes/cpt.php:216
     113#: includes/cpt.php:221
    114114msgid "Installed"
    115115msgstr ""
    116116
    117 #: includes/cpt.php:218
     117#: includes/cpt.php:223
    118118msgid "Activate"
    119119msgstr ""
    120120
    121 #: includes/cpt.php:220
     121#: includes/cpt.php:225
    122122msgid "Get this add-on"
    123123msgstr ""
     
    607607
    608608#: includes/fields.php:78
    609 msgid "Uninstall"
    610 msgstr ""
    611 
    612 #: includes/fields.php:82
    613 msgid "Licenses"
     609msgid "Custom Post Types"
    614610msgstr ""
    615611
     
    646642msgstr ""
    647643
    648 #: includes/filters.php:99
     644#: includes/filters.php:107
     645msgid "License Keys"
     646msgstr ""
     647
     648#: includes/filters.php:123
    649649msgid "Custom Post Type Settings"
    650650msgstr ""
    651651
    652 #: includes/filters.php:102
     652#: includes/filters.php:126
    653653msgid "Only display public Custom Post Types"
    654654msgstr ""
    655655
    656 #: includes/filters.php:111
    657 msgid "Refresh Custom Post Types"
     656#: includes/filters.php:135
     657msgid "Refresh custom post types"
    658658msgstr ""
    659659
    660660#: includes/scripts.php:54
    661 msgid "Done Refreshing Custom Post Types"
     661msgid "Done refreshing custom post types"
    662662msgstr ""
    663663
    664664#: includes/scripts.php:55
    665 msgid "Refreshing Custom Post Types..."
     665msgid "Refreshing custom post types..."
    666666msgstr ""
    667667
     
    677677#: includes/services/class-discord.php:79
    678678#: includes/services/class-discord.php:273
     679#: includes/services/class-microsoft-teams.php:81
     680#: includes/services/class-microsoft-teams.php:269
    679681#: includes/services/class-slack.php:81
    680682#: includes/services/class-slack.php:342
     
    689691#: includes/services/class-discord.php:81
    690692#: includes/services/class-discord.php:275
     693#: includes/services/class-microsoft-teams.php:83
     694#: includes/services/class-microsoft-teams.php:271
    691695#: includes/services/class-slack.php:83
    692696#: includes/services/class-slack.php:344
     
    737741msgstr ""
    738742
     743#: includes/services/class-microsoft-teams.php:65
     744#: includes/services/class-microsoft-teams.php:266
     745msgid "Microsoft Teams"
     746msgstr ""
     747
     748#: includes/services/class-microsoft-teams.php:83
     749#: includes/services/class-microsoft-teams.php:271
     750msgid "The webhook that you created for your Microsoft Teams channel."
     751msgstr ""
     752
     753#: includes/services/class-microsoft-teams.php:95
     754#: includes/services/class-microsoft-teams.php:272
     755#: includes/services/class-slack.php:123
     756#: includes/services/class-slack.php:351
     757msgid "Color"
     758msgstr ""
     759
     760#: includes/services/class-microsoft-teams.php:96
     761#: includes/services/class-microsoft-teams.php:273
     762#: includes/services/class-slack.php:124
     763#: includes/services/class-slack.php:352
     764msgid "Select a color to use for the message attachment."
     765msgstr ""
     766
     767#: includes/services/class-microsoft-teams.php:142
     768#: includes/services/class-microsoft-teams.php:143
     769#: includes/services/class-microsoft-teams.php:150
     770msgid "Notification from Hey Notify"
     771msgstr ""
     772
     773#: includes/services/class-microsoft-teams.php:191
     774msgid "View"
     775msgstr ""
     776
     777#: includes/services/class-microsoft-teams.php:268
     778msgid "Default Settings for Microsoft Teams"
     779msgstr ""
     780
    739781#: includes/services/class-slack.php:65
    740782#: includes/services/class-slack.php:339
     
    762804msgstr ""
    763805
    764 #: includes/services/class-slack.php:123
    765 #: includes/services/class-slack.php:351
    766 msgid "Color"
    767 msgstr ""
    768 
    769 #: includes/services/class-slack.php:124
    770 #: includes/services/class-slack.php:352
    771 msgid "Select a color to use for the message attachment."
    772 msgstr ""
    773 
    774806#: includes/services/class-slack.php:237
    775807msgid "Attached image"
  • hey-notify/trunk/readme.md

    r2476609 r2526791  
    1111- Slack
    1212- Discord
     13- Microsoft Teams
    1314- Email
    1415
  • hey-notify/trunk/readme.txt

    r2476609 r2526791  
    33Tags: notifications, slack, discord, email, ninja forms, gravity forms
    44Requires at least: 4.3
    5 Tested up to: 5.6
     5Tested up to: 5.7
    66Requires PHP: 5.3
    7 Stable tag: 1.3.0
     7Stable tag: 1.4.0
    88License: GPLv2 or later
    99License URI: http://ww.gnu.org/licenses/gpl-2.0.html
     
    1919* Slack
    2020* Discord
     21* Microsoft Teams
    2122* Email
    2223
     
    7475== Changelog ==
    7576
     77= 1.4.0 =
     78* Added support for Microsoft Teams.
     79* Improved the type of status changes than can be detected for Posts, Pages, and Custom Post Types.
     80* Reorganized the Settings page.
     81
    7682= 1.3.0 =
    7783* Added default settings for Slack and Discord.
Note: See TracChangeset for help on using the changeset viewer.