APIs on standalone permalink

Filter: ipt_fsqm_standalone_base

Used to modify the standalone permalink base of eForm forms.

Filter Uses

Accepts one argument, a string which represents the original base.

[php]
/**
* Force set a permanent permalink base for FSQM
* Filters ipt_fsqm_standalone_base
*
* @param string $base The origin base
*
* @return string
*/
function force_fsqm_sa_base( $base ) {
// Do something with the base
$base = ‘forcedFSQM’;
return $base;
}
add_filter( ‘ipt_fsqm_standalone_base’, ‘force_fsqm_sa_base’, 10, 1 );
[/php]

Source

Located in classes/class-ipt-fsqm-form-elements-static.php.

Filter: ipt_fsqm_standalone_permalink

Used to modify standalone permalink parts.

Filter Uses

Accepts one argument, an associative array of permalink parts.

[php]
/**
* Filter eForm Standalone Permalinks
* To modify the variable
*
* @param array $permalink The array with permalink variables
*
* @return array
*/
function fsqm_sa_permalink( $permalink ) {
// Do something with the array
// But do not change the url, base or shorturl
// If you do not know what or how
// Otherwise some errors might occur
// One thing you can do is
// Change URL and capture it on your own
// To modify the output of a standalone form
/*
Array
(
[base] => Permalink base
[slug] => Slug generated from form title
[id] => form_id
[url] => https://url/to/form/id/
[shortlink] => https://url/eforms/id/
)
*/
return $permalink;
}
add_filter( ‘ipt_fsqm_standalone_permalink’, ‘fsqm_sa_permalink’, 10, 1 );
[/php]

Source

Located in classes/class-ipt-fsqm-form-elements-static.php

Swashata has written 257 articles

Hi there, I am the Lead Developer at WPQuark.com. I love to create something beautiful for WordPress and here I write about how to use them. When I am not working, usually I am doing a number of other creative things ;).

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.