public static function type_key($class) { return MPU::dasherize(str_replace("MPFT_", "", $class)); }
public static function render() { // renders the view which has been prepared by a controller in "init" // get the current users color scheme $color = MPU::dasherize( get_user_option("admin_color") ); // get the current language $lang = get_bloginfo("language"); $lang_short = substr($lang, 0, 2); ?> <div id="mpv<?php echo MasterPress::$suffix ?>" class="wrap clearfix mpv-admin mpv mpv-<?php echo $color ?> { lang: '<?php echo $lang ?>', lang_short: '<?php echo $lang_short ?>' }"> <div class="mpv<?php echo MasterPress::$suffix."-".MasterPress::$action ?> mpv-<?php echo MasterPress::$action ?>"> <?php $view = MasterPress::$view; $controller = MasterPress::$controller; if ($view == "") { MPV::err(__("<strong>Error:</strong> No view has been prepared", MASTERPRESS_DOMAIN)); MPV::messages(); } else { if ($view->auto_form) { $view->form_open(); } $view->title(); $method = $view->method; if (method_exists($view, $method)) { call_user_func_array(array($view, $method), $view->method_args); } if ($view->auto_form) { $view->form_close(); } } ?> </div> </div> <!-- /.mpv --> <?php }
public function key() { if (!$this->key) { $class = get_class($this); $parts = explode("_", $class); if (count($parts) > 1) { $this->key = MPU::dasherize($parts[1]); } else { $this->key = ""; } } return $this->key; }
public function key() { return MPU::dasherize( str_replace("MPV_", "", get_class($this) ) ); }