Plugin Directory

Changeset 2065461


Ignore:
Timestamp:
04/09/2019 02:47:48 AM (7 years ago)
Author:
marcusraket.nu
Message:

Major cleanup of WP_MTPC

File:
1 edited

Legend:

Unmodified
Added
Removed
  • metapic/trunk/classes/WP_MTPC.php

    r2065460 r2065461  
    155155       
    156156        $this->setupFrontendJsOptions();
    157         add_filter( 'wp_kses_allowed_html', function ( $tags, $context ) {
     157        add_filter( 'wp_kses_allowed_html', function ( $tags ) {
    158158            foreach ( $tags as $key => $value ) {
    159159                $tags[ $key ]['data-metapic-id']       = 1;
     
    163163           
    164164            return $tags;
    165         }, 500, 2 );
     165        }, 500, 1 );
    166166    }
    167167   
     
    261261        }, 10 );
    262262       
    263         add_filter( 'tiny_mce_before_init', function ( $mceInit, $editor_id ) {
     263        add_filter( 'tiny_mce_before_init', function ( $mceInit ) {
    264264            $mceInit['mtpc_iframe_url'] = $this->tokenUrl;
    265265            $mceInit['mtpc_plugin_url'] = $this->plugin_url;
     
    272272           
    273273            return $mceInit;
    274         }, 500, 2 );
     274        }, 500, 1 );
    275275       
    276276        // Register new button in the editor
     
    285285       
    286286        add_action( 'admin_enqueue_scripts',
    287           function () use ( $baseUrl, $accessToken, $mce_plugin_name ) {
     287          function () use ( $baseUrl, $accessToken ) {
    288288              $current_screen = get_current_screen();
    289289              $is_gutenberg   = ( method_exists( $current_screen,
Note: See TracChangeset for help on using the changeset viewer.