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 | |
add_action( 'gravityview/template/links/back/url', 'gv_change_back_link', 10, 2 ); | |
/** | |
* Modify the back link URL for a specific View | |
* | |
* @param string $href The original back link | |
* @param \GV\Template_Context The current context | |
* | |
* @return string Modified URL, if View ID equals 105 | |
*/ |
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 //don't copy this line | |
add_filter( 'gravityview_az_entry_filter_localization', 'add_swedish_gravityview_az_entry_filter_localization' ); | |
function add_swedish_gravityview_az_entry_filter_localization( $languages = array() ) { | |
$languages['sv_FI'] = __( 'Swedish (Finland)', 'gravityview-az-filters' ), | |
$languages['sv_SE'] = __( 'Swedish (Sweden)', 'gravityview-az-filters' ), | |
$languages['sv'] = __( 'Swedish', 'gravityview-az-filters' ), | |
return $languages; | |
} |
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 wp_footer(); ?><!-- DON'T COPY THIS LINE, IT'S JUST HERE SO YOU KNOW WHERE TO PLACE THE <SCRIPT> BELOW --> | |
<script type="text/javascript"> | |
(function($){ | |
$(document).ready(function(){ | |
$("#DataTables_Table_0_filter :input").attr("placeholder", 'Search'); | |
var divhtml = $("#DataTables_Table_0_filter label").html(); | |
$("#DataTables_Table_0_filter label").html(divhtml.replace("Search:", " ")); |
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 | |
// List of arguments at gp-nested-forms/class-gp-nested-forms.php at line 1406 | |
add_filter( 'gpnf_init_script_args', 'gravitywiz_modify_nested_modal_dimensions', 10, 3 ); | |
function gravitywiz_modify_nested_modal_dimensions( $args, $field, $form ) { | |
if ($field['id'] == 3 && $form['id'] == 141){ | |
$args['modalWidth'] = 500; | |
$args['modalHeight'] = 900; | |
return $args; | |
} | |
return $args; |
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 | |
add_action('gravityview/approve_entries/disapproved','gv_send_form_notification_approval'); | |
add_action('gravityview/approve_entries/approved','gv_send_form_notification_approval'); | |
function gv_send_form_notification_approval($entry_id){ | |
$entry = GFAPI::get_entry( $entry_id ); | |
if( ! $entry || is_wp_error( $entry ) ) { | |
return; | |
} | |
$form = GFAPI::get_form( $entry['form_id'] ); | |
if( ! $form || is_wp_error( $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 | |
/** | |
* Remove wpautop() when Gravity Forms is in the field content | |
*/ | |
add_filter( 'gravityview/field_output/args', function( $args, $passed_args, $context = null ) { | |
if( $context && $context instanceof \GV\Template_Context ) { | |
$content = \GV\Utils::get( $args, 'value', '' ); | |
if( has_shortcode( $content, 'gravityform') ) { |
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 | |
add_action('gform_after_update_entry_115', 'gv_change_entry_creator', 10, 2); | |
function gv_change_entry_creator( $form, $entry_id ){ | |
$entry = GFAPI::get_entry($entry_id); | |
$new_entry_creator = $entry[1]; // field ID where the dropdown with usernames are (this will be the new entry creator) | |
GFAPI::update_entry_property( $entry_id, 'created_by', $new_entry_creator ); | |
} |
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 gv_change_edit_entry_title( $previous_text = 'Edit Entry' ) { | |
$view_id = GravityView_View::getInstance()->getViewId(); | |
if($view_id == 105){ | |
return 'Edit Profile'; | |
} | |
if( ($view_id == 106) || ($view_id == 107)){ | |
return 'Edit Entry'; | |
} | |
} |
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 | |
//usage [gv_listify field="{Field Merge Tag}"] | |
add_shortcode( 'gv_listify', 'gv_listify_shortcode' ); | |
function gv_listify_shortcode( $atts ) { | |
extract( shortcode_atts( | |
array( | |
'field' => '', | |
), $atts ) | |
); |
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 // DO NOT COPY THIS LINE | |
add_filter( 'comment_form_field_gv_review_title', '__return_empty_string' ); | |
add_filter( 'gv_ratings_reviews_review_form_settings', 'gv_modify_review_form_labels',10,1); | |
function gv_modify_review_form_labels($defaults){ | |
$defaults['author'] = ''; | |
$defaults['email'] = ''; |