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
$0=10 | |
$1=255 | |
$2=0 | |
$3=3 | |
$4=0 | |
$5=0 | |
$6=0 | |
$10=115 | |
$11=0.020 | |
$12=0.002 |
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
SELECT t1.entity_id, t2.post_id, t2.post_title, t1.value, t3.address, t3.street, t3.city, t3.state, t3.zip, t4.phone, t4.mobile, t4.fax, t4.email, t4.website | |
FROM wp_sabai_entity_field_content_body as t1 | |
LEFT JOIN wp_sabai_content_post as t2 | |
ON t1.entity_id = t2.post_id | |
LEFT JOIN wp_sabai_entity_field_directory_location as t3 | |
ON t1.entity_id = t3.entity_id | |
LEFT JOIN wp_sabai_entity_field_directory_contact as t4 | |
ON t1.entity_id = t4.entity_id | |
WHERE t2.post_entity_bundle_name = 'campfinder_listing' | |
AND t2.post_status = 'published' |
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 | |
// convertplus/admin/ajax-actions.php | |
// line 3133 | |
/*** RFM DATE ADJUST ***/ | |
foreach($contacts as $key => $contact){ | |
$contact['date'] = date("Y-m-d", strtotime($contact['date'])); | |
$contacts[$key] = $contact; | |
} |
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 | |
/** | |
* Modern Tribe's The Event Calendar plugin would be much faster in the editing interface | |
* if it removed the upfront loading of organizers and venues from the select dropdown and | |
* relied on AJAX loading after initial page load. Additional improvement would be to drop | |
* the `get_the_title` method when displaying the venue and organizer titles in the list. | |
* This was tested on a production site with ~4500+ events. Average of 10 attempts time to | |
* load edit screen prior to modification 47.2 seconds with memory load 290.63mb and | |
* 18,968 queries. In contrast after modification 16.88 seconds with memory load 217.89mb | |
* and 155 queries. |
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 | |
// look at line 69 and change | |
$field = 'eventStart.meta_value'; | |
// to | |
$field = 'tribe_event_start_date.meta_value'; | |
/**********/ |
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
/** | |
* Filter Gravity Forms select field display to wrap optgroups where defined | |
* USE: | |
* set the value of the select option to `optgroup` within the form editor. The | |
* filter will then automagically wrap the options following until the start of | |
* the next option group | |
*/ | |
add_filter( 'gform_field_content', 'filter_gf_select_optgroup', 10, 2 ); | |
function filter_gf_select_optgroup( $input, $field ) { |
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
angular.module('SampleApp', ['ngRoute']) | |
.filter('filterByProperty', function(){ | |
return function( items, propMatch ){ | |
var filtered = []; | |
for (var i = 0; i < items.length; i++) { | |
var item = items[i]; | |
for(var property in propMatch){ | |
if (propMatch[property] == item[property]) { |
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
.filter('filterByProperty', function(){ | |
return function( items, propMatch ){ | |
var filtered = []; | |
for (var i = 0; i < items.length; i++) { | |
var item = items[i]; | |
for(var property in propMatch){ | |
if (propMatch[property] == item[property]) { | |
filtered.push(item); | |
} | |
} |
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 | |
/** | |
* implement a filter hook by replacing the original echo in | |
* serieslistings.php lines 621, 727 | |
* ajaxlink.php lines 632, 746 | |
*/ | |
echo stripslashes($enmse_singlemessage->embed_code); | |
// with the new filter |
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 | |
function ping($host){ | |
if(exec('echo EXEC') == 'EXEC'){ | |
exec(sprintf('ping -c 1 -W 5 %s', escapeshellarg($host)), $res, $rval); | |
} elseif( function_exists('fsocketopen') ){ | |
$port = 80; | |
$timeout= 6; | |
$fsock = fsockopen($host, $port, $errno, $errstr, $timeout); | |
if ( ! $fsock ){ |