View wpse-273548-controls.js
var wpse273548controls = (function ( api ) {
'use strict';
var component = {};
/**
* Init.
*
* @returns {void}
*/
View wpse-272991-customize-preview.css
/* Make sure edit shortcut for nab body class doesn't conflict with nav menu edit shortcut */
.customize-partial-edit-shortcut-nav_body_class > .customize-partial-edit-shortcut-button {
top: -30px;
}
/* Example styles */
body.foo nav {
border: solid 2px red !important;
}
View bootstrapping-wp-rest-api-collection.php
<?php
// Make internal REST API requests for all resources the client JS app will need.
$request = new WP_REST_Request( 'GET', '/wp/v2/posts' );
$request->set_query_params( array(
'per_page' => 5,
'orderby' => 'title',
'order' => 'desc',
) );
$response = rest_get_server()->dispatch( $request );
$response = apply_filters( 'rest_post_dispatch', $response, rest_get_server(), $request );
View wp-trac-39254.php
<?php
/**
* Plugin Name: WP Trac #39254: Allow starter content posts to display in The Loop
* Version: 0.1.0
* Author: Weston Ruter, XWP
* Plugin URI: https://core.trac.wordpress.org/ticket/39254
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License, version 2 or, at
* your discretion, any later version, as published by the Free
View class-customize-single-postmeta-setting.php
<?php
/**
* Class Customize_Postmeta_Setting.
*
* @package WPSE_257322
*/
namespace WPSE_257322;
/**
View class-wp-widget-media.php
<?php
/**
* Widget API: WP_Media_Widget class
*
* @package WordPress
* @subpackage Widgets
* @since 4.8.0
*/
/**
View wpse-254735.php
<?php
function my_styles_method() {
wp_enqueue_style( 'custom-style', get_template_directory_uri() . '/custom-css.css' );
$colors = array(
'headings_color' => get_theme_mod( 'wpt_heading_color' ),
);
$css_output = "{color: {$colors['headings_color']}; }";
$selector = 'h1,h2,h3,h4,h5,h6';
View load-recent-posts-upon-panel-expansion.js
// Watch for the first expansion of each added panel.
var logPanelFirstExpanded = function( panel ) {
var onceExpanded, onExpandedChange;
if ( ! panel.extended( wp.customize.Posts.PostsPanel ) ) {
return;
}
onceExpanded = function() {
console.info( 'Panel "%s" expanded! You should now lazy-load your controls if needed.', panel.id );
View customize-preview-frontend-show-edit-shortcuts.js
wp.customize.bind( 'preview-ready', function() {
_.defer( function() {
wp.customize.preview.trigger( 'active' );
jQuery( 'body' ).addClass( 'customize-partial-edit-shortcuts-shown' );
} );
});
View trac-39128-customizer-cross-domain-workaround.php
<?php
/**
* Plugin Name: Customizer Cross-Domain Workaround (Trac #39128)
* Description: Force customizer preview to use siteurl instead of home URL to work around Trac #39128. Temp fix for issue loading customizer preview when home and siteurl have different domains (cross-domain).
* Plugin URI: https://core.trac.wordpress.org/ticket/39128
* Author: Weston Ruter, XWP
* Author URI: https://make.xwp.co/
*
* Copyright (c) 2017 XWP (https://xwp.co/)
*