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 | |
$addr = 'Columbus,OH,43235'; | |
$maps_api_key = 'insert key here'; | |
/** | |
* Gets the timezone id (eg. America/New_York, America/Detroit) | |
* @param string $address | |
* @return string|bool | |
*/ | |
function get_timezone_from_address($address){ |
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: Admin Filter BY Custom Fields | |
Plugin URI: http://en.bainternet.info | |
Description: Filter posts or pages in admin by custom fields (post meta) | |
Version: 1.0 | |
Author: Bainternet | |
Author URI: http://en.bainternet.info | |
*/ |
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
// умное позиционирование | |
var win = $(window); | |
var topOffset = selectbox.offset().top; | |
var bottomOffset = win.height() - selectHeight - (topOffset - win.scrollTop()); | |
var visible = opt.selectVisibleOptions; | |
var minHeight = liHeight * 6; | |
var newHeight = liHeight * visible; | |
if (visible > 0 && visible < 6) minHeight = newHeight; | |
// раскрытие вверх | |
if (bottomOffset < 0 || bottomOffset < minHeight) { |
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 | |
/** | |
* Recursively get taxonomy hierarchy | |
* | |
* @source http://www.daggerhart.com/wordpress-get-taxonomy-hierarchy-including-children/ | |
* @param string $taxonomy | |
* @param int $parent - parent term id | |
* | |
* @return 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 | |
/** | |
* @package Custom_queries | |
* @version 1.0 | |
*/ | |
/* | |
Plugin Name: Custom queries | |
Plugin URI: http://wordpress.org/extend/plugins/# | |
Description: This is an example plugin | |
Author: Carlo Daniele |
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 | |
/** | |
* @package Media_hacks | |
* @version 1.0 | |
*/ | |
/* | |
Plugin Name: Media hacks | |
Plugin URI: http://wordpress.org/extend/plugins/# | |
Description: This is an example plugin | |
Author: Carlo Daniele |
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 | |
/** | |
* @package Food_example_plugin_2 | |
* @version 1.0 | |
*/ | |
/* | |
Plugin Name: Food example plugin 2 | |
Plugin URI: http://wordpress.org/extend/plugins/# | |
Description: This is an example plugin for WPMU DEV readers | |
Author: Carlo Daniele |
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 to existing function.php file | |
// Disable support for comments and trackbacks in post types | |
function df_disable_comments_post_types_support() { | |
$post_types = get_post_types(); | |
foreach ($post_types as $post_type) { | |
if(post_type_supports($post_type, 'comments')) { | |
remove_post_type_support($post_type, 'comments'); |
NewerOlder