Methods summary
public
|
|
public
|
#
enqueue( )
Enqueue the plugin scripts/styles
Enqueue the plugin scripts/styles
|
protected
boolean
|
#
shouldLoadScripts( )
Should the load the scripts/styles be loaded?
Should the load the scripts/styles be loaded?
Returns
boolean
|
protected
|
#
enqueueStyles( )
Enqueue the plugin styles
Enqueue the plugin styles
|
public
array
|
#
getStyles( boolean $isPreview = false )
Get the styles to be enqueued
Get the styles to be enqueued
Parameters
- $isPreview
- True to get the styles for the form preview
Returns
array
|
protected
|
|
public
array
|
#
getScripts( boolean $isPreview = false )
Get the scripts to be enqueued
Get the scripts to be enqueued
Parameters
- $isPreview
- True to get the scripts for the form preview
Returns
array
|
public
array
|
#
jsL10n( )
JavaScript localisation
Returns
array
|
public
|
|
protected
boolean
|
#
detectFormInContent( )
Check if the page content has one of the shortcodes
Check if the page content has one of the shortcodes
Returns
boolean
|
protected
boolean
|
#
detectFormInWidget( )
Check if there is one of the widgets on the current page
Check if there is one of the widgets on the current page
Returns
boolean
|
public
|
#
handleSaveForm( array $config )
Update the feature cache and generate the CSS/JS files
Update the feature cache and generate the CSS/JS files
Parameters
|
public
|
#
handleActivateForms( array $ids )
Update the feature cache and move the custom CSS flag to active
Update the feature cache and move the custom CSS flag to active
Parameters
|
public
|
#
handleDeactivateForms( array $ids )
Update the feature cache and move the custom CSS flag to inactive
Update the feature cache and move the custom CSS flag to inactive
Parameters
|
public
|
#
handleDuplicateForms( array $ids )
Update the feature cache and generate the custom CSS file
Update the feature cache and generate the custom CSS file
Parameters
|
public
|
#
handleTrashForms( array $ids )
Remove anything related to the form from the feature cache, and delete the form custom CSS file
Remove anything related to the form from the feature cache, and delete the form custom CSS file
Parameters
|
public
|
|
public
|
#
handleSaveSettings( )
Generate the custom CSS/JS files when the settings are saved
Generate the custom CSS/JS files when the settings are saved
|
public
|
#
generateFiles( )
Generate the custom/combined CSS and JS files
Generate the custom/combined CSS and JS files
|
protected
|
#
generateFormCssFile( Quform_Form[] $forms )
Generate the custom CSS file for the given forms
Generate the custom CSS file for the given forms
Parameters
- $forms
- The array of forms
|
protected
|
#
generateCustomCssFile( )
Generate the custom CSS file which is all form custom CSS files combined into one
Generate the custom CSS file which is all form custom CSS files combined into one
|
protected
|
#
generateCustomJsFile( )
Generate the custom JS file with the code from the Settings page
Generate the custom JS file with the code from the Settings page
|
protected
|
#
generateCombinedCssFile( )
Generate the CSS file containing all plugin CSS files combined
Generate the CSS file containing all plugin CSS files combined
|
protected
|
#
generateCombinedJsFile( )
Generate the JS file containing all plugin JS files combined
Generate the JS file containing all plugin JS files combined
|
public
string
|
#
getCachePath( string $extra = '' )
Get the path to the cache directory
Get the path to the cache directory
Parameters
- $extra
- Extra path to append to the path
Returns
string Path without trailing slash
|
protected
string
|
#
getCacheUrl( string $extra = '' )
Get the URL to the cache directory
Get the URL to the cache directory
Parameters
- $extra
- Extra path to append to the path
Returns
string Path without trailing slash
|
protected
boolean
|
#
isCacheDirWritable( )
Is the cache directory writable?
Is the cache directory writable?
Returns
boolean
|
protected
string
|
#
getFormCssFilename( integer $formId )
Get the filename of the individual custom CSS file for the given form ID
Get the filename of the individual custom CSS file for the given form ID
Parameters
Returns
string
|
protected
string
|
#
getCustomCssFilename( )
Get the filename of the combined custom CSS file
Get the filename of the combined custom CSS file
Returns
string
|
protected
string
|
#
getCombinedCssFilename( )
Get the filename of the combined CSS file
Get the filename of the combined CSS file
Returns
string
|
protected
string
|
#
getCustomJsFilename( )
Get the filename of the custom JS file
Get the filename of the custom JS file
Returns
string
|
protected
string
|
#
getCombinedJsFilename( )
Get the filename of the combined JS file
Get the filename of the combined JS file
Returns
string
|
protected
|
#
updateActiveFeatureCache( array $configs )
Update the active feature cache for the given form configs
Update the active feature cache for the given form configs
Parameters
|
public
|
#
rebuildScriptCache( )
Rebuild the feature cache and custom CSS files
Rebuild the feature cache and custom CSS files
|
public
|
#
activate( )
On plugin activation generate the combined script files
On plugin activation generate the combined script files
|
protected
string
|
#
minifyCss( string $css )
Minify the given CSS
Parameters
Returns
string
|
protected
|
#
setPermissions( string $file )
Set the permissions of the generated file
Set the permissions of the generated file
Parameters
|