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 is the cleaner code per request of a thread in the LinkedIn group "WordPress" | |
// ... | |
// register and enqueue loadCSS | |
function load_scripts_and_styles() { | |
// register loadCSS | |
wp_register_script( 'load-css-async', get_stylesheet_directory_uri() . '/path/to/js/loadCSS.js', array(), '', false ); |
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
server { | |
listen 443; | |
server_name example.com; | |
error_log /var/log/nginx/example_com_error.log warn; | |
ssl on; | |
ssl_certificate /etc/nginx/ssl/your.crt; #certificate chains | |
ssl_certificate_key /etc/nginx/ssl/your.key; #private key | |
This document lists all the situations where WordPress sends an email, along with how to filter or disable each email.
This documentation has moved here: https://github.com/johnbillion/wp_mail
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 | |
/* | |
* Plugin Name: Remove crazy counts slowing down my dashboard | |
* Plugin URI: https://pmgarman.me | |
* Description: Those comment counts are such a pain when you have a lot of comments | |
* Author: Patrick Garman | |
* Author URI: https://pmgarman.me | |
* Version: 1.0.0 | |
* License: GPLv2 | |
*/ |
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
#!/bin/bash | |
# file: ttfb.sh | |
# curl command to check the time to first byte | |
# ** usage ** | |
# 1. ./ttfb.sh "https://google.com" | |
# 2. seq 10 | xargs -Iz ./ttfb.sh "https://google.com" | |
curl -o /dev/null \ | |
-H 'Cache-Control: no-cache' \ | |
-s \ |
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 while (have_posts()) : the_post(); ?> | |
<?php | |
// Get the placeholder image and full size image URLs | |
if ( has_post_thumbnail() ) { | |
$image_id = get_post_thumbnail_id(); | |
$full_size_image = wp_get_attachment_image_src( $image_id,'full', true); | |
$full_size_image_url = $full_size_image[0]; | |
$placeholder_image = wp_get_attachment_image_src( $image_id,'thumbnail', true); |
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 | |
/** | |
* Jays Fix Serialization | |
* | |
* Fixes serialization in SQL files after replacements are done. | |
* License: GPL version 3 or later - http://www.gnu.org/licenses/gpl.txt | |
* By: Jay Wood ( [email protected] ) | |
* http://plugish.com | |
* | |
* Usage: |
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 | |
/* | |
Plugin Name: Import Venues WP CLI command | |
Plugin URI: http://wordpress.org/plugins/hello-dolly/ | |
Description: Adds `wp eo venue import <path-to-file>` command. | |
Author: Stephen Harris | |
Version: 0.1 | |
*/ | |
// Exit if accessed directly |
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
# BEGIN POWERED CACHE | |
<IfModule mod_mime.c> | |
AddType image/jpeg .jpg .jpeg .jpe | |
AddType image/gif .gif | |
AddType image/png .png | |
AddType image/bmp .bmp | |
AddType image/tiff .tiff .tif | |
AddType image/x-icon .ico | |
AddType video/x-ms-asf .asf .asx | |
AddType video/x-ms-wmv .wmv |
OlderNewer