This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
The baseline. This will be applied to any browser that does not | |
support calc, and any browser that is smaller than 800px wide | |
*/ | |
.comments-list, | |
.comment { | |
width: 100%; | |
} | |
.comments-section .children { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Create an image control in the Customizer with an ID of 'logo_url'. | |
* | |
* This is added to the 'title_tagline' section. | |
*/ | |
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'logo_url', | |
array( | |
'settings' => 'logo_url', | |
'section' => 'title_tagline', | |
'label' => __( 'Logo', 'my_theme' ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Retina image control. | |
* | |
* Essentially, you just create two separate image controls, one of which is for the regular version of the logo, | |
* the other for the retina version. | |
* | |
* This is a simple solution with a few downsides: | |
* | |
* 1. It can be confusing for users who may not understand what is required for a retina version. | |
* 2. There is nothing enforcing the 2x sizing of the retina version. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Retina image control. | |
* | |
* This solution involves creating a new control, implemented as the | |
* Sofa_Customizer_Retina_Image_Control class. | |
* | |
* Using this control, we get a regular image control with a simple | |
* checkbox underneath asking the user whether the image is retina-ready. | |
* This means that the user can just upload a single image and tick a box | |
* if it is correctly sized for retina screens (i.e. it's twice the size |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ( ! defined( 'ABSPATH' ) ) { | |
exit; // Exit if accessed directly | |
} | |
if ( ! class_exists( 'WP_Customize_Control' ) ) return; | |
if ( ! class_exists( 'Sofa_Customizer_Retina_Image_Control' ) ) : | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ps aux | grep httpd | grep -v pts | awk '{ tot += $6; procs += 1; print $2,$6,$11 } END { print "TOTAL: ",tot,"/",procs,"=",tot/procs }' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
watch -n 1 "echo -n 'Apache Processes: ' && ps -C httpd --no-headers | wc -l && free -m" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Based on a single key, retrieve the data for a particular image, including whether it is retina and its dimensions. | |
* | |
* @param string $key | |
* @return false if not set, or array if set | |
* @access private | |
* @since 1.0 | |
*/ | |
private function get_image_data($key) { | |
$data = array(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*global module:false*/ | |
/*global require:false*/ | |
/*jshint -W097*/ | |
"use strict"; | |
module.exports = function(grunt) { | |
// load all grunt tasks | |
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This file should be saved as single-campaign.php, preferably in your Salient child theme. | |
*/ | |
get_header(); ?> | |
<?php nectar_page_header($post->ID); ?> | |
<div class="container-wrap"> | |
OlderNewer