Skip to content

Instantly share code, notes, and snippets.

View bappi-d-great's full-sized avatar

Bappi D great bappi-d-great

View GitHub Profile
@bappi-d-great
bappi-d-great / add_poll_entry.php
Created August 15, 2018 21:02
Method: add_poll_entry()
<?php
$poll_id = 7;
$entry_meta= array(
array(
'name' => 'text-1',
'value' => 'Text Input Value'
),
array(
'name' => 'email-1',
@bappi-d-great
bappi-d-great / update_form_entry.php
Created August 15, 2018 20:58
Method: update_form_entry()
<?php
$form_id = 7;
$entry_id = 32;
$entry_meta= array(
array(
'name' => 'text-1',
'value' => 'Text Input Value'
),
array(
@bappi-d-great
bappi-d-great / add_form_entry.php
Last active April 14, 2021 17:52
Method: add_form_entry()
<?php
$form_id = 7;
$entry_meta= array(
'name' => 'text-1',
'value' => 'Text Input Value'
);
Forminator_API::add_form_entry( $form_id, $entry_meta );
@bappi-d-great
bappi-d-great / count_entries.php
Created August 14, 2018 18:24
Method: count_entries()
<?php
$form_id = 7;
$num = Forminator_API::count_entries( $form_id );
@bappi-d-great
bappi-d-great / delete_entries.php
Created August 14, 2018 18:10
Method: delete_entries()
<?php
$form_id = 7;
$entry_ids = array( 3, 6, 8, 12 );
Forminator_API::delete_entries( $form_id, $entry_ids );
@bappi-d-great
bappi-d-great / delete_entry.php
Created August 14, 2018 17:47
Method: delete_entry()
<?php
$form_id = 7;
$entry_id = 276;
Forminator_API::delete_entry( $form_id, $entry_id );
@bappi-d-great
bappi-d-great / move_form_field.php
Created August 14, 2018 17:32
Method: move_form_field()
<?php
$form_id = 7;
$id = '1234-5678-9876';
$new_postion = 5;
Forminator_API::move_form_field( $form_id, $id, $new_position );
@bappi-d-great
bappi-d-great / code.php
Created August 13, 2018 18:56
Method: get_entry()
<?php
$form_id = 7;
$entry_id = 20;
$entry = Forminator_API::get_entry( $form_id, $entry_id );
@bappi-d-great
bappi-d-great / code.php
Created August 13, 2018 18:53
Method: get_entries()
<?php
$form_id = 7;
$entries = Forminator_API::get_entries( $form_id );
@bappi-d-great
bappi-d-great / code.php
Created August 13, 2018 08:58
WPMU DEV MARKETPRESS AUTO SELECT COUNTRY AND MAKING PHONE REQUIRED
<?php
add_filter( 'mp_checkout/address_fields_array', function( $address_fields, $type ) {
foreach( $address_fields as $key => $field )
{
if( trim( $field['label'] ) == 'Country' )
{
$address_fields[$key]['value'] = 'BD';
}