Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove v6 & v7 deprecated functions and classes #447

Merged
merged 3 commits into from
Aug 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 0 additions & 26 deletions compat/src-deprecated/Abstracts/Notification.php

This file was deleted.

28 changes: 0 additions & 28 deletions compat/src-deprecated/Defaults/Notification/Email.php

This file was deleted.

29 changes: 0 additions & 29 deletions compat/src-deprecated/Defaults/Notification/Webhook.php

This file was deleted.

170 changes: 0 additions & 170 deletions compat/src-deprecated/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,176 +50,6 @@ function notification_deprecated_class( $class, $version, $replacement = null )

}

/**
* Gets the plugin Runtime.
*
* @deprecated 7.0.0 New Notification static class should be used.
* @param string $property Optional property to get.
* @return object Runtime class instance
*/
function notification_runtime( $property = null ) {
_deprecated_function( __FUNCTION__, '7.0.0', '\Notification' );

if ( null !== $property ) {
return Notification::component( $property );
}

return Notification::runtime();
}

/**
* Checks if notification post has been just started
*
* @since 5.0.0
* @deprecated 6.0.0 Changed name for consistency.
* @param mixed $post Post ID or WP_Post.
* @return boolean True if notification has been just started
*/
function notification_is_new_notification( $post ) {
_deprecated_function( __FUNCTION__, '6.0.0', 'notification_post_is_new' );
return notification_post_is_new( $post );
}

/**
* Registers notification
*
* @deprecated 6.0.0 Changed name for consistency.
* @param Interfaces\Sendable $notification Carrier object.
* @return void
*/
function register_notification( Interfaces\Sendable $notification ) {
_deprecated_function( __FUNCTION__, '6.0.0', 'notification_register_carrier' );
notification_register_carrier( $notification );
}

/**
* Gets all registered notifications
*
* @since 5.0.0
* @deprecated 6.0.0 Changed name for consistency.
* @return array notifications
*/
function notification_get_notifications() {
_deprecated_function( __FUNCTION__, '6.0.0', 'notification_get_carriers' );
return notification_get_carriers();
}

/**
* Gets single registered notification
*
* @deprecated 6.0.0 Changed name for consistency.
* @param string $notification_slug notification slug.
* @return mixed notification object or false
*/
function notification_get_single_notification( $notification_slug ) {
_deprecated_function( __FUNCTION__, '6.0.0', 'notification_get_carrier' );
return notification_get_carrier( $notification_slug );
}

/**
* Registers trigger
* Uses notification/triggers filter
*
* @deprecated 6.0.0 Changed name for consistency.
* @param Interfaces\Triggerable $trigger trigger object.
* @return void
*/
function register_trigger( Interfaces\Triggerable $trigger ) {
_deprecated_function( __FUNCTION__, '6.0.0', 'notification_register_trigger' );
notification_register_trigger( $trigger );
}

/**
* Gets single registered recipient for notification type
*
* @since 5.0.0
* @deprecated 6.0.0 Changed name for consistency.
* @param string $carrier_slug Carrier slug.
* @param string $recipient_slug Recipient slug.
* @return mixed Recipient object or false
*/
function notification_get_single_recipient( $carrier_slug, $recipient_slug ) {
_deprecated_function( __FUNCTION__, '6.0.0', 'notification_get_recipient' );
return notification_get_recipient( $carrier_slug, $recipient_slug );
}

/**
* Gets register recipients for notification type
*
* @since 5.0.0
* @deprecated 6.0.0 Changed name for consistency.
* @param string $carrier_slug Carrier slug.
* @return array Recipients array
*/
function notification_get_notification_recipients( $carrier_slug ) {
_deprecated_function( __FUNCTION__, '6.0.0', 'notification_get_carrier_recipients' );
return notification_get_carrier_recipients( $carrier_slug );
}

/**
* Gets single registered trigger
*
* @since 5.0.0
* @deprecated 6.0.0 Changed name for consistency.
* @param string $trigger_slug trigger slug.
* @return mixed trigger object or false
*/
function notification_get_single_trigger( $trigger_slug ) {
_deprecated_function( __FUNCTION__, '6.0.0', 'notification_get_trigger' );
return notification_get_trigger( $trigger_slug );
}

/**
* Registers recipient
* Uses notification/recipients filter
*
* @deprecated 6.0.0 Changed name for consistency.
* @param string $carrier_slug Carrier slug.
* @param Interfaces\Receivable $recipient Recipient object.
* @return void
*/
function register_recipient( $carrier_slug, Interfaces\Receivable $recipient ) {
_deprecated_function( __FUNCTION__, '6.0.0', 'notification_register_recipient' );
notification_register_recipient( $carrier_slug, $recipient );
}

/**
* Adds handlers for doc hooks to an object
*
* @since 5.2.2
* @deprecated 7.0.0 Use `the micropackage/dochooks` package.
* @param object $object Object to create the hooks.
* @return object
*/
function notification_add_doc_hooks( $object ) {
_deprecated_function( __FUNCTION__, '7.0.0' );
return DocHooksHelper::hook( $object );
}

/**
* Checks if the DocHooks are enabled and working.
*
* @since 6.1.0
* @deprecated 7.0.0 Use the `micropackage/dochooks` package.
* @return bool
*/
function notification_dochooks_enabled() {
_deprecated_function( __FUNCTION__, '7.0.0' );
return DocHooksHelper::is_enabled();
}

/**
* Creates new View object.
*
* @since 6.0.0
* @deprecated 7.0.0 Use Templates object.
* @return bool
*/
function notification_create_view() {
_deprecated_function( __FUNCTION__, '7.0.0' );
return false;
}

/**
* Gets cached value or cache object
*
Expand Down
1 change: 1 addition & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ Yes! We're offering a [custom plugin development](https://bracketspace.com/custo

= [Next] =

* [Changed] Removed v6 & v7 deprecated functions
* [Fixed] Shortcodes being uncorrectly stripped leaving closing "]" behind.
* [Fixed] PHP 8.2 deprecations.
* [Changed] Minimum required PHP version from 7.4.
Expand Down
Loading