Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-20806

addCoreResources() does not load resources on non-Civi pages in WordPress

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 4.7.16
    • Fix Version/s: None
    • Component/s: WordPress Integration
    • Labels:
      None
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None
    • Funding Source:
      Needs Funding
    • Verified?:
      No

      Description

      The wiki and docs say that you can add Civi resources to any WordPress page by adding CRM_Core_Resources::singleton()->addCoreResources(). This currently has no effect in WordPress pages that lack any other Civi content (shortcodes etc).

      I've tracked it down as far as CRM_Core_Region:render() not firing, because Core_Page->run() doesn't fire. These do fire on a WordPress page with a shortcode. Haven't got any further than this, yet.

      Wiki ref: https://docs.civicrm.org/dev/en/latest/api/usage/

      Issue here: https://civicrm.stackexchange.com/questions/2475/how-do-i-access-the-javascript-api-via-a-wordpress-theme-template

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              krypto Andrew West
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: