/** * Return attributes to shortcode string. * * @since 1.0.0 * @access public * @param array $atts * @param string $content * @return string */ public static function to_shortcode($sc_name, $atts, $content = null, $enclosed = true) { $shortcode = sprintf('[%s', $sc_name); $shortcode .= count($atts) > 0 ? TF_Model::parse_attr($atts) : ''; $shortcode .= ']'; $shortcode .= $enclosed ? $content . sprintf('[/%s]', $sc_name) : ''; return $shortcode; }