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
// test screen every 10 pixels | |
var is_screen = false; | |
var i = 970; | |
while(!is_screen){ | |
is_screen = window.matchMedia("only screen and (max-width: "+i+"px)").matches; | |
console.log(is_screen); | |
console.log(i); | |
i = i+10; | |
} |
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
/** | |
* @param $html | |
* @return string | |
*/ | |
function execute_php($html){ | |
if(strpos($html,"<"."?php")!==false){ | |
ob_start(); | |
eval("?".">".$html); | |
$html=ob_get_contents(); | |
ob_end_clean(); |
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
function rfd_debugger($debugItem, $die = 0){ | |
echo '<pre>'; | |
print_r($debugItem); | |
echo '</pre>'; | |
if($die == 1){ | |
die(); | |
} | |
} |
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
/** | |
* Simple function to allow shortcodes in CF7 forms. | |
* @param $form | |
* @return string | |
* http://wordpress.stackexchange.com/questions/45266/how-to-use-other-shortcodes-inside-contact-form-7-forms | |
*/ | |
function mycustom_wpcf7_form_elements( $form ) { | |
$form = do_shortcode( $form ); | |
return $form; | |
} |
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 | |
/** | |
* Database emtpying and file removing class. | |
* | |
* Truncates all necessary tables in the defined database and removes | |
* any files uploaded by the demo user. | |
* | |
* @since 1.0.0 | |
* | |
* @author Thomas Griffin |
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 | |
/** | |
* Created by PhpStorm. | |
* User: Bobby | |
* Date: 2/27/14 | |
* Time: 11:06 AM | |
*/ | |
/** | |
* @param $export_items | |
* @param $table |
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
/** | |
* @param $post_ID | |
*/ | |
public static function task_type_save_custom_field_builder( $post_ID ) { | |
$boxes_arr = []; | |
// Loop through the post keys | |
foreach ( $_POST as $pk => $d ) { | |
// Find a field | |
if ( stripos( $pk, '-fields-' ) ) { | |
// Get form box number |
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
/* | |
@TODO Needs Refactored to reduce code smell and optimize jquery | |
@TODO Some JS adds classes that should really be added by the markup | |
*/ | |
function updateBoxFieldsOnDrop(field_wrap) { | |
let bn = parseInt(jQuery(field_wrap).attr('id').replace(/form_box_field_wrap-form_box_/, '')); | |
jQuery('.edit-form-container-outer label') | |
.filter(function () { | |
// Get all labels for this field | |
let regExp = new RegExp('form_box_' + bn + '-[a-z_]+[0-9]+'); |
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
/** | |
* Produces Task Boxes Saved at the time a task was created. | |
*/ | |
private function _task_create_task_meta_boxes() | |
{ | |
$task_boxes = array(); | |
if (isset($this->_post->ID)) { | |
$task_boxes = get_post_meta($this->_post->ID, Rvms_core_Plugin::PLUGIN_PREFIX . 'task_' . 'boxes', TRUE); | |
// There are task boxes |
OlderNewer