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 | |
/** | |
* The 'genesis_pre_load_favicon' filter runs at the beginning of the genesis_load_favicon() function. | |
* If the value returned by that filter ends up as anything except boolean false, Genesis bails on the | |
* genesis_load_favicon() process. | |
*/ | |
add_filter( 'genesis_pre_load_favicon', 'check_jetpack_site_icon_status' ); | |
function check_jetpack_site_icon_status() { | |
/** | |
* If the JetPack module is active and a JetPack Site Icon has been set, |
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 any custom tables that this plugin creates for an individual site to the list | |
* of tables that get deleted when a site is deleted. | |
* @see https://core.trac.wordpress.org/browser/tags/4.2.2/src/wp-admin/includes/ms.php#L116 | |
*/ | |
add_filter( 'wpmu_drop_tables', 'delete_my_plugin_tables', 10, 2 ); | |
function delete_my_plugin_tables( $tables=array(), $blog_id=null ) { | |
/** | |
* Make sure the blog ID parameter was sent, so we don't |
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 | |
/** | |
* Sets the heightStyle argument for all accordion widget areas | |
* @see http://api.jqueryui.com/accordion/#option-heightStyle | |
*/ | |
add_filter( 'collapsible-widget-javascript-arguments', 'my_theme_modify_cwa_js_args' ); | |
function my_theme_modify_cwa_js_args( $args = array() ) { | |
/** | |
* Loop through all of the existing Collapsible Widget Areas | |
*/ |
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 | |
/** | |
* Example usage of the collapsible-widget-ui-theme filter | |
* We set the priority to 10, and tell WordPress that the callback function should receive 2 arguments | |
* @see http://codex.wordpress.org/Function_Reference/add_filter | |
*/ | |
add_filter( 'collapsible-widget-ui-theme', 'my_theme_cwa_ui_theme', 10, 2 ); | |
function my_theme_cwa_ui_theme( $theme, $opt=null ) { | |
/** | |
* Set a custom jQueryUI theme specifically for use with our WordPress 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
<?php | |
/** | |
* Filter the list of JetPack shortcodes to remove the YouTube and | |
* Vimeo shortcodes from the list | |
* @param array $shortcodes a numerically-indexed array of the absolute | |
* paths to the shortcode definition files | |
* @return array the filtered array | |
*/ | |
function jetpack_allow_native_youtube_vimeo_oembeds( $shortcodes ) { | |
$good_shortcodes = 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
<?php | |
/** | |
* Attempts to override the stupid way JetPack short-circuits native oEmbeds | |
* so that the Fluid Video Embeds plugin can work properly | |
*/ | |
function fve_jetpack_filter_video_embed( $html, $atts=array() ) { | |
/** | |
* Attempt to make sure the Fluid Video Embeds plugin is | |
* active and that the global $fve object is instantiated | |
*/ |
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 ( isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) && 'https' == $_SERVER['HTTP_X_FORWARDED_PROTO'] ) { | |
if ( isset( $_SERVER['HTTP_X_FORWARDED_PORT'] ) && ! empty( $_SERVER['HTTP_X_FORWARDED_PORT'] ) ) { | |
$ports = explode(',', $_SERVER['HTTP_X_FORWARDED_PORT']); | |
error_log( 'The forwarded Port var is set to: ' . $ports[0] ); | |
} else if ( isset( $_SERVER['SERVER_PORT'] ) && ! empty( $_SERVER['SERVER_PORT'] ) ) { | |
error_log( 'The server Port var is set to: ' . $_SERVER['SERVER_PORT'] ); | |
$_SERVER['SERVER_PORT'] = 443; | |
} | |
} |
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
<!doctype html> | |
<html> | |
<head> | |
<title>My Document Title</title> | |
<body> | |
<ul> | |
<li>First list item | |
<li>Second list item | |
<li>Third list item | |
</ul> |
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 ( ! class_exists( 'My_Customizer_Theme_Mods' ) ) { | |
class My_Customizer_Theme { | |
var $version = '0.1'; | |
function __construct() { | |
/** | |
* We have two basic sizes of images used from the images set in the Customizer | |
* One of them is full-width of the browser, so let's make it large, but not unlimited | |
* The other is a 125x125 icon, but, just in case it needs to be a bit larger on mobile or |
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
<ul> | |
<!-- Original First Name/Last Name Complex Field --> | |
<li id="field_6_13" class="gfield field_sublabel_below field_description_above"> | |
<label class="gfield_label" for="input_6_13_3">Name</label> | |
<div class="ginput_complex ginput_container no_prefix has_first_name no_middle_name has_last_name no_suffix" id="input_6_13"> | |
<span id="input_6_13_3_container" class="name_first"> | |
<input type="text" name="input_13.3" id="input_6_13_3" value="" aria-label="First name" vk_1cc20="subscribed" data-cip-id="input_6_13_3"> | |
<label for="input_6_13_3">First</label> | |
</span> | |
<span id="input_6_13_6_container" class="name_last"> |