Title: Jonas's Replies | WordPress.org

---

# Jonas

  [  ](https://wordpress.org/support/users/ropaeh/)

 *   [Profile](https://wordpress.org/support/users/ropaeh/)
 *   [Topics Started](https://wordpress.org/support/users/ropaeh/topics/)
 *   [Replies Created](https://wordpress.org/support/users/ropaeh/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/ropaeh/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/ropaeh/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/ropaeh/engagements/)
 *   [Favorites](https://wordpress.org/support/users/ropaeh/favorites/)

 Search replies:

## Forum Replies Created

Viewing 9 replies - 1 through 9 (of 9 total)

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [nonce parameter in enqueued js-tag for CSP](https://wordpress.org/support/topic/nonce-parameter-in-enqueued-js-tag-for-csp/)
 *  Thread Starter [Jonas](https://wordpress.org/support/users/ropaeh/)
 * (@ropaeh)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/nonce-parameter-in-enqueued-js-tag-for-csp/#post-8562810)
 * [@jamesspi](https://wordpress.org/support/users/jamesspi/) sure!
 * > Can I ask how you inserted the nonces into your CSP from here?
 * That’s the next problem i’m facing right now. Because the wp_create_nonce() function
   depends on the time of the day, it changes every now and then. I’m thinking of
   writing all generated nonces in an array and adding them to the CSP via php’s
   header function. But i haven’t tried it so far.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [nonce parameter in enqueued js-tag for CSP](https://wordpress.org/support/topic/nonce-parameter-in-enqueued-js-tag-for-csp/)
 *  Thread Starter [Jonas](https://wordpress.org/support/users/ropaeh/)
 * (@ropaeh)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/nonce-parameter-in-enqueued-js-tag-for-csp/#post-8395995)
 * I actually found a quite simple way to do this.
    It’s possible via the “script_loader_tag”
   hook and a filter function.
 * The following code adds a nonce attribute, generated with the handle, to every
   enqueued script.
 *     ```
       /** Add Nonce Attribute To Javascript **/
   
       function add_nonce_attr( $tag, $handle, $src ) {
   
       	return '<script type="text/javascript" nonce="'.wp_create_nonce( $handle ).'" src="'.$src.'"></script>'."\n";
   
       }
   
       add_filter( 'script_loader_tag', 'add_nonce_attr', 10, 3 );
       ```
   
 * Note: the “script_loader_tag” hook is only available since Version 4.1.0
    -  This reply was modified 9 years, 6 months ago by [Jonas](https://wordpress.org/support/users/ropaeh/).
    -  This reply was modified 9 years, 6 months ago by [Jonas](https://wordpress.org/support/users/ropaeh/).
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [nonce parameter in enqueued js-tag for CSP](https://wordpress.org/support/topic/nonce-parameter-in-enqueued-js-tag-for-csp/)
 *  Thread Starter [Jonas](https://wordpress.org/support/users/ropaeh/)
 * (@ropaeh)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/nonce-parameter-in-enqueued-js-tag-for-csp/#post-8362994)
 * Hey, unfortunately it didn’t really help me.
    wp_localize_script allows me, as
   i understood it, to pass variables from php to js. But i actually really just
   need a hook or function or whatever that enqueues a js script in the proper way
   and outputs it like `<script nonce="herecomesthenonce" src="source"></script>`
   but so far i wasn’t able to get the nonce in there..
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [How to move media files from library back to computer?](https://wordpress.org/support/topic/how-to-move-media-files-from-library-back-to-computer/)
 *  [Jonas](https://wordpress.org/support/users/ropaeh/)
 * (@ropaeh)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/how-to-move-media-files-from-library-back-to-computer/#post-8312046)
 * You could just go to the image file in your browser and download them.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[jQuery Maximage] Wish I could find something that works!](https://wordpress.org/support/topic/wish-i-could-find-something-that-works/)
 *  Plugin Author [Jonas](https://wordpress.org/support/users/ropaeh/)
 * (@ropaeh)
 * [10 years ago](https://wordpress.org/support/topic/wish-i-could-find-something-that-works/#post-7291413)
 * Sorry i can’t reconstruct your error. Maybe your download is corrupt or something
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[jQuery Maximage] Speed](https://wordpress.org/support/topic/speed-17/)
 *  Plugin Author [Jonas](https://wordpress.org/support/users/ropaeh/)
 * (@ropaeh)
 * [10 years ago](https://wordpress.org/support/topic/speed-17/#post-6590823)
 * Hey sorry i’m answering so late.
 * I’ll have a look at it asap, haven’t got that problem yet.
 * But i’ll get back to you as soon as i’ve found the error.
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [WP Plugin won't create tables in Database](https://wordpress.org/support/topic/wp-plugin-wont-create-tables-in-database/)
 *  Thread Starter [Jonas](https://wordpress.org/support/users/ropaeh/)
 * (@ropaeh)
 * [10 years, 12 months ago](https://wordpress.org/support/topic/wp-plugin-wont-create-tables-in-database/#post-6149671)
 * Ok so now i’ve got it working.
    The php error log wasn’t helpful but it seems
   that there was a problem with the terms “option” and “value”.
 * Nethertheless, thank you guys!
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [WP Plugin won't create tables in Database](https://wordpress.org/support/topic/wp-plugin-wont-create-tables-in-database/)
 *  Thread Starter [Jonas](https://wordpress.org/support/users/ropaeh/)
 * (@ropaeh)
 * [10 years, 12 months ago](https://wordpress.org/support/topic/wp-plugin-wont-create-tables-in-database/#post-6149653)
 * Thanks for your replies, but unfortunately this didn’t work.
 * Both tables aren’t created and i still can’t figure out why…
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[jQuery Maximage] How call slider ?](https://wordpress.org/support/topic/how-call-slider/)
 *  Plugin Author [Jonas](https://wordpress.org/support/users/ropaeh/)
 * (@ropaeh)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/how-call-slider/#post-5372679)
 * Sorry that i’m answering so late.
 * By default, the slideshow is activated as soon as you’ve selected at least 2 
   images.
    What JS Library do you mean? The plugin automatically calls jQuery from
   the internal WordPress jQuery directory.
 * Jonas

Viewing 9 replies - 1 through 9 (of 9 total)