Title: Scripts n Styles
Author: WraithKenny
Published: <strong>4 de setembre de 2010</strong>
Last modified: 6 de juny de 2023

---

Cerca extensions

![](https://ps.w.org/scripts-n-styles/assets/banner-772x250.png?rev=539209)

Aquesta extensió **no s’ha provat en les darreres 3 versions majors del WordPress**.
Segurament no està mantinguda o suportada, i pot tenir problemes de compatibilitat
quan s’usa en versions recents del WordPress.

![](https://s.w.org/plugins/geopattern-icon/scripts-n-styles_46515d.svg)

# Scripts n Styles

 Per [WraithKenny](https://profiles.wordpress.org/wraithkenny/)

[Baixa](https://downloads.wordpress.org/plugin/scripts-n-styles.3.5.8.zip)

 * [Detalls](https://ca.wordpress.org/plugins/scripts-n-styles/#description)
 * [Ressenyes](https://ca.wordpress.org/plugins/scripts-n-styles/#reviews)
 *  [Instal·lació](https://ca.wordpress.org/plugins/scripts-n-styles/#installation)
 * [Desenvolupament](https://ca.wordpress.org/plugins/scripts-n-styles/#developers)

 [Suport](https://wordpress.org/support/plugin/scripts-n-styles/)

## Descripció

This plugin allows Admin users the ability to add custom CSS and JavaScript directly
into individual Post, Pages or any other registered custom post types. You can also
add classes to the body tag and the post container. There is a Global settings page
for which you can write Scripts n Styles for the entire blog.

Admin’s can also add classes to the TinyMCE “Formats” dropdown which users can use
to style posts and pages directly. As of Scripts n Styles 3+ styles are reflected
in the post editor.

Because only well trusted users should ever be allowed to insert JavaScript directly
into the pages of your site, this plugin restricts usage to admin type users. Admin’s
have access to even more sensitive areas by definition, so that should be relatively
safe 😉

#### Notes about the implementation:

 * Admin users, or more specifically, _any user with the `manage\_options` and `
   unfiltered\_html` capabilities_ (which by default is _only_ the admin type user)
   can use this plugin’s functionality. Some plugins extend user rolls, and so this
   plugin would naturally extend include rolls that have the appropriate capability.
 * CSS Styles are embeded, not linked, at the bottom of the `head` element with `
   style` tags by using `wp-head`. If your theme doesn’t have this hook, this plugin(
   as well as most others) won’t work.
 * JavaScript is embeded, not linked, at the bottom of the `body` (or `head`) element
   with `script` tags by using `wp-footer` (or `wp-head`). If your theme doesn’t
   have this hook, this plugin (as well as most others) won’t work.
 * **There is no input validation.** This plugin puts exactly what you type in the
   meta box directly into the `html` with no error checking. You are an Admin, and
   we trust you to be carefull. Try not to break anything.
 * Do to the licensing of the libraries used, this plugin is released “GPL 3.0 or
   later” if you care about those things.

## Captures

 * [[
 * Settings Page for Writing Scripts n Styles that apply to the whole blog.
 * [[
 * The Scripts panel of the Meta Box.
 * [[
 * The Styles panel of the Meta Box.
 * [[
 * The Classes panel. Add classes to the Style dropdown!
 * [[
 * Enqueue panel. You can enqueue jQuery from here if you need!
 * [[
 * Your styles are reflected in the Editor.

## Instal·lació

This plugin does not require any special activation or template tags. Just get it
from wordpress.org/extend, install and activate like normal.

## PMF

### Will I lose all of my custom Styles and Scripts if I uninstall the plugin?

Yes, absolutely. **YOU WLL LOSE ALL CUSTOMIZATIONS.** Be sure that you do not want
these customizations before you uninstall.

### Why would you do that to me?

Well, because plugins are supposed to, and should be expected to clean up after 
themselves. If you disable and uninstall the plugin, as a developer, I am supposed
to assume that you no longer want me to store all of that now useless data in your
database.

### Can I get around that somehow?

Sure, if you are an Admin, just go to the plugin editor and wipe out the uninstall.
php and then WordPress will not delete the meta data on uninstall.

## Ressenyes

![](https://secure.gravatar.com/avatar/d01b5365ac01027fdbc10e171ae6aa7e6228efcbc45e71d3b29f68de7f1afb31?
s=60&d=retro&r=g)

### 󠀁[Broke my gutenberg blocks](https://wordpress.org/support/topic/broke-my-gutenberg-blocks/)󠁿

 [gjbottomley](https://profiles.wordpress.org/gjbottomley/) 19 de novembre de 2025

breaks js on editor, causes terrible load issues and removed my blocks on publishing

![](https://secure.gravatar.com/avatar/222f2c6b2ca27be64f6b472359c2e4d20be37f9ce02ad0398129d9a7a177d8be?
s=60&d=retro&r=g)

### 󠀁[Broke my block editor](https://wordpress.org/support/topic/broke-my-block-editor/)󠁿

 [t0m4u](https://profiles.wordpress.org/t0m4u/) 12 de novembre de 2025

Broke javascript in the Gutenberg block editor. Editing became painfully slow on
my site with this plugin installed. It should be taken off Wordpress.org

![](https://secure.gravatar.com/avatar/60497b60bad573311baa9af3cd043b0f990c3ee17799603bba32f2e4def4d616?
s=60&d=retro&r=g)

### 󠀁[perfect, a must have](https://wordpress.org/support/topic/perfect-a-must-have/)󠁿

 [iohnatan](https://profiles.wordpress.org/iohnatan/) 17 de gener de 2022

thank you to the author 😀

![](https://secure.gravatar.com/avatar/ec04153e74142c12f65afc71661e8f0e563ae34b6de931d4c6dd921eb6133b26?
s=60&d=retro&r=g)

### 󠀁[Not amp friendly, make it amp friendly](https://wordpress.org/support/topic/not-amp-friendly-make-it-amp-friendly/)󠁿

 [Basudev Yadav](https://profiles.wordpress.org/bdy143/) 5 de octubre de 2019

HTML meta tags added in non-amp version is not showing in amp version. Like yoast
SEO meta tags are shown in both the amp and non-amp version. But this plugin is 
not showing meta tags in both version i.e amp and non-amp. I am using multisite 
language site and I am using manual code of hreflang tag which is working fine in
non-amp version but all codes and meta tags added in this plugin is not showing 
in amp version. Can u make it amp friendly?

![](https://secure.gravatar.com/avatar/e3700a672ba627836e00a584711ac3e804cc65a5b4c83fae270b678b5a5af741?
s=60&d=retro&r=g)

### 󠀁[PERFECT + Does so much more than it says!!](https://wordpress.org/support/topic/perfect-does-so-much-more-than-it-says/)󠁿

 [Natacha](https://profiles.wordpress.org/chickwithbob/) 8 de gener de 2019

Does what is says and much more!! – you can add custom html, css, scripts in the
header or footer globally, or on a per page basis. You can even generate your own
shortcodes! You can also conditionally add generic site scripts above the included
script, and add custom classes to the body or post or dropdowns that appear on the
page. And to the 3-star reviewer who said that scripts are hardcoded with: <script
type=”text/javascript”> The plugin lets you add your own code, but has the <script
type=”text/javascript”> hardcoded, so it doesn’t help if you need other types of
scripts. You can get around this by adding your entire script block using the HTML
input area, rather than in the SCRIPTS input area. Fantastic little plugin that 
has become one of my go-tos in my ‘plugin essentials’ toolbox. Kudos to the dev 
for providing their time free of charge for us all to benefit from.

![](https://secure.gravatar.com/avatar/9038fefd4186ca83516f213a9f8a94fac14c784244d7018c6bad9752e4e6eb92?
s=60&d=retro&r=g)

### 󠀁[Really Excellent, great!](https://wordpress.org/support/topic/really-excellent-great/)󠁿

 [dglite](https://profiles.wordpress.org/dglite/) 21 de desembre de 2018

Really Excellent, great!

 [ Llegiu totes les 30 ressenyes ](https://wordpress.org/support/plugin/scripts-n-styles/reviews/)

## Col·laboradors i desenvolupadors

«Scripts n Styles» és programari de codi obert. La següent gent ha col·laborat en
aquesta extensió.

Col·laboradors

 *   [ WraithKenny ](https://profiles.wordpress.org/wraithkenny/)
 *   [ Kevin Newman ](https://profiles.wordpress.org/captainn/)

[Traduïu «Scripts n Styles» a la vostra llengua.](https://translate.wordpress.org/projects/wp-plugins/scripts-n-styles)

### Interessats en el desenvolupament?

[Navegueu pel codi](https://plugins.trac.wordpress.org/browser/scripts-n-styles/),
baixeu-vos el [repositori SVN](https://plugins.svn.wordpress.org/scripts-n-styles/),
o subscriviu-vos al [registre de desenvolupament](https://plugins.trac.wordpress.org/log/scripts-n-styles/)
per [fisl de subscripció RSS](https://plugins.trac.wordpress.org/log/scripts-n-styles/?limit=100&mode=stop_on_copy&format=rss).

## Registre de canvis

#### 3.5.8

 * Hardening select fields

#### 3.5.7

 * Hardening meta

#### 3.5.5

 * Restore activation hook

#### 3.5.4

 * Hardening

#### 3.5.3

 * No longer auto upgrading meta
 * DISALLOW_UNFILTERED_HTML disables everything, not just admin screens

#### 3.5.2

 * Fix PHP 8 notice

#### 3.5.1

 * Fix JS error in Classic mode

#### 3.5

 * Fix some functionality for Gutenberg
 * Add arbitrary HTML fields

#### 3.4.4

 * Rename codemirror handle for compatibility

#### 3.4.3

 * No newline at end of file
 * Remove closing php tags
 * More guards against PHP 7.1 array conversion breaking change

#### 3.4.2

 * Silence alert debug message.

#### 3.4.1

 * Fix meta box saving.

#### 3.4

 * Add option to not delete data on uninstall
 * Version 4.0 will drop php support under 5.4
 * This version disables updates for installs with php < 5.4
 * 4.0 will launch when most have updated to 3.4 🙂 (and when it’s done.)

#### 3.3

 * See the github repo commits

#### 3.2.1

 * metabox add shortcode bugfix

#### 3.2

 * Add AJAX to Shortcode Tab
 * Add “Chosen” for selects
 * General UI Improvements
 * Add CoffeeScript Support
 * Add Hoops Widget
 * Add Global Hoops Shortcodes
 * Add Markdown mode to code editor
 * Add (fix) code editor themes
 * Theme Support (Beta Feature)

#### 3.1.1

 * Add (fix) CodeMirror Themes

#### 3.1

 * Feature: Dynamic Shortcodes.
 * Feature: LESS.js support.
 * Bug Fix: Proper output escaping.

#### 3.0.3

 * Bug Fix: wpautop formatting.

#### 3.0.2

 * Bug Fix: Fatal Error on post save

#### 3.0.1

 * Option to show Metabox by default
 * Check upgrade in more places
 * Fix double Settings Message on general-options
 * Fix empty post showing on usage
 * Cleaned up constants (internal)

#### 3

 * AJAX Saving of Meta-box
 * Dynamically populate the Styles Dropdown for TinyMCE
 * Styles preview in Post Editor
 * Enqueue dependant scripts if you need (like jQuery)
 * Adjustable menu placement
 * CodeMirror Themes

#### 2.0.3

 * fixed some bugs

#### 2.0.1

 * Better selection of `post_types` to add Scripts-n-Styles
 * micro-optimization for storage of class names.
 * Adds option page for globally adding Scripts and Styles.
 * Defined a later priority for Scripts n Styles to print after other scripts and
   styles.
 * Added a box for Scripts to be included in the `head`.
 * Better adherence to coding standards.
 * Tabbed interface on metabox
 * added CodeMirror
 * began contextual help

#### 1.0.2

 * Added fields for `body_clas`s and `post_class`
 * Merged meta boxes
 * Cleaned up code
 * Improved compatibility
 * Added Screenshot

#### 1.0.1

 * Some small plugin meta data updates.

#### 1.0

 * Initial Release.

## Meta

 *  Versió **3.5.8**
 *  Darrera actualització **fa 3 anys**
 *  Instal·lacions actives **30.000+**
 *  Versió del WordPress ** 5.0 o posterior **
 *  Provada fins a **6.2.9**
 *  Versió del PHP ** 7.4 o posterior **
 *  Idioma
 * [English (US)](https://wordpress.org/plugins/scripts-n-styles/)
 * Etiquetes
 * [admin](https://ca.wordpress.org/plugins/tags/admin/)[code](https://ca.wordpress.org/plugins/tags/code/)
   [css](https://ca.wordpress.org/plugins/tags/css/)[custom](https://ca.wordpress.org/plugins/tags/custom/)
   [javascript](https://ca.wordpress.org/plugins/tags/javascript/)
 *  [Vista avançada](https://ca.wordpress.org/plugins/scripts-n-styles/advanced/)

## Valoracions

 4.4 sobre 5 estrelles.

 *  [  24 valoracions de 5 estrelles     ](https://wordpress.org/support/plugin/scripts-n-styles/reviews/?filter=5)
 *  [  1 valoració de 4 estrelles     ](https://wordpress.org/support/plugin/scripts-n-styles/reviews/?filter=4)
 *  [  1 valoració de 3 estrelles     ](https://wordpress.org/support/plugin/scripts-n-styles/reviews/?filter=3)
 *  [  0 valoracions de 2 estrelles     ](https://wordpress.org/support/plugin/scripts-n-styles/reviews/?filter=2)
 *  [  4 valoracions de 1 estrelles     ](https://wordpress.org/support/plugin/scripts-n-styles/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/scripts-n-styles/reviews/#new-post)

[Visualitzeu totes les ressenyes](https://wordpress.org/support/plugin/scripts-n-styles/reviews/)

## Col·laboradors

 *   [ WraithKenny ](https://profiles.wordpress.org/wraithkenny/)
 *   [ Kevin Newman ](https://profiles.wordpress.org/captainn/)

## Suport

Teniu quelcom a dir? Necessiteu ajuda?

 [Visualitza els fòrums de suport](https://wordpress.org/support/plugin/scripts-n-styles/)