PluginProbe
WPGet API – Connect to any external REST API / 1.4.0
WPGet API – Connect to any external REST API v1.4.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 | wpgetapi.php +7 -63 2.1.31.4.0 View file →
@@ -1,13 +1,14 @@
1 1 <?php
2 2 /**
3 3 * Plugin Name: WPGetAPI
4 4 * Plugin URI: https://wordpress.org/plugins/wpgetapi/
5 - * Description: Connect to external API's and display the API data.
6 - * Author: WPGetAPI
5 + * Description: A plugin to connect to and get data from external REST API's.
6 + * Author: wpgetapi
7 7 * Author URI: https://wpgetapi.com/
8 - * Version: 2.1.2
8 + * Version: 1.4.0
9 9 * Text Domain: wpgetapi
10 + * Domain Path: /languages/
10 11 * License: GPL2 or later
11 12 *
12 13 */
13 14
@@ -26,9 +27,9 @@
26 27 * @since 1.0.0
27 28 */
28 29 protected static $_instance = null;
29 30
30 - public $version = '2.1.2';
31 + public $version = '1.4.0';
31 32
32 33 /**
33 34 * Main Instance.
34 35 */
@@ -62,12 +63,12 @@
62 63 *
63 64 * @since 1.0.0
64 65 */
65 66 public function __construct() {
67 +
66 68 $this->define_constants();
67 - $this->hooks();
68 69 $this->includes();
69 -
70 +
70 71 do_action( 'wpgetapi_loaded' );
71 72 }
72 73
73 74 /**
@@ -78,23 +79,11 @@
78 79 $this->define( 'WPGETAPIDIR',plugin_dir_path( __FILE__ ) );
79 80 $this->define( 'WPGETAPIURL',plugin_dir_url( __FILE__ ) );
80 81 $this->define( 'WPGETAPIBASENAME', plugin_basename( __FILE__ ) );
81 82 $this->define( 'WPGETAPIVERSION', $this->version );
82 - $this->define( 'WPGETAPILICENSEPAGE', 'wpgetapi_plugin_licenses' );
83 - $this->define( 'WPGETAPISTOREURL', 'https://wpgetapi.com' );
84 83 }
85 84
86 85 /**
87 - * Define hooks.
88 - * @since 1.4.2
89 - */
90 - private function hooks() {
91 - $plugin_file = WPGETAPIBASENAME;
92 - add_filter( "plugin_action_links_{$plugin_file}", array( $this, 'plugin_action_links' ), 10, 4 );
93 - add_filter( 'plugin_row_meta', array( $this, 'filter_plugin_row_meta' ), 10, 4 );
94 - }
95 -
96 - /**
97 86 * Define constant if not already set.
98 87 * @since 1.0.0
99 88 */
100 89 private function define( $name, $value ) {
@@ -110,9 +99,8 @@
110 99 */
111 100 public function includes() {
112 101
113 102 require_once ( WPGETAPIDIR . '/lib/cmb2/init.php' );
114 - require_once ( WPGETAPIDIR . '/includes/block-editor/block-editor.php' );
115 103
116 104 include_once ( WPGETAPIDIR . 'includes/class-encryption.php' );
117 105 include_once ( WPGETAPIDIR . 'includes/class-admin-options.php' );
118 106
@@ -120,53 +108,9 @@
120 108 include_once ( WPGETAPIDIR . 'includes/class-enqueues.php' );
121 109 include_once ( WPGETAPIDIR . 'includes/class-api.php' );
122 110
123 111 include_once ( WPGETAPIDIR . 'frontend/functions.php' );
124 - include_once ( WPGETAPIDIR . 'includes/class-licenses.php' );
125 112
126 - }
127 -
128 - /**
129 - * Filters the array of row meta for each plugin in the Plugins list table.
130 - *
131 - * @param array<int,string> $plugin_meta An array of the plugin row's meta data.
132 - * @param string $plugin_file Path to the plugin file relative to the plugins directory.
133 - * @return array<int,string> An array of the plugin row's meta data.
134 - */
135 - function filter_plugin_row_meta( array $plugin_meta, $plugin_file ) {
136 - if ( 'wpgetapi/wpgetapi.php' !== $plugin_file ) {
137 - return $plugin_meta;
138 - }
139 -
140 - $plugin_meta[] = sprintf(
141 - '<a href="%1$s">%2$s</a>',
142 - 'https://wpgetapi.com/docs/?utm_campaign=Docs&utm_medium=plugin&utm_source=external',
143 - esc_html( 'Docs', 'wpgetapi' )
144 - );
145 -
146 - return $plugin_meta;
147 - }
148 -
149 -
150 - /**
151 - * Adds items to the plugin's action links on the Plugins listing screen.
152 - *
153 - * @param array<string,string> $actions Array of action links.
154 - * @param string $plugin_file Path to the plugin file relative to the plugins directory.
155 - * @param mixed[] $plugin_data An array of plugin data.
156 - * @param string $context The plugin context.
157 - * @return array<string,string> Array of action links.
158 - */
159 - function plugin_action_links( $actions, $plugin_file, $plugin_data, $context ) {
160 - $new = array(
161 - 'setup' => sprintf(
162 - '<a href="%s">%s</a>',
163 - esc_url( admin_url( 'admin.php?page=wpgetapi_setup' ) ),
164 - esc_html__( 'API Setup', 'wpgetapi' )
165 - ),
166 - );
167 -
168 - return array_merge( $new, $actions );
169 113 }
170 114
171 115 }
172 116