/** * Return twitter custom title * * @return string the custom twitter title */ function mashsb_get_twitter_title() { if (function_exists('MASHOG')) { $title = MASHOG()->MASHOG_OG_Output->_get_tw_title(); $title = html_entity_decode($title, ENT_QUOTES, 'UTF-8'); $title = urlencode($title); $title = str_replace('#', '%23', $title); $title = esc_html($title); $title = str_replace('+', '%20', $title); } else { $title = mashsb_get_title(); $title = str_replace('+', '%20', $title); } return $title; }
function mashsharer() { global $content; global $atts; //global $url; //global $title; global $post; global $wp; //is_singular() ? $url = urlencode(home_url( $wp->request )) : $url = urlencode(get_permalink($post->ID)); $url = mashsb_get_url(); function_exists('MASHOG') ? $title = MASHOG()->MASHOG_OG_Output->_get_title() : ($title = the_title_attribute('echo=0')); //$title = html_entity_decode(the_title_attribute('echo=0'), ENT_QUOTES, 'UTF-8'); $title = html_entity_decode($title, ENT_QUOTES, 'UTF-8'); $title = urlencode($title); $title = str_replace('#', '%23', $title); $title = esc_html($title); echo mashshareShow($atts, '', $url, $title); }