# wpgetapi/2.0.6/includes/class-enqueues.php

WPGet API – Connect to any external REST API, version 2.0.6. 47 lines.

- Page: https://pluginprobe.com/plugins/wpgetapi/2.0.6/code/includes/class-enqueues.php
- Raw: https://pluginprobe.com/plugins/wpgetapi/2.0.6/raw/includes/class-enqueues.php
- Modified: 2023-08-22T11:59:00+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/wpgetapi/2.0.6/code/includes/class-enqueues.php#L10-L20`.

```php
<?php

// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) exit;

/**
 * The main class
 *
 * @since 1.4.4
 */
class WpGetApi_Api_Enqueues {


	/**
     * Main constructor
     *
     * @since 1.4.4
     *
     */
    public function __construct() {

        add_action( 'admin_enqueue_scripts', array( $this, 'admin_scripts_styles' ) );

    }

	/**
	 * Enqueue scripts and styles.
	 */
	public function admin_scripts_styles( $hook_suffix ) {

		$v = WPGETAPIVERSION;
		//$v = time();

		if( isset( $hook_suffix ) && strpos( $hook_suffix, 'wpgetapi_' ) !== false )  {

		    wp_enqueue_script( 'wpgetapi-script', WPGETAPIURL .'assets/js/wpgetapi-admin.js', array( 'jquery' ), $v );
		    wp_enqueue_script( 'jquery-ui-tooltip', '', array( 'jquery-ui-core', 'wpgetapi-script' ) );

		}

		wp_enqueue_style( 'wpgetapi-style', WPGETAPIURL .'assets/css/wpgetapi-admin.css', false, $v );

	}

}

return new WpGetApi_Api_Enqueues();
```
