Hot answers tagged

3

1) Maybe bind to the api.ready state which may fix having to call your section twice (function($, api){ api.bind( 'ready', function() {... } })(jQuery); I saw a note in trac that said "Note that the APIs for dynamically-added controls, and APIs for JS-templated custom Sections and Panels are not yet available as of WordPress 4.2. See #30741." Reading ...


2

You forgot to set dependencies at third parameter put it with array() or array('jquery') if you want to depend on jQuery wp_register_script( 'navbar-scroll', 'http://www.classyclutter.net/wp-content/themes/foodiepro/assets/js/scrolling-navbar.js', array(), '1.0.0', true);


2

From your site i can say that script is not being loaded because of wrong opening quote for script tag.Use " instead of ” So <script src=”http://lookbook.nu/widget/profile.js?id=2303472&width=standard&align=left&stats_fans=1&fanbox=yes&hash=14575a9cd02fd36d2758e5db3cb92b5a”></script> Should be this <script ...


1

Never let anyone add any jQuery scripts via any text editor. How are you going to know if the script is malicious or not, how are you going to handle jQuery errors, how are you going to know if the jQuery is even proper and allowed jQuery. eval() brings an added extra security risk and should be avoided where user submitted strings are to be evaluated. ...


1

Not allow. Your user is not a software developer, pretending that he is can only end bad. This is even before speaking about security etc. If you think that there are callbacks that make sense, just provide them yourself.


1

You could probably make use of WP built-in notices and create one using JavaScript. jQuery(function($){ $('.wrap > h1').after('<div class="error notice"><p>' + 'Your error message' + '</p></div>'); });



Only top voted, non community-wiki answers of a minimum length are eligible