芝麻web文件管理V1.00
编辑当前文件:/home/mybf1/www/pati.bf1.my/wp-content/plugins/spotlight-social-photo-feeds/src/core/Wp/Notice.php
id = $id; $this->type = $type; $this->dismiss = $dismiss; $this->content = $content; } /** Renders the notice */ public function render(): string { $id = "sli-notice-{$this->id}"; $class = ['sli-notice', 'notice', 'notice-' . $this->type]; if ($this->dismiss) { $class[] = 'is-dismissible'; } return sprintf( '
%s
', esc_attr($id), esc_attr(implode(' ', $class)), esc_attr($this->id), wpautop($this->content) ); } /** Utility method for $dismiss. Useful for creating Notices that simply enable an option when dismissed. */ public static function enableOption(ConfigEntry $entry): callable { return function () use ($entry) { $entry->setValue(1); }; } /** Utility method for $dismiss. Useful for creating Notices that simply disable an option when dismissed. */ public static function disableOption(ConfigEntry $entry): callable { return function () use ($entry) { $entry->setValue(0); }; } }