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
function include_template_files() { | |
global $wp; | |
$plugindir = dirname( __FILE__ ); | |
if (is_home() || is_front_page()) { | |
$templatefilename = 'home.php'; | |
$template = $plugindir . '/theme_files/' . $templatefilename; | |
include($template); | |
exit; | |
} |
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
window.MI_MAPS = window.MI_MAPS || {}; | |
window.MI_MAPS.current_map = window.MI_MAPS.current_map || {}; | |
function generate_map( el ) { | |
var Map_Data = {}; | |
Map_Data.lat = el.attr('data-lat'); | |
Map_Data.long = el.attr('data-long'); | |
Map_Data.id = el.find('.googleMap').attr('id'); | |
Map_Data.myLatlng = new google.maps.LatLng(Map_Data.lat, Map_Data.long); | |
Map_Data.mapOptions = { |
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: Convert Meta Fields | |
* Description: batch convert metadata for metroinvestments update | |
* Author: Marc Gratch | |
* Author URI: http://marcgratch.com | |
* Version: 0.1.0 | |
*/ | |
/** |
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
/** | |
* Getting this specific metadata is returning | |
* boolean (false) | |
*/ | |
$stuff = get_post_meta(get_the_ID(),'lwi_slideshowimage',false); | |
var_dump($stuff); |
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 | |
if (!is_admin()){ | |
add_filter( 'wp_redirect', function () { debug_print_backtrace(); exit; },999 ); | |
} | |
?> |
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
/** | |
* Part of GravityView_Ratings_Reviews plugin. This script is enqueued from | |
* front-end view that has ratings-reviews setting enabled. | |
* | |
* globals jQuery, GV_MAPS, google | |
*/ | |
// make sure GV_MAPS exists | |
window.GV_MAPS = window.GV_MAPS || {}; |
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
add_action('gravityview/approve_entries/approved','submit_master_map_form'); | |
function submit_master_map_form($entry_id, $input_values = array()){ | |
$entry = RGFormsModel::get_lead($entry_id); | |
$form_id = $entry['form_id']; | |
if ($form_id == 8){ | |
//Select drop down option based on which form data is coming from | |
$input_values['input_15'] = 'Chapter'; |
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
add_action('gravityview/approve_entries/approved','publish_pending_testimonial'); | |
function publish_pending_testimonial($entry_id){ | |
$entry = RGFormsModel::get_lead($entry_id); | |
if ($entry['post_id'] != null){ | |
$my_post = array( | |
'ID' => $entry['post_id'], | |
'post_status' => 'publish' | |
); |
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
add_filter( 'gform_notification_events', 'gw_add_manual_notification_event' ); | |
function gw_add_manual_notification_event( $events ) { | |
$events['su_approval'] = __( 'Send Approval' ); | |
return $events; | |
} | |
add_action('gravityview/approve_entries/approved','su_send_approval'); | |
function su_send_approval($entry_id){ | |
$entry = RGFormsModel::get_lead($entry_id); |
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 | |
function mg_rcp_hijack_login_url() { | |
global $rcp_options; | |
if( isset( $rcp_options['login_redirect'] ) ) { | |
$login_url = get_the_permalink( $rcp_options['login_redirect'] ); | |
} | |
return $login_url; | |
} |