This file contains hidden or 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
function register_watermarked_size() { | |
add_image_size( 'watermarked', 550, 550, true ); // This is what should be uploaded | |
} | |
add_action( 'init', 'register_watermarked_size' ); | |
class Watermark_Image { | |
// The attachment meta array | |
public $meta = array(); |
This file contains hidden or 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 | |
// Published under GPL | |
// tutorial here: https://codeable.io/community/how-to-import-json-into-wordpress/ | |
class Developer_Import { | |
public function __construct() { | |
add_action( 'wp_ajax_import_developer', array( $this, 'import_developer' ) ); |
This file contains hidden or 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 | |
/* Activation hook */ | |
register_activation_hook( __FILE__, function() { | |
if(!function_exists('\get_field')) { | |
deactivate_plugins(__FILE__); | |
wp_die("Please enable Advanced Custom Fields before activating this plugin."); | |
} | |
}); |
This file contains hidden or 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 | |
/* | |
WordPress Theme Template Hierarchy Last updated for WordPress 5.4 | |
================================== | |
This diagram is partially simplified for legibility. To view the complete template hierarchy in use on your site see the | |
Template panel in the Query Monitor plugin. | |
This file contains hidden or 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
INITIALISATION | |
============== | |
load wp-config.php | |
set up default constants | |
load wp-content/advanced-cache.php if it exists | |
load wp-content/db.php if it exists | |
connect to mysql, select db | |
load object cache (object-cache.php if it exists, or wp-include/cache.php if not) | |
load wp-content/sunrise.php if it exists (multisite only) |
This file contains hidden or 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 | |
/** | |
* Range Control Class | |
*/ | |
class WP_Customize_Range_Control extends WP_Customize_Control { | |
/** | |
* @access public | |
* @var string |
This file contains hidden or 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: Simple Popular Posts Lite | |
Plugin URI: - | |
Description: - | |
Version: 2015.03.01 | |
Author: khromov | |
Author URI: http://snippets.khromov.se | |
License: GPL2 | |
*/ |
This file contains hidden or 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 { | |
include /home/webmaster/www/codeable.io.conf; | |
server_name codeable.io; | |
listen 443 ssl spdy default_server; | |
root /home/webmaster/www/codeable.io; | |
index index.php index.html; | |
error_log /var/log/nginx/codeable.io.error.log warn; |
This file contains hidden or 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
// this targets 1,5,7,11,13,17,19... | |
.ale--66 { | |
&:nth-child(6n+1), | |
&:nth-child(6n+5){ | |
width:66.666%; | |
} | |
} | |
// this targets - 2,4,8,10,14,16,20.... | |
.ale--33 { |