PluginProbe
WPGet API – Connect to any external REST API / 1.9.0
WPGet API – Connect to any external REST API v1.9.0
1.9.2 1.9.3 1.9.4 1.9.5 1.9.6 1.9.7 1.9.8 1.9.9 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.1.0 2.1.1 2.1.3 2.1.4 2.1.5 2.2.0 2.2.1 2.2.10 2.2.2 2.2.3 All 97 releases
← All changes | includes/class-licenses.php +14 -32 2.2.11.9.0 View file →
@@ -26,43 +26,30 @@
26 26 add_action( 'admin_notices', array( $this, 'admin_notices' ) );
27 27 }
28 28
29 29 /**
30 - * Checks if our extensions are installed
30 + * Adds the plugin license page to the admin menu.
31 31 *
32 + * @return void
32 33 */
33 - function has_extension() {
34 -
34 + function license_menu() {
35 35 if (
36 36 is_plugin_active('wpgetapi-woocommerce/wpgetapi-woocommerce.php' ) ||
37 37 is_plugin_active('wpgetapi-post-import/wpgetapi-post-import.php' ) ||
38 - is_plugin_active('wpgetapi-api-importer/wpgetapi-api-importer.php' ) ||
39 38 is_plugin_active('wpgetapi-oauth/wpgetapi-oauth.php' ) ||
40 39 is_plugin_active('wpgetapi-extras/wpgetapi-extras.php' )
41 - ){
42 - return true;
40 + ) {
41 + add_submenu_page(
42 + 'wpgetapi_setup',
43 + __( 'Plugin Licenses' ),
44 + __( 'Licenses' ),
45 + 'manage_options',
46 + WPGETAPILICENSEPAGE,
47 + array( $this, 'license_page' )
48 + );
43 49 }
44 50
45 51 }
46 -
47 -
48 - /**
49 - * Adds the plugin license page to the admin menu.
50 - *
51 - * @return void
52 - */
53 - function license_menu() {
54 -
55 - add_submenu_page(
56 - 'wpgetapi_setup',
57 - __( 'Plugin Licenses' ),
58 - __( 'Licenses' ),
59 - 'manage_options',
60 - WPGETAPILICENSEPAGE,
61 - array( $this, 'license_page' )
62 - );
63 -
64 - }
65 52
66 53
67 54 function license_page() {
68 55
@@ -80,18 +67,13 @@
80 67
81 68 <?php
82 69 do_settings_sections( WPGETAPILICENSEPAGE );
83 70 settings_fields( 'wpgetapi_licenses_section' );
84 -
85 - // only show save button if extensions installed
86 - if ( $this->has_extension() )
87 - submit_button();
88 -
71 + submit_button();
89 72 ?>
90 73
91 74 </form>
92 75 <?php
93 -
94 76 }
95 77
96 78
97 79 /**
@@ -103,9 +85,9 @@
103 85
104 86 ?>
105 87 <div class="intro">
106 88 <p>License fields will appear here if you have purchased any of our premium plugin extensions.<br>Enter your license keys to receive updates for your premium plugins.</p>
107 - <p><a class="button button-primary" target="_blank" href="https://wpgetapi.com/">View Premium Extensions</a></p>
89 + <p><a class="button" target="_blank" href="https://wpgetapi.com">View premium extensions</a></p>
108 90 </div>
109 91
110 92 <?php
111 93