WordPress at a glance
function is not described


PxcmsInstaller::inflectModuleVars() protected WC 1.0

For package type pxcms-module, cut off a trailing '-plugin' if present.

return string

{} It's a method of the class: PxcmsInstaller{}

No Hooks.


null. Nothing.


// protected - for code of main (parent) or child class
$result = $this->inflectModuleVars( $vars );
$vars (required)

Code of PxcmsInstaller::inflectModuleVars() WC 5.2.2

protected function inflectModuleVars($vars)
    $vars['name'] = str_replace('pxcms-', '', $vars['name']);       // strip out pxcms- just incase (legacy)
    $vars['name'] = str_replace('module-', '', $vars['name']);      // strip out module-
    $vars['name'] = preg_replace('/-module$/', '', $vars['name']);  // strip out -module
    $vars['name'] = str_replace('-', '_', $vars['name']);           // make -'s be _'s
    $vars['name'] = ucwords($vars['name']);                         // make module name camelcased

    return $vars;