WordPress.org

Plugin Directory

jetpack

Opened 4 years ago

Closed 3 years ago

#2032 closed enhancement (duplicate)

Likes: change how resources are loaded to allow for defer loading

Reported by: bassjobsen Owned by: tmoorewp
Priority: normal Severity: normal
Plugin: jetpack Keywords: likes
Cc: jeremy+wp@…

Description

In likes.php likes_master() writes lot of javascript which depends on jQuery (and the postmessage class). I didn't find a reason to enqueue this code in the right way.

Suggested solution:

wrap the javascript code in a separate file for example likes/queuehandler.js enqueue this file in
action_init()

wp_enqueue_script( 'queuehandler', plugin_dir_url( __FILE__ ).'likes/queuehandlerjs', array( 'jquery','postmessage' ), '20131107' );


Change History (2)

comment:1 @jeherve4 years ago

  • Cc jeremy+wp@… added
  • Keywords likes added
  • Type changed from defect to enhancement

Related: #2028

comment:2 @jeherve3 years ago

  • Resolution set to duplicate
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.