public function description($post_ID = false) { if ($post_ID) { if (!empty($this->opts['twitterCardDesc'])) { $desc = get_post_meta($post_ID, $this->opts['twitterCardDesc'], true); $cardDescription = !empty($desc) ? htmlspecialchars(stripcslashes($desc)) : JM_TC_Utilities::get_excerpt_by_id($post_ID); } elseif (empty($this->opts['twitterCardDesc']) && (class_exists('WPSEO_Frontend') || class_exists('All_in_One_SEO_Pack'))) { $cardDescription = self::get_seo_plugin_datas($post_ID, 'desc'); } else { $cardDescription = JM_TC_Utilities::get_excerpt_by_id($post_ID); } } else { $cardDescription = $this->opts['twitterPostPageDesc']; } $cardDescription = JM_TC_Utilities::remove_lb($cardDescription); return array('description' => apply_filters('jm_tc_get_excerpt', $cardDescription)); }