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 | |
/** | |
* Get the date for the day navigation link | |
* | |
* @param string $date_description | |
* @return string | |
* @since 3.1.1 | |
* @throws OverflowException | |
*/ | |
function tribe_get_the_day_link_date( $date_description ) { |
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 | |
/** | |
*Plugin Name: WP Ultimate CSV Importer | |
*Plugin URI: http://www.smackcoders.com/blog/how-to-guide-for-free-wordpress-ultimate-csv-importer-plugin.html | |
*Description: A plugin that helps to import the data's from a CSV file. | |
*Version: 3.2.3 | |
*Author: smackcoders.com | |
*Author URI: http://www.smackcoders.com | |
* | |
* Copyright (C) 2013 Smackcoders (www.smackcoders.com) |
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
/** | |
* Sale Products Up Front | |
*/ | |
add_action( 'woocommerce_product_query', 'cur_sale_products_up_front', 10, 2); | |
add_filter('posts_request', 'cur_modify_products_query', 10, 2); | |
add_filter('loop_start', 'cur_reorder_sale_items'); | |
//Utility function | |
function cur_replace_text($startPoint, $endPoint, $newText, $source) { |
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
Description: | |
I wrote this so that I could evenly distribute elements in a line. Here's an example that may explain better than words: http://cl.ly/JHnp, http://jsfiddle.net/nathanielks/pvGcz/4/. What it does it take the parent element and scans it for specific child elements. It then calculates the various widths and adds a left margin accordingly. The reason each element is given a display: block and float:left is because of a weird bug with display: inline. The script requires the elements to displayed inline initially, but because inline elements have a few extra pixels around them, the elements aren't all contained, even though the math is right. Really weird. Anyway, here's how you use it. | |
Usage: | |
$('#parent').distributeElements(); | |
Here's the demo: http://jsfiddle.net/nathanielks/pvGcz/4/ |
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
$(document).ready(function(){ | |
var center = new L.LatLng(-18.9717, -3.53815); // geographical point (longitude and latitude) | |
var map = new L.Map('map', { | |
scrollWheelZoom: false, | |
}).setView(center, 3); | |
var watercolor = new L.StamenTileLayer("watercolor").addTo(map); | |
var overlayUrl = '/path/to/image.png', |
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 | |
add_action( 'after_setup_theme', 'bootstrap_setup' ); | |
if ( ! function_exists( 'bootstrap_setup' ) ): | |
function bootstrap_setup(){ | |
add_action( 'init', 'register_menu' ); | |
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
#!/usr/bin/php | |
<?php | |
$usage = "Automated Wordpress installer\nby Ali Gangji\nUsage: wordpress install_dir -u dbuser -p dbpass -d dbname\nOptions:\n"; | |
$usage .= " -u dbuser Database username\n"; | |
$usage .= " -p dbpass Database password\n"; | |
$usage .= " -d dbname Database name\n"; | |
$usage .= " -h dbhost Database host\n"; | |
$usage .= " --private Hide blog from search engines\n"; | |
$usage .= " --prefix prefix Database prefix\n"; | |
if ($argc < 2) { |
NewerOlder