Plugin Directory

Changeset 2215238


Ignore:
Timestamp:
12/19/2019 04:38:45 PM (6 years ago)
Author:
b3none
Message:

1.1.2 release

Location:
shortcode-enablr
Files:
2 added
1 edited
4 moved

Legend:

Unmodified
Added
Removed
  • shortcode-enablr/tags/1.1.2/shortcode-enablr.php

    r2215237 r2215238  
    66 * Description: Shortcode enabler.
    77 * Author: Herdl
    8  * Version: 1.1.1
     8 * Version: 1.1.2
    99 * Author URI: https://herdl.com
    1010 */
     
    5555
    5656if (get_option('shortcode_enablr_yoast_title_enable') === 'yes') {
    57     if (is_plugin_active('wordpress-seo/wp-seo.php') || is_plugin_active('wordpress-seo-premium/wp-seo-premium.php')) {
    58         add_filter('wpseo_title', 'shortcode_enablr_wpseo_title');
     57    add_filter('wpseo_title', 'shortcode_enablr_wpseo_title');
    5958
    60         function shortcode_enablr_wpseo_title($title)
    61         {
    62             return do_shortcode($title);
    63         }
     59    function shortcode_enablr_wpseo_title($title)
     60    {
     61        return do_shortcode($title);
    6462    }
    6563}
     
    6765add_action('admin_menu', 'shortcode_enablr_register_settings');
    6866add_action('wp_footer', 'shortcode_enablr_render_script');
    69 
  • shortcode-enablr/trunk/shortcode-enablr.php

    r2215175 r2215238  
    66 * Description: Shortcode enabler.
    77 * Author: Herdl
    8  * Version: 1.1.0
     8 * Version: 1.1.2
    99 * Author URI: https://herdl.com
    1010 */
     
    4141
    4242if (get_option('shortcode_enablr_acf_enable') === 'yes') {
    43     add_filter('acf/format_value', 'shortcode_enablr_acf_format_value');
     43    if (!class_exists('ACF')) {
     44        add_filter('acf/format_value', 'shortcode_enablr_acf_format_value');
    4445
    45     function shortcode_enablr_acf_format_value($value, $post_id, $field) {
    46         if (!is_array($value)) {
    47             $value = do_shortcode($value);
     46        function shortcode_enablr_acf_format_value($value, $post_id, $field) {
     47            if (!is_array($value)) {
     48                $value = do_shortcode($value);
     49            }
     50
     51            return $value;
    4852        }
    49 
    50         return $value;
    5153    }
    5254}
     
    5557    add_filter('wpseo_title', 'shortcode_enablr_wpseo_title');
    5658
    57     function shortcode_enablr_wpseo_title($title) {
     59    function shortcode_enablr_wpseo_title($title)
     60    {
    5861        return do_shortcode($title);
    5962    }
Note: See TracChangeset for help on using the changeset viewer.