PKNy\x/||CoreController.phpnuW+A loco-core-view */ class Loco_admin_list_CoreController extends Loco_admin_RedirectController { /** * {@inheritdoc} */ public function getLocation(){ return Loco_mvc_AdminRouter::generate('core-view'); } }PKNy\؞..ThemesController.phpnuW+Aset('type', 'theme' ); $this->set('title', __( 'Translate themes', 'loco' ) ); /* @var $theme WP_Theme */ foreach( wp_get_themes() as $theme ){ $bundle = Loco_package_Theme::create( $theme->get_stylesheet() ); $this->addBundle( $bundle ); } return parent::render(); } }PKNy\fs>>PluginsController.phpnuW+Aset( 'type', 'plugin' ); $this->set( 'title', __( 'Translate plugins', 'loco' ) ); foreach( Loco_package_Plugin::get_plugins() as $handle => $data ){ try { $bundle = Loco_package_Plugin::create( $handle ); $this->addBundle($bundle); } // @codeCoverageIgnoreStart catch( Exception $e ){ $bundle = new Loco_package_Plugin( $handle, $handle ); $this->addBundle( $bundle ); } // @codeCoverageIgnoreEnd } return parent::render(); } }PKNy\rݠ BaseController.phpnuW+AgetHandle(); // compatibility will be 'ok', 'warn' or 'error' depending on severity if( $default = $bundle->getDefaultProject() ){ $compat = $default->getPot() instanceof Loco_fs_File; } else { $compat = false; } //$info = $bundle->getHeaderInfo(); return new Loco_mvc_ViewParams( array ( 'id' => $bundle->getId(), 'name' => $bundle->getName(), 'dflt' => $default ? $default->getDomain() : '--', 'size' => count( $bundle ), 'save' => $bundle->isConfigured(), 'type' => $type = strtolower( $bundle->getType() ), 'view' => Loco_mvc_AdminRouter::generate( $type.'-view', array( 'bundle' => $handle ) ), 'time' => $bundle->getLastUpdated(), ) ); } /** * Add bundle to enabled or disabled list, depending on whether it is configured */ protected function addBundle( Loco_package_Bundle $bundle ){ $this->bundles[] = $this->bundleParam($bundle); } /** * {@inheritdoc} */ public function getHelpTabs(){ return array ( __('Overview','default') => $this->view('tab-list-bundles'), ); } /** * {@inheritdoc} */ public function render(){ // breadcrumb is just the root $here = new Loco_admin_Navigation( array ( new Loco_mvc_ViewParams( array( 'name' => $this->get('title') ) ), ) ); /*/ tab between the types of bundles $types = array ( '' => __('Home','loco'), 'theme' => __('Themes','loco'), 'plugin' => __('Plugins','loco'), ); $current = $this->get('_route'); $tabs = new Loco_admin_Navigation; foreach( $types as $type => $name ){ $href = Loco_mvc_AdminRouter::generate($type); $tabs->add( $name, $href, $type === $current ); } */ return $this->view( 'admin/list/bundles', array ( 'bundles' => $this->bundles, 'breadcrumb' => $here, ) ); } }PKWy\rhv|| inc-table.phpnuW+A
e('name')?> e('dflt')?> time ? $bundle->date('time') : print '--'?> n('size')?>
PKWy\ұ bundles.phpnuW+Aextend('../layout'); echo $this->render('../common/inc-table-filter'); echo $this->render('inc-table');PKNy\x/||CoreController.phpnuW+APKNy\؞..ThemesController.phpnuW+APKNy\fs>>0PluginsController.phpnuW+APKNy\rݠ BaseController.phpnuW+APKWy\rhv|| inc-table.phpnuW+APKWy\ұ bundles.phpnuW+APK