Fix/remove jquery by DavidCramer · Pull Request #656 · cloudinary/cloudinary_wordpress

pereirinha

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


$out[] = '</div>';
if ( ! function_exists( 'use_block_editor_for_post' ) || ! use_block_editor_for_post( $post ) ) {
wp_enqueue_script( 'term-ordering', $this->media->plugin->dir_url . '/js/classic-editor.js', array(), $this->media->plugin->version, true );

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DavidCramer
Since we are changing the script variable name inside, from TermsOrder to something more abstract like ClassicEditor, perhaps we can find a more abstract slug?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/* global wpAjax */

const TermsOrder = {
const ClassicEditor = {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DavidCramer

There are still many references to jQuery in this script.
Can't we remove them?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pereirinha Oops, I messed some 🤦 - forgot about the jQuery over the $