Skip to content
Snippets Groups Projects
Select Git revision
  • c18ea4cfea250a70ba8af7ed04a9c48ffa7e5c4a
  • master default protected
  • bugfix/wordpress-review
  • fix/duplicate
  • bugfix/get_current_screen_fail
  • feature/dismiss-nonce
  • replace-dodgy-path
  • bugfix/notice-not-show
  • devel
  • 3.3.0
  • 3.2.5
  • 3.2.4
  • 3.2.3
  • 3.2.2
  • 3.2.1
  • 3.2.0
  • 3.2.0-beta7
  • 3.2.0-beta6
  • 3.2.0-beta5
  • 3.2.0-beta4
  • 3.2.0-beta3
  • 3.2.0-beta2
  • 3.2.0-beta1
  • 3.1.4
  • 3.1.4-beta1
  • 3.1.3
  • 3.1.1
  • 3.1
  • 3.0
29 results

admin-head-js.php

Blame
  • Factory.php 1.13 KiB
    <?php
    
    namespace WPDesk\Notice;
    
    /**
     * Class Factory
     *
     * Factory for notices.
     * @package WPDesk\Notice
     */
    class Factory
    {
    
        /**
         * Creates Notice object.
         *
         * @param string $noticeType Notice type.
         * @param string $noticeContent Notice content.
         * @param bool   $isDismissible Is dismissible.
         * @param int    $priority Priority.
         *
         * @return Notice
         */
        public static function notice($noticeContent = '', $noticeType = 'info', $isDismissible = false, $priority = 10)
        {
    error_log(14);
            return new Notice($noticeContent, $noticeType, $isDismissible, $priority);
        }
    
        /**
         * Creates PermanentDismissibleNotice object.
         *
         * @param string $noticeContent
         * @param string $noticeType
         * @param string $noticeName
         * @param int    $priority
         *
         * @return PermanentDismissibleNotice
         */
        public static function permanentDismissibleNotice(
            $noticeContent = '',
            $noticeName = '',
            $noticeType = '',
            $priority = 10
        ) {
            return new PermanentDismissibleNotice($noticeContent, $noticeName, $noticeType, $priority);
        }
    
    }