PluginProbe
CSS & JavaScript Toolbox / 7.2
CSS & JavaScript Toolbox v7.2
trunk 0.3 0.8 10 10.1 11 11.2 11.3 11.4 11.5 11.6 11.7 11.8 11.9 11.9.1 12 12.0 12.0.1 12.0.3 12.0.4 12.0.5 12.0.6 12.0.7 6.0 6.0.11 All 60 releases
← All changes | views/extensions/plugins-list/view.php +26 -30 11.87.2 View file →
@@ -1,7 +1,7 @@
1 1 <?php
2 2 /**
3 -*
3 +*
4 4 */
5 5
6 6 // Disallow direct access.
7 7 defined('ABSPATH') or die("Access denied");
@@ -6,22 +6,22 @@
6 6 // Disallow direct access.
7 7 defined('ABSPATH') or die("Access denied");
8 8
9 9 /**
10 -*
10 +*
11 11 */
12 12 class CJTExtensionsPluginsListView extends CJTView {
13 -
13 +
14 14 /**
15 15 * put your comment there...
16 - *
16 + *
17 17 * @var mixed
18 18 */
19 19 protected $extensions;
20 -
20 +
21 21 /**
22 22 * put your comment there...
23 - *
23 + *
24 24 * @var mixed
25 25 */
26 26 protected $listTypeName;
27 27
@@ -26,16 +26,16 @@
26 26 protected $listTypeName;
27 27
28 28 /**
29 29 * put your comment there...
30 - *
30 + *
31 31 * @var mixed
32 32 */
33 33 protected $securityToken;
34 -
34 +
35 35 /**
36 36 * put your comment there...
37 - *
37 + *
38 38 * @param mixed $info
39 39 * @return CJTInstallerNoticeView
40 40 */
41 41 public function __construct($info) {
@@ -44,16 +44,16 @@
44 44 // Enqueue Styles & Scripts.
45 45 add_action('admin_print_styles', array(__CLASS__, 'enqueueStyles'));
46 46 add_action('admin_print_scripts', array(__CLASS__, 'enqueueScripts'));
47 47 }
48 -
48 +
49 49 /**
50 50 * put your comment there...
51 - *
51 + *
52 52 * @param mixed $parent
53 53 */
54 54 public function activateExtensionsMenuItem($parent) {
55 - // Hack Wordpress menu to select CSS & JavaScript root menu item
55 + // Hack Wordpress menu to select CSS & Javascript root menu item
56 56 // and the Extensions child menu item!
57 57 // We just hack get_admin_page_parent() function!
58 58 $GLOBALS['typenow'] = CJTPlugin::PLUGIN_REQUEST_ID;
59 59 $GLOBALS['pagenow'] = CJTPlugin::PLUGIN_REQUEST_ID;
@@ -60,12 +60,12 @@
60 60 $GLOBALS['plugin_page'] = $GLOBALS['submenu'][CJTPlugin::PLUGIN_REQUEST_ID][CJTExtensionsAccessPoint::MENU_POSITION_INDEX][2];
61 61 // We use this filter as (ACTION) not change in the return value!
62 62 return $parent;
63 63 }
64 -
64 +
65 65 /**
66 66 * put your comment there...
67 - *
67 + *
68 68 * @param mixed $links
69 69 */
70 70 public function addExtensionActions($links, $file) {
71 71 $pluginsFilesMap =& $this->extensions->getFiles2ClassesMap();
@@ -77,25 +77,21 @@
77 77 $extension = $extensions[$class];
78 78 // We only work with extensions that required license key!
79 79 if ($extension['definition']['primary']['requiredLicense']) {
80 80 // Load license
81 - $definition = new SimpleXMLElement($extension['definition']['raw']);
82 - $component['pluginBase'] = $file;
83 - // Get extension title
84 - // Use first license type name for old extensions that doesnt
85 - // provide title attribute
86 - $defTitle = (string) $definition->license->attributes()->title;
87 - $component['title'] = $defTitle ? $defTitle : ((string) $definition->license->name[0]);
81 + $definition = new SimpleXMLElement($extension['definition']['raw']);
82 + $component['name'] = (string) $definition->license->name;
83 + $component['pluginBase'] = $file;
88 84 // Get action Markup!
89 85 $links['license-key'] = $this->getTemplate('default_setup_action', array('component' => $component));
90 86 }
91 87 }
92 - return $links;
88 + return $links;
93 89 }
94 -
90 +
95 91 /**
96 92 * put your comment there...
97 - *
93 + *
98 94 * @param mixed $tpl
99 95 */
100 96 public function display($tpl = null) {
101 97 // Get model object!
@@ -113,12 +109,12 @@
113 109 // Add SETUP Link inside the Plugins (only CJT extensions) row!
114 110 add_filter('plugin_action_links', array(&$this, 'addExtensionActions'), 10 , 2);
115 111
116 112 }
117 -
113 +
118 114 /**
119 115 * put your comment there...
120 - *
116 + *
121 117 */
122 118 public static function enqueueScripts() {
123 119 $listTypeName = CJTModel::getInstance('extensions')->getListTypeName();
124 120 // Use related scripts.
@@ -130,12 +126,12 @@
130 126 'views:extensions:plugins-list:public:js:{CJTExtensionsPluginsListView-}default',
131 127 "views:extensions:plugins-list:public:js:{CJTExtensionsPluginsListView-}{$listTypeName}"
132 128 );
133 129 }
134 -
130 +
135 131 /**
136 132 * put your comment there...
137 - *
133 + *
138 134 */
139 135 public static function enqueueStyles() {
140 136 $listTypeName = CJTModel::getInstance('extensions')->getListTypeName();
141 137 // Use related scripts.
@@ -143,13 +139,13 @@
143 139 'thickbox',
144 140 "views:extensions:plugins-list:public:css:{CJTExtensionsPluginsListView-}{$listTypeName}"
145 141 );
146 142 }
147 -
143 +
148 144 /**
149 145 * put your comment there...
150 - *
146 + *
151 147 */
152 148 public function outputCommonMarkups() {
153 149 echo $this->getTemplate('default');
154 150 }
155 151 } // End class.