> */ public static function badge_allowed_html() { return array( 'a' => array( 'href' => true, 'target' => true, 'rel' => true, ), 'img' => array( 'src' => true, 'alt' => true, 'width' => true, 'height' => true, 'style' => true, ), ); } public static function footer_html() { $stored = get_option(self::OPTION_BADGE, array()); if (!is_array($stored) || empty($stored['html']) || !is_string($stored['html'])) { return ''; } return $stored['html']; } /** * @param string $html */ public static function store_footer_badge($html) { $clean = wp_kses((string) $html, self::badge_allowed_html()); if ($clean === '' || strpos($clean, ' $clean), true); return true; } public static function clear_footer_badge() { delete_option(self::OPTION_BADGE); } public static function footer_assets() { if (is_feed() || self::footer_html() === '') { return; } wp_enqueue_style( 'guardbee-footer', plugins_url('assets/footer.css', GUARDBEE_FILE), array(), GUARDBEE_VERSION ); } public static function render_footer() { if (is_admin() || is_feed()) { return; } $html = self::footer_html(); if ($html === '') { return; } echo ''; } }