| @@ -15,29 +15,13 @@ | ||
| 15 | 15 | |
| 16 | 16 | function sh_cd_render_shortcode_from_db($slug) |
| 17 | 17 | { |
| 18 | 18 | if ($slug != false && !empty($slug)) |
| 19 | - { | |
| 20 | - $cached_shortcode = sh_cd_get_cache($slug); | |
| 19 | + { | |
| 20 | + $shortcode = sh_cd_get_shortcode_by_slug($slug); | |
| 21 | 21 | |
| 22 | - if ($cached_shortcode != false) | |
| 23 | - { | |
| 24 | - // Process other shortcodes | |
| 25 | - $cached_shortcode = do_shortcode($cached_shortcode); | |
| 26 | - | |
| 27 | - return $cached_shortcode; | |
| 28 | - } | |
| 29 | - else | |
| 22 | + if ($shortcode) | |
| 30 | 23 | { |
| 31 | - $shortcode = sh_cd_get_shortcode_by_slug($slug); | |
| 32 | - | |
| 33 | - if ($shortcode) | |
| 34 | - { | |
| 35 | - sh_cd_set_cache($slug, $shortcode); | |
| 36 | - | |
| 37 | - $shortcode = do_shortcode($shortcode); | |
| 38 | - | |
| 39 | - return $shortcode; | |
| 40 | - } | |
| 24 | + return $shortcode; | |
| 41 | 25 | } |
| 42 | 26 | } |
| 43 | 27 | } |