Privacy protections added in 3.7.0 break direct shortcode calls
-
I have a page-template on my site, that calls do_shortcode([insert_page]). It does this before *any* post has been loaded. The security checks added in 3.7.0 then try to fetch the $parent_post_author_id, which comes back as 0. The user_can call then fails, and $can_read is set to false. This is because there is no active post yet, to check against.
My suggestion is to not check security at all if there is no current global post.
ps: This was added to svn on revision 2614442.
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘Privacy protections added in 3.7.0 break direct shortcode calls’ is closed to new replies.