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: Woocommerce Bookings Dropdown | |
Description: Swaps the date picker for a dropdown of dates | |
Version: 1.0.0 | |
Author: Webby Scots | |
Author URI: http://webbyscots.com/ | |
*/ | |
$wswp_dates_built = false; | |
add_filter('booking_form_fields','wswp_booking_form_fields'); |
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 | |
$content = strip_tags($_POST['content'],"<p><br><a>"); | |
lib_xml_use_internal_errors(true); | |
$DOM = new DOMDocument($content); | |
foreach($dom->getElementsByTagName($tagname) as $tag) { | |
if ($tag->hasAttributes()) { | |
foreach($tag->attributes as $attribute) { | |
if ($attribute->nodeName !== "href") | |
$tag->removeAttribute($attribute->nodeName); |
NewerOlder