Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • jRayx

    (@jrayx)

    Hey Tony, in “plugins\optional-content\tinymce_plugin.js” starting on line 46 remove this section of code :

    else if(type == 'user-id'){
    		jQuery(".oc_field").hide();
    		jQuery("#users_grp").show();
    	}

    and then on line 169 that looks like this :

    <option><?php echo $user->user_login . " (" . $user->ID . ")"; ?></option>

    change it to this :

    <option value="<?php echo $user->ID ?>"><?php echo $user->user_login . " (" . $user->ID . ")"; ?></option>

    That should fix that little piece of functionality for you 🙂

    jRayx

    (@jrayx)

    in “optional-content\optional-content.php” around line 160 it looks like this :

    return $content;

    Add this snippet before that line :

    $pattern = "/\[.*\]/";
    
                    if (preg_match($pattern, $content, $matches))
                    {
                        foreach ($matches as $shortcode)
                        {
                            $content = str_replace($shortcode, do_shortcode($shortcode), $content);
                        }
                    }

    So far this works with what i’ve tested. Enjoy 🙂

Viewing 2 replies - 1 through 2 (of 2 total)