Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Major
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.5
-
Fix Version/s: 4.6
-
Component/s: WordPress Integration
-
Labels:None
-
Documentation Required?:None
Description
https://issues.civicrm.org/jira/browse/CRM-14516 discussed two issues:
A) Deprecated Calls being used
B) Expanding where the CiviCRM button that inserts shortcodes to display CiviCRM Pages (Contribution, Event, Profile, User Dashboard and Petition).
This ticket will separate issue B and address it here.
The original patch relied upon the WordPress function get_current_screen and if the base of the screen type was post we inserted the button. This caused the button to appear all custom post types, however if a plugin used the post screen for a different purpose (example Advanced Custom Fields - https://wordpress.org/plugins/advanced-custom-fields/ but others must exist) this can cause conflicts.
In discussions with Tim at the DC Sprint, it seems better to examine the post object using get_post_types and filtering to allow only post types that are both public and publicly search-able,