I’m trying to create a custom typography control, I’m having problem saving the value of the color, please take a look at my code: <?php class Customizer_Typo_Control_Typography extends WP_Customize_Control...
I found some interesting embeding JavaScript mix with HTML in WordPress php files, for instance: <?php // Template for the Attachment Details two columns layout. ?> <script type="text/html" id="tmpl-attachment-details-two-column">...
I have read in another SO post that Underscore.js is including in WordPress by default. I am using it to test if a variable is defined but get this...
I was looking at the WordPress templates (html that’s written to the page instead of awkwardly adding strings in JS). There are a lot of templates like this in...
I need to inject some underscore templates into admin screen without modifying the core. The templates look like this: <script type="text/template" id="template-123"> <div class="section intro"> {{{ data.section.intro }}} </div>...
I’ve noticed that since WP 3.5 that we now have the Backbone.js and Underscore.js libraries included. The new Media Modal uses Underscore templates and I was wondering how would...
I’m using the following piece of code to open a media frame when clicking a link with a data-attachment_id attribute. This attribute holds the id of an attachment that...