Skip to content
Snippets Groups Projects
Select Git revision
  • 2109111ba0d284f1b5eb562d743cd92e31886592
  • master default protected
  • fix/deprecated_functions
  • devel
  • feat/translations
  • feat/upgrade_to_pro_url
  • feat/lang
  • bugfix/require-interface
  • bugfix/require-once-error
  • feature/activation-hooks
  • feature/template-loader
  • feature/template-renderer
  • feature/plugin-activation
  • feature/hookable-object
  • feature/builder-pattern
  • 2.1.2
  • 2.1.1
  • 2.1.0
  • 2.0.0
  • 2.0.0-beta1
  • 1.4.4
  • 1.4.3
  • 1.4.2
  • 1.4.1
  • 1.4
  • 1.3.3
  • 1.3.2
  • 1.3.1
  • 1.3.0
  • 1.2.0
  • 1.1
  • 1.0
32 results

HookableParent.php

Blame
  • notice-functions.php 7.51 KiB
    <?php
    
    if (!function_exists('WPDeskInitNoticeAjaxHandler')) {
        /**
         * Init notices AJAX Handler.
         *
         * @param string|null $assetsUrl
         *
         * @return \WPDesk\Notice\AjaxHandler
         */
        function WPDeskInitNoticeAjaxHandler($assetsUrl = null)
        {
            $ajax_handler = new \WPDesk\Notice\AjaxHandler($assetsUrl);
            $ajax_handler->hooks();
            return $ajax_handler;
        }
    }
    
    if (!function_exists('wpdesk_init_notice_ajax_handler')) {
        /**
         * Alias for {@see WPDeskInitNoticeAjaxHandler()} function.
         *
         * @param null $assetsUrl
         *
         * @return \WPDesk\Notice\AjaxHandler
         */
        function wpdesk_init_notice_ajax_handler($assetsUrl = null)
        {
            return WPDeskInitNoticeAjaxHandler($assetsUrl);
        }
    }
    
    if (!function_exists('WPDeskNotice')) {
        /**
         * Creates Notice.
         *
         * @param string $noticeContent Notice content.
         * @param string $noticeType Notice type.
         * @param bool $dismissible Dismissible notice.
         * @param int $priority Notice priority,
         *
         * @return \WPDesk\Notice\Notice
         */
        function WPDeskNotice($noticeContent, $noticeType = 'info', $dismissible = false, $priority = 10)
        {
            return \WPDesk\Notice\Factory::notice($noticeContent, $noticeType, $dismissible, $priority);
        }
    }
    
    if (!function_exists('wpdesk_notice')) {
        /**
         * Creates Notice.
         *
         * Alias for {@see WPDeskNotice()} function.
         *
         * @param string $noticeContent Notice content.
         * @param string $noticeType Notice type.
         * @param bool $dismissible Dismissible notice.
         * @param int $priority Notice priority,
         *
         * @return \WPDesk\Notice\Notice
         */
        function wpdesk_notice($noticeContent, $noticeType = 'info', $dismissible = false, $priority = 10)
        {
            return WPDeskNotice($noticeContent, $noticeType, $dismissible, $priority);
        }
    }
    
    if (!function_exists('WPDeskNoticeInfo')) {
        /**