Changeset 2210952
- Timestamp:
- 12/12/2019 04:29:34 PM (6 years ago)
- File:
-
- 1 edited
-
the-insertr/trunk/the-insertr.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
the-insertr/trunk/the-insertr.php
r2210699 r2210952 12 12 if (!defined('WPINC')) { 13 13 die('No direct access allowed'); 14 } 15 16 /** 17 * If ACF is enabled add a listener to allow short codes 18 */ 19 if (!class_exists('ACF')) { 20 add_filter('acf/format_value', 'my_acf_format_value'); 21 22 function my_acf_format_value($value, $post_id, $field) { 23 if (!is_array($value)) { 24 $value = do_shortcode($value); 25 } 26 27 return $value; 28 } 29 } 30 31 /** 32 * If Yoast SEO is enabled make sure we can use short codes 33 */ 34 if (is_plugin_active('wordpress-seo/wp-seo.php') || is_plugin_active('wordpress-seo-premium/wp-seo-premium.php')) { 35 add_filter('wpseo_title', 'my_wpseo_title'); 36 37 function my_wpseo_title($title) { 38 return do_shortcode($title); 39 } 14 40 } 15 41
Note: See TracChangeset
for help on using the changeset viewer.