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 | |
$forms = Forminator_API::get_forms(); // Method 1 to get all forms | |
$form_ids = array( 12, 34, 56, 78, 90 ); | |
$forms = Forminator_API::get_forms( $form_ids ); // Method 2 to get specific forms | |
$forms = Forminator_API::get_forms(12, 34, 56, 78, 90 ); // Method 3 to get specific forms |
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 | |
add_filter( 'map_meta_cap', function( $caps, $cap, $user_id, $args ) { | |
switch( $cap ) | |
{ | |
case 'export_others_personal_data': | |
case 'erase_others_personal_data': | |
case 'manage_privacy_options': | |
if( ( $key = array_search( 'manage_network', $caps ) ) !== false ) { | |
unset( $caps[$key] ); | |
} |
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 | |
add_filter( 'mp_format_currency_symbol', function() { | |
return 'USD '; | |
} ); | |
add_filter( 'mp_product/display_price', function( $snippet, $price, $id ) { | |
$product = new MP_Product( $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 | |
add_filter( 'ms_model_pages_redirect_to', function( $url, $type, $args ) { | |
$subscription_id = $args['ms_relationship_id']; | |
$subscription = MS_Factory::load( 'MS_Model_Relationship', $subscription_id ); | |
$membership = $subscription->get_membership(); | |
if( $membership->id == XX ) | |
{ |
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 | |
add_filter( 'forminator_field_date_markup', function( $html, $field ) { | |
$id = $name = Forminator_Date::get_property( 'element_id', $field ); | |
$type = Forminator_Date::get_property( 'field_type', $field ); | |
$date_format = Forminator_Date::get_property( 'date_format', $field ); | |
$min_year = $max_year = ''; | |
$sep = false !== strpos( $date_format, '/' ) ? '/' : '-'; |
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( ! class_exists( 'Forminatio_Registration_Addon' ) ) | |
{ | |
class Forminatio_Registration_Addon | |
{ | |
// Registration Form ID | |
static $Form_ID = '4599'; | |
static $map = array( |
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 update_app_add_field_val( $app_id, $add_field, $add_val ) | |
{ | |
global $appointments, $wpdb; | |
$appmeta = appointments_get_table( 'appmeta' ); | |
$meta = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $appmeta WHERE app_appointment_id = %d and meta_key = %s ", $app_id, 'additional_fields' )); | |
$meta = maybe_unserialize( $meta[0]->meta_value ); | |
$meta[$add_field] = $add_val; |
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 | |
add_action( 'wp_head', function() { | |
?> | |
<script type="text/javascript"> | |
jQuery(function($){ | |
$('.app_username, .app_password').keypress(function(event) { | |
var keycode = event.keyCode || event.which; | |
if( keycode == 13 ) $('.appointments-login_link-submit').click(); | |
}); |
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 | |
add_filter( 'mp_product/get_price', function( $price, $obj ) { | |
foreach( $price as $key => $val ) | |
{ | |
if( is_numeric( $price[ $key ] ) ) | |
{ | |
$price[ $key ] = $val * 0.9; | |
} | |
} |
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
/*global require*/ | |
/** | |
* When grunt command does not execute try these steps: | |
* | |
* - delete folder 'node_modules' and run command in console: | |
* $ npm install | |
* | |
* - Run test-command in console, to find syntax errors in script: | |
* $ grunt hello |