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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
/** | |
* WP Import All cpt soliloquy slider | |
* | |
* @param $pid – the ID of the post/page/Custom Post Type that was just created. | |
* @param $attid – the ID of the attachment | |
* @param $image_filepath – the full path to the file: C:\path\to\wordpress\wp-content\uploads\2010\05\filename.png | |
* | |
*/ | |
add_action('pmxi_gallery_image', 'my_gallery_image', 10, 3); | |
function my_gallery_image($pid, $attid, $image_filepath) { |
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_action('pmxi_saved_post', 'wp_import_set_parent_locations', 10, 1); | |
function wp_import_set_parent_locations( $post_id ){ | |
$terms = get_the_terms($post_id , 'states'); | |
//$post_parent_id = get_page_by_title( $terms ); | |
if ( !empty( $terms ) ) { | |
foreach ( $terms as $term ) { | |
$post_parent_id = get_page_by_title( $term->name, 'OBJECT', 'locations'); | |
} |
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 | |
/** | |
* ExpressionEngine converter base impoprter template for bbPress | |
* | |
* @since bbPress (r4689) | |
* @link Codex Docs http://codex.bbpress.org/import-forums/custom-import | |
*/ | |
class ExpressionEngine extends BBP_Converter_Base { |
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_filter('essgrid_modify_search_query', 'extend_esg_search_args_filter'); | |
/** | |
* Filter to replace teh Essentail Grid Search args | |
* | |
* @return | |
**/ | |
function extend_esg_search_args_filter($args) | |
{ | |
$search_param = $args['s']; | |
$posttype_param = $args['post_type']; |
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 get_all_fields($entry, $form) | |
{ | |
//only do this for a certain form (id 53 for example) | |
// if ($form["id"] == 17) | |
//{ | |
foreach($form["fields"] as &$field) | |
{ | |
//see if this is a multi-field, like name or address | |
if (is_array($field["inputs"])) |