graph TD;
A-->B;
A-->C;
B-->D;
C-->D;
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 | |
/** | |
* Replace the default "_" (underscore) with "-" (hyphen) in protected custom fields for debugging purposes | |
* | |
* @param bool $protected The default value | |
* @param string $meta_key The meta key | |
* @return bool True for meta keys starting with "-" (hyphen), false otherwise | |
*/ | |
function unprotected_meta( $protected, $meta_key ) { |
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 | |
/** | |
* Customize Image Reloaded Class | |
* | |
* Extend WP_Customize_Image_Control allowing access to uploads made within | |
* the same context | |
*/ | |
class My_Customize_Image_Reloaded_Control extends WP_Customize_Image_Control { | |
/** | |
* Constructor. |
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 | |
/** | |
* Get all the registered image sizes along with their dimensions | |
* | |
* @global array $_wp_additional_image_sizes | |
* | |
* @link http://core.trac.wordpress.org/ticket/18947 Reference ticket | |
* @return array $image_sizes The image sizes | |
*/ | |
function _get_all_image_sizes() { |
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 | |
/** | |
* Callback function for taxonomy meta boxes | |
* | |
* A simple callback function for 'meta_box_cb' argument | |
* inside register_taxonomy() that replaces the regular | |
* checkboxes with a plain dropdown list | |
* | |
* @param [type] $post [description] | |
* @param [type] $box [description] |
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
{ | |
"BTTWidgetName" : "Now Playing", | |
"BTTTriggerType" : 639, | |
"BTTTriggerTypeDescription" : "Apple Script Widget", | |
"BTTTriggerClass" : "BTTTriggerTypeTouchBar", | |
"BTTPredefinedActionType" : 172, | |
"BTTPredefinedActionName" : "Run Apple Script (blocking)", | |
"BTTInlineAppleScript" : "if application \"Spotify\" is running then\r\ttell application \"Spotify\"\r\t\tif player state is playing then\r\t\t\tnext track\r\t\tend if\r\tend tell\rend if\r", | |
"BTTScriptType" : "AppleScript", | |
"BTTEnabled2" : 1, |
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 | |
// Change this to your own taxonomy and post type | |
new Tag_Checklist( 'taxonomy_name', 'post_type' ); | |
/** | |
* Use checkbox term selection for non-hierarchical taxonomies | |
* | |
* @author Hugh Lashbrooke |
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 | |
/** | |
* Retrieve the attachment ID from the file URL | |
* | |
* @link http://pippinsplugins.com/retrieve-attachment-id-from-image-url/ | |
*/ | |
function horizonte_rural_get_attachment_id( $image_url ) { | |
global $wpdb; | |
$attachment = $wpdb->get_col( $wpdb->prepare( "SELECT ID FROM " . $wpdb->posts . " WHERE guid='%s';", $image_url ) ); |
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 | |
/** | |
* @link http://wordpress.stackexchange.com/questions/70752/featured-image-of-video-from-oembed | |
*/ | |
class FeaturedVideo | |
{ | |
/** | |
* The post thumbnail ID | |
* |
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: | |
Plugin URI: | |
Description: | |
Version: 0.1 | |
Author: Eduardo Zulian | |
Author URI: | |
License: GNU General Public License v2 or later | |
License URI: http://www.gnu.org/licenses/gpl-2.0.html |
NewerOlder