WordPress at a glance
function is not described


PxcmsInstaller::inflectThemeVars() 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->inflectThemeVars( $vars );
$vars (required)

Code of PxcmsInstaller::inflectThemeVars() WC 5.3.0

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

    return $vars;