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

Civi button in WP Editor with depricated calls

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.4.0, 4.4.1, 4.4.2, 4.4.3, 4.4.4, 4.4.5
    • Fix Version/s: 4.6
    • Component/s: WordPress Integration
    • Labels:
      None
    • Documentation Required?:
      None

      Description

      The way the Civi button is being called & used currently is using deprecated functions. We are looking at changes in 3.9 which includes a big TinyMCE update to determine what the best way to make changes to the deprecated call is. For reference the they are: media_buttons_context & thickbox, more documentation here:

      Until some of the bugs are ironed out in on the WP side, it would make sense to wait a to see how the most recent changes affect the wp_editor to determine the best way to update these calls.


      The insert-civi-things button doesn't appear in WP 3.9. Pretty easy to fix in civicrm.php:

      add_action( 'media_buttons_context', array( $this, 'add_form_button' ) );
      becomes:
      add_action( 'media_buttons', array( $this, 'add_form_button' ),21 );

      and in add_form_button():

      return $context . $out;
      becomes
      echo $out;

      I'll try to create a patch (haven't done one before)...

        Attachments

          Activity

            People

            • Assignee:
              tadpole Tadpole Collective
              Reporter:
              krypto Andrew West
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: