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: ZF Featured Image in RSS | |
* Description: Adds the featured image URL (large) to its own RSS field for easy parsing with e.g. Feed Pull. | |
* Author: Zeeland Family | |
* Version: 1.0.0 | |
* Licence: GPLv3 | |
*/ | |
add_action( 'rss2_item', 'featured_image_field_in_rss' ); |
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
# Steps we will take: | |
# 1. Change Local (Docker Machine) image type (this will take a bit) | |
# 2. Resize image | |
# 3. Resize partion | |
# | |
# Also see: https://docs.docker.com/articles/b2d_volume_resize/ | |
# IMPORTANT: Make sure Local is not running! | |
VM_NAME="local-by-flywheel" | |
NEW_DISK_SIZE=50000 |
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
#!/usr/bin/env ruby -E utf-8 | |
# merge_asana_into_omnifocus.rb | |
# Hilton Lipschitz | |
# http://www.hiltmon.com | |
# Use and modify freely, attribution appreciated | |
# Script to import Asana projects and their tasks into | |
# OmniFocus and keep them up to date from Asana. |
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: Migrate comment likes | |
Version: 0.1 | |
Description: Migrate comment likes from WP Comment Rating Pro to Ulike | |
Author: Daniel Koskinen / Zeeland Family | |
Author URI: http://wordpress.zeelandfamily.fi/ | |
*/ | |
if ( defined( 'WP_CLI' ) && WP_CLI ) { |
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
/* | |
Include this file in your theme and enqueue it like this in PHP: | |
function my_customize_preview_js() { | |
wp_enqueue_script( 'customizer-preview', get_template_directory_uri() . '/path/to/customizer.js', array( 'customize-preview' ), '20170422', true ); | |
} | |
add_action( 'customize_preview_init', 'my_customize_preview_js' ); | |
*/ |
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: Polylang Bulk Translate | |
Plugin URI: | |
Version: 0.1.0 | |
Author: Tyomaa Oy | |
Author URI: https://github.com/tnottu | |
Description: Translate multiple posts with bulk actions | |
License: GPLv2 or later |
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
# ----------------------------------------------------------------- | |
# .gitignore for WordPress (based on original from @salcode) | |
# | |
# By default all files are ignored. You'll need to whitelist | |
# any mu-plugins, plugins, or themes you want to include in the repo. | |
# | |
# To ignore uncommitted changes in a file that is already tracked, use | |
# git update-index --assume-unchanged | |
# | |
# To stop tracking a file that is currently tracked, use |
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 | |
/** | |
* Returns the localised slug for a taxonomy term | |
*/ | |
function h1_term_slug( $slug, $taxonomy, $return_original_if_missing = true ) { | |
$localized_term = h1_get_term_by( 'slug', $slug, $taxonomy, OBJECT, 'raw', $return_original_if_missing ); | |
if ( $localized_term && !is_wp_error( $localized_term ) ) { | |
$slug = $localized_term->slug; |
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 | |
/** | |
* Add a new /part/ endpoint. Access the value of part by | |
* using get_query_var( 'part' ) in a theme template. | |
*/ | |
add_filter( 'init', 'h1ep_add_rules' ); | |
function h1ep_add_rules() { | |
// this will register the endpoint for all WordPress URLs | |
add_rewrite_endpoint( 'part', EP_ALL ); | |
} |
NewerOlder