| @@ -1173,5 +1173,20 @@ | ||
| 1173 | 1173 | </div> |
| 1174 | 1174 | <?php |
| 1175 | 1175 | } |
| 1176 | 1176 | } |
| 1177 | + | |
| 1178 | + /** | |
| 1179 | + * Check chart is enabled or not. | |
| 1180 | + * | |
| 1181 | + * @param string $type Chart ID. | |
| 1182 | + * | |
| 1183 | + * @return bool Default false | |
| 1184 | + */ | |
| 1185 | + public static function checkChartStatus( $type ) { | |
| 1186 | + $types = self::_getChartTypesLocalized( false, false, false, true ); | |
| 1187 | + if ( isset( $types[ $type ] ) ) { | |
| 1188 | + return ! empty( $types[ $type ]['enabled'] ); | |
| 1189 | + } | |
| 1190 | + return false; | |
| 1191 | + } | |
| 1177 | 1192 | } |