| @@ -18,9 +18,8 @@ | ||
| 18 | 18 | // | MA 02110-1301 USA | |
| 19 | 19 | // +----------------------------------------------------------------------+ |
| 20 | 20 | // | Author: Eugene Manuilov <eugene@manuilov.org> | |
| 21 | 21 | // +----------------------------------------------------------------------+ |
| 22 | - | |
| 23 | 22 | /** |
| 24 | 23 | * The core plugin class. |
| 25 | 24 | * |
| 26 | 25 | * @category Visualizer |
| @@ -29,9 +28,9 @@ | ||
| 29 | 28 | */ |
| 30 | 29 | class Visualizer_Plugin { |
| 31 | 30 | |
| 32 | 31 | const NAME = 'visualizer'; |
| 33 | - const VERSION = '1.6.6'; | |
| 32 | + const VERSION = '1.7.0'; | |
| 34 | 33 | |
| 35 | 34 | // custom post types |
| 36 | 35 | const CPT_VISUALIZER = 'visualizer'; |
| 37 | 36 | |
| @@ -48,9 +47,9 @@ | ||
| 48 | 47 | const ACTION_EDIT_CHART = 'visualizer-edit-chart'; |
| 49 | 48 | const ACTION_CLONE_CHART = 'visualizer-clone-chart'; |
| 50 | 49 | const ACTION_DELETE_CHART = 'visualizer-delete-chart'; |
| 51 | 50 | const ACTION_UPLOAD_DATA = 'visualizer-upload-data'; |
| 52 | - // Added by Ash/Upwork | |
| 51 | + // Added by Ash/Upwork | |
| 53 | 52 | const ACTION_EXPORT_DATA = 'visualizer-export-data'; |
| 54 | 53 | |
| 55 | 54 | // custom filters |
| 56 | 55 | const FILTER_CHART_WRAPPER_CLASS = 'visualizer-chart-wrapper-class'; |
| @@ -57,13 +56,12 @@ | ||
| 57 | 56 | const FILTER_GET_CHART_SERIES = 'visualizer-get-chart-series'; |
| 58 | 57 | const FILTER_GET_CHART_DATA = 'visualizer-get-chart-data'; |
| 59 | 58 | const FILTER_GET_CHART_SETTINGS = 'visualizer-get-chart-settings'; |
| 60 | 59 | |
| 61 | - // Added by Ash/Upwork | |
| 62 | - const PRO_TEASER_URL = "http://themeisle.com/plugins/visualizer-charts-and-graphs-pro-addon/"; | |
| 63 | - const PRO_TEASER_TITLE = "Check PRO version "; | |
| 64 | - // Added by Ash/Upwork | |
| 65 | - | |
| 60 | + // Added by Ash/Upwork | |
| 61 | + const PRO_TEASER_URL = 'http://themeisle.com/plugins/visualizer-charts-and-graphs-pro-addon/'; | |
| 62 | + const PRO_TEASER_TITLE = 'Check PRO version '; | |
| 63 | + // Added by Ash/Upwork | |
| 66 | 64 | /** |
| 67 | 65 | * Singletone instance of the plugin. |
| 68 | 66 | * |
| 69 | 67 | * @since 1.0.0 |
| @@ -127,9 +125,9 @@ | ||
| 127 | 125 | * @param string $name The name of the module to return. |
| 128 | 126 | * @return Visualizer_Module|null Returns a module if it was registered or NULL. |
| 129 | 127 | */ |
| 130 | 128 | public function getModule( $name ) { |
| 131 | - return isset( $this->_modules[$name] ) ? $this->_modules[$name] : null; | |
| 129 | + return isset( $this->_modules[ $name ] ) ? $this->_modules[ $name ] : null; | |
| 132 | 130 | } |
| 133 | 131 | |
| 134 | 132 | /** |
| 135 | 133 | * Determines whether the module has been registered or not. |
| @@ -140,9 +138,9 @@ | ||
| 140 | 138 | * @param string $name The name of a module to check. |
| 141 | 139 | * @return boolean TRUE if the module has been registered. Otherwise FALSE. |
| 142 | 140 | */ |
| 143 | 141 | public function hasModule( $name ) { |
| 144 | - return isset( $this->_modules[$name] ); | |
| 142 | + return isset( $this->_modules[ $name ] ); | |
| 145 | 143 | } |
| 146 | 144 | |
| 147 | 145 | /** |
| 148 | 146 | * Register new module in the plugin. |
| @@ -149,12 +147,12 @@ | ||
| 149 | 147 | * |
| 150 | 148 | * @since 1.0.0 |
| 151 | 149 | * |
| 152 | 150 | * @access public |
| 153 | - * @param string $module The name of the module to use in the plugin. | |
| 151 | + * @param string $class The name of the module to use in the plugin. | |
| 154 | 152 | */ |
| 155 | 153 | public function setModule( $class ) { |
| 156 | - $this->_modules[$class] = new $class( $this ); | |
| 154 | + $this->_modules[ $class ] = new $class( $this ); | |
| 157 | 155 | } |
| 158 | 156 | |
| 159 | 157 | /** |
| 160 | 158 | * Returns chart types. |
| @@ -165,10 +163,10 @@ | ||
| 165 | 163 | * @access public |
| 166 | 164 | * @return array |
| 167 | 165 | */ |
| 168 | 166 | public static function getChartTypes() { |
| 169 | - $array = array_keys(Visualizer_Module_Admin::_getChartTypesLocalized()); | |
| 170 | - unset($array[0]); // all | |
| 171 | - return $array; | |
| 167 | + $array = array_keys( Visualizer_Module_Admin::_getChartTypesLocalized() ); | |
| 168 | + unset( $array[0] ); // all | |
| 169 | + return $array; | |
| 172 | 170 | } |
| 173 | 171 | |
| 174 | -} | |
| 172 | +} | |