function estetico_vision_func($atts) { extract(shortcode_atts(array("title" => "", "content_text" => "", "icon" => "", "custom_icon" => null, "content_pull" => null, "page_id" => null), $atts)); if ($content_pull == "current_pages" && $page_id != null) { try { $page = new Page($page_id); $title = !empty($title) ? $title : $page->getTitle(); $content_text = !empty($content_text) ? $content_text : $page->getExcerpt(); } catch (Exception $ex) { } } if ($custom_icon) { $custom_icon = wp_get_attachment_image($custom_icon, array(70, 70), true); $icon = 'custom-icon'; } $output = ''; $output .= '<div class="vision">'; $output .= '<b class="icon rounded ' . $icon . '">' . $custom_icon . '</b>'; $output .= '<h6>' . $title . '</h6>'; $output .= '<p>' . $content_text . '</p>'; $output .= '</div>'; return $output; }