PluginProbe
ERP: Complete HR, Accounting & CRM Suite Built for WooCommerce / 1.3.13
ERP: Complete HR, Accounting & CRM Suite Built for WooCommerce v1.3.13
1.17.9 1.17.8 1.17.7 1.17.6 1.17.5 1.17.4 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.3.0 1.3.1 1.3.11 1.3.12 1.3.13 1.3.14 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 All 143 releases
erp / includes / class-status.php

class-status.php in ERP: Complete HR, Accounting & CRM Suite Built for WooCommerce 1.3.13, at includes/class-status.php

64 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace WeDevs\ERP;
3
4 /**
5 * ERP Status menu
6 */
7 class Status {
8
9 /**
10 * Kick-in the class
11 */
12 public function __construct() {
13 $this->status_scripts();
14
15 include dirname( __FILE__ ) . '/framework/views/status-page.php';
16 }
17
18 /**
19 * Get status scripts
20 *
21 * @return void
22 */
23 public function status_scripts() {
24 wp_enqueue_script( 'erp-system-status' );
25 }
26
27 /**
28 * Include status report file
29 *
30 * @return void
31 */
32 public static function status_report() {
33 include_once( dirname( __FILE__ ) . '/framework/views/status-report.php' );
34 }
35
36 /**
37 * Get latest version of a theme by slug.
38 * @param object $theme WP_Theme object.
39 * @return string Version number if found.
40 */
41 public static function get_latest_theme_version( $theme ) {
42 include_once( ABSPATH . 'wp-admin/includes/theme.php' );
43
44 $api = themes_api( 'theme_information', array(
45 'slug' => $theme->get_stylesheet(),
46 'fields' => array(
47 'sections' => false,
48 'tags' => false,
49 ),
50 ) );
51
52 $update_theme_version = 0;
53
54 // Check .org for updates.
55 if ( is_object( $api ) && ! is_wp_error( $api ) ) {
56 $update_theme_version = $api->version;
57 }
58
59 return $update_theme_version;
60 }
61
62 }
63
64