RTMediaAdmin::rtm_addon_license_notice PHP Method

rtm_addon_license_notice() public method

Display invlaid license notice to admins.
Since: 4.1.7
public rtm_addon_license_notice ( ) : void
return void
        function rtm_addon_license_notice()
        {
            if (!empty($_GET['page']) && 'rtmedia-license' === $_GET['page']) {
                $my_account = 'https://rtmedia.io/my-account';
                $license_doc = 'https://rtmedia.io/docs/license/';
                $message = sprintf(__('Your license keys can be found on <a href="%s">my-account</a> page. For more details, please refer to <a href="%s">License documentation</a> page.', 'buddypress-media'), $my_account, $license_doc);
                echo '<div class="notice"><p>' . $message . '</p></div>';
                return;
            }
            $addons = apply_filters('rtmedia_license_tabs', array());
            if (empty($addons)) {
                return;
            }
            $message = '';
            foreach ($addons as $addon) {
                if (empty($addon['args']['status']) || 'valid' !== $addon['args']['status']) {
                    $message = sprintf(__('We found an invalid or expired license key for an rtMedia add-on. Please go to the <a href="%s">Licenses page</a> to fix this issue.', 'buddypress-media'), admin_url('admin.php?page=rtmedia-license'));
                    echo '<div class="error"><p>' . $message . '</p></div>';
                    break;
                }
            }
        }