Skip to content

Instantly share code, notes, and snippets.

View RickeyMessick's full-sized avatar

Rickey Messick RickeyMessick

View GitHub Profile
@RickeyMessick
RickeyMessick / Gravity Forms get all fields function
Created November 3, 2015 21:11
Gravity Forms get all fields function to use with gform_after_submission to display just filled out fields
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"]))
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'];
@RickeyMessick
RickeyMessick / gist:780b857970a4bb72a79f
Last active August 29, 2015 14:17
bbpress custom import Expression Engine
<?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 {
@RickeyMessick
RickeyMessick / gist:b1524600ff1ae54d60b1
Created October 1, 2014 16:25
wp import all - pmxi_saved_post setting parent page from tax
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');
}
@RickeyMessick
RickeyMessick / gist:b80bb541c1892af02b9a
Last active July 27, 2020 09:20
wp import all - soliloquy slider CPT import
/**
* 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) {
@RickeyMessick
RickeyMessick / 0_reuse_code.js
Created June 16, 2014 13:50
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console