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 | |
/** adds a span to checkbox labels for styling **/ | |
add_filter( 'facetwp_facet_html', function( $html, $args ) { | |
if ( 'checkboxes' == $args['facet']['type']) { | |
$pattern = '/<div class="facetwp-checkbox[^"]*" data-value="[^"]*">([^<]*) <span/'; | |
preg_match_all( $pattern, $html, $matches ); |
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
/** | |
* The Events Calendar - Target a Specific Event List Widget to Only Show Todays Events | |
* | |
* modify tribe-events-adv-list-widget-2 to id of widget | |
*/ | |
function tribe_modify_list_widget_args_for_today( $args ) { | |
$start_date_init = date ( 'Y-m-d' ); | |
$start_date_end = $start_date_init . ' 23:59:59'; |
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
/* --- DEPRECATED --- */ | |
/* add .et_pb_lightbox_image clss to content images */ | |
add_filter('the_content', 'divi_add_lightbox'); | |
function divi_add_lightbox($content) { | |
global $post; | |
$pattern ="/<a(.*?)href=('|\")(.*?).(bmp|gif|jpeg|jpg|png)('|\")(.*?)>/i"; | |
$replacement = '<a$1href=$2$3.$4$5 class="et_pb_lightbox_image" title="'.$post->post_title.'"$6>'; | |
$content = preg_replace($pattern, $replacement, $content); | |
return $content; | |
} |
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 | |
///////////////////////////////////////////////////////////////////////////////////// | |
// Ask Wordpress to Embed Soundcloud’s Mini Player Instead of the Large Visual Player | |
///////////////////////////////////////////////////////////////////////////////////// | |
// Add function to theme’s functions.php file | |
// Relevant documentation: | |
// https://wordpress.org/support/topic/hookfilter-for-auto-embed-function-of-wp | |
// https://wordpress.org/support/topic/filter-hook-for-built-in-oembed-providers-eg-youtube | |
// https://developers.soundcloud.com/docs/oembed |
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
/** | |
* Each of these samples can be used - note that you should pick one rather than add them all. | |
* | |
* How to use WC notices: https://github.com/woothemes/woocommerce/blob/master/includes/wc-notice-functions.php#L96 | |
* Tutorial: http://www.skyverge.com/blog/edit-woocommerce-templates/ | |
**/ | |
/** | |
* Add a content block after all notices, such as the login and coupon notices. | |
* |
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 | |
/** | |
* Export WordPress post data to CSV | |
* Based on <http://stackoverflow.com/a/3474698> and <http://ran.ge/2009/10/27/howto-create-stream-csv-php/> | |
*/ | |
/** | |
********************************************************************* | |
* Configuration | |
********************************************************************* |
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 Tribe Event Namespace | |
add_filter( 'rss2_ns', 'events_rss2_namespace' ); | |
function events_rss2_namespace() { | |
echo 'xmlns:ev="http://purl.org/rss/2.0/modules/event/"'; | |
} | |
// Add Event Date to RSS Feeds | |
add_action('rss_item','tribe_rss_feed_add_eventdate'); |
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
<p>Here you may add a new row for every new question and answer set you wish to display.</p> | |
<div class="postbox"> | |
<h3>Tips</h3> | |
<div class="inside"> | |
<ul style="list-style-type:disc; list-style-position:inside; margin-left:30px;"> | |
<li>Hover your cursor over the <span id="highlight-left-margin" style="text-decoration:underline; font-weight:bold; cursor:pointer;">left margin</span> and click to drag our FAQ items into a different order.</li> | |
<li>Hover over the <span id="highlight-right-margin" style="text-decoration:underline; font-weight:bold; cursor:pointer;">right margin</span> and click on the <i>plus<i> to add a new FAQ item. Click on the <i>minus</i> to delete an tem.</li> | |
<li>Some fields allow you to use basic <abbr title="Hypertext Markup anguage." style="border-bottom:1px dotted;">HTML</abbr> tags, like <b><b>bold</b></b> and <i><i>italic</i></i>.</i> | |
</ul> | |
</div> |
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
// Add to functions.php | |
/*=================================================== | |
Created by sk from Renegade Empire with help | |
from these sources: | |
http://docs.woothemes.com/document/editing-product-data-tabs/ | |
http://www.sean-barton.co.uk/2013/03/remove-woocommerce-20-reviews-tab/#.UYnWe7XfB6N | |
http://www.sean-barton.co.uk/2013/03/sb-add-woocommerce-tabs-wordpress-plugin/#.UYrYL7XfB6M |
NewerOlder