/** * Return general post title * * @param string $title default post title * @global obj $mashsb_meta_tags * * @return string the default post title, shortcode title or custom twitter title */ function mashsb_get_title() { global $post, $mashsb_meta_tags; if (is_singular() && method_exists($mashsb_meta_tags, 'get_og_title')) { $title = $mashsb_meta_tags->get_og_title(); $title = html_entity_decode($title, ENT_QUOTES, 'UTF-8'); $title = urlencode($title); $title = str_replace('#', '%23', $title); $title = esc_html($title); } else { $title = mashsb_get_document_title(); $title = html_entity_decode($title, ENT_QUOTES, 'UTF-8'); $title = urlencode($title); $title = str_replace('#', '%23', $title); $title = esc_html($title); } return apply_filters('mashsb_get_title', $title); }
/** * Get the title * * @return string */ public function get_title() { //return mashsb_get_document_title(); return $this->replace_quote_characters(htmlspecialchars_decode(mashsb_get_document_title())); }