{"id":6690032,"date":"2015-10-27T16:42:11","date_gmt":"2015-10-27T16:42:11","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/javascript-callbacks-clarification\/"},"modified":"2016-08-30T19:35:03","modified_gmt":"2016-08-30T19:35:03","slug":"javascript-callbacks-clarification","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/javascript-callbacks-clarification\/","title":{"rendered":"Javascript callbacks clarification"},"content":{"rendered":"<p>Trying to get javascript callback working : favorites_after_button_submit, so that I can pop up login modal if user not logged in when they favourite.<\/p>\n<p>Website says to add simple-locator script as dependency.  Do you mean simple-favorites? Neither seems to work.  Can you please share more complete example?<\/p>\n<blockquote>\n<p>Callback Functions<br \/>\nTo use the callback functions in your theme\u2019s scripts, <strong>the simple locator<\/strong> script handle must be added as a dependency when enqueueing your script. <strong>The Simple Locator script handle is simple-locator.<\/strong> See the WordPress Codex for more information about properly enqueuing scripts.<\/p>\n<\/blockquote>\n<p>https:\/\/wordpress.org\/plugins\/favorites\/<\/p>\n","protected":false},"template":"","class_list":["post-6690032","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/6690032","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/6690032\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=6690032"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}