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 | |
/* | |
I've got a Pod called 'places'. I've geocoded the addresses in 'places', and stored the coordinates in columns 'lat' and 'long'. I'm also doing a GeoIP lookup on my users, and storing their location in $usr_lat and $usr_long. (I promise to share how I'm doing all this when I get the bugs worked out). | |
Here's my code: | |
*/ | |
$Record = new Pod('places'); | |
$params = 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
#calendar_div table { | |
border-collapse:collapse; | |
} | |
#cal_table_list td { | |
vertical-align:top; | |
padding:4px; | |
} | |
#cal_table_list td { | |
border-bottom:1px dotted #BBB; | |
} |
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
/* | |
* Wp-post-formats plugin | |
* customized admin.css | |
* | |
*/ | |
#formatdiv, /* hide default radio button UI */ | |
#titlewrap { | |
display: none; | |
} |
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
// As used by Codroprs | |
// http://tympanus.net/codrops/collective/collective-36/ | |
jQuery(document).ready(function($) { | |
var CollManag = (function() { | |
var $ctCollContainer = $('#ct-coll-container'), | |
collCnt = 1, | |
init = function() { | |
changeColCnt(); | |
initEvents(); |
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 | |
/** | |
* Remove images from post content | |
* | |
* credits: http://bavotasan.com/2011/a-better-way-to-remove-images-from-a-wordpress-post/ | |
* | |
* This will remove images on ALL posts! If you don't want this, | |
* use it in the template code and then add | |
* remove_filter( 'the_content', 'og2013_no_images' ); | |
* you can also use <?php echo preg_replace("/\]*[.]*\>/i”,”",get_the_content(),1); ?> |
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
on_sent_ok: "location = 'https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=info%40futuremedia.gr&item_name=' + document.getElementsByName('art-title')[0].value + '&amount=' + document.getElementsByName('art-price')[0].value + '&page_style=FutureMedia&no_shipping=1&no_note=1¤cy_code=USD&bn=PP-BuyNowBF&charset=UTF-8)';" |
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 | |
/** | |
* [list_searcheable_acf list all the custom fields we want to include in our search query] | |
* @return [array] [list of custom fields] | |
*/ | |
function list_searcheable_acf(){ | |
$list_searcheable_acf = array("title", "sub_title", "excerpt_short", "excerpt_long", "xyz", "myACF"); | |
return $list_searcheable_acf; | |
} |
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
jQuery(document).ready(function($){ | |
$('#load-more button').click(function(e){ | |
e.preventDefault(); // revent normal form submission | |
var postoffset = $('.item').length; // count props on page | |
$.post( WPaAjax.ajaxurl, | |
{ | |
action : 'props_more', |
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
/** | |
* RETORNA URL DO POST_THUMBNAIL PARA BACKGROUND-IMAGE | |
* @param int: get_the_ID() | |
* @param string: thumbnail, medium, large, full | |
**/ | |
function post_thumbnail_url($post_id, $size = 'thumbnail'){ | |
$thumb = wp_get_attachment_image_src(get_post_thumbnail_id($post_id), $size ); | |
$url = $thumb[0]; | |
return $url; | |
} |
OlderNewer