-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtim-expedia-api.php
More file actions
30 lines (24 loc) · 872 Bytes
/
tim-expedia-api.php
File metadata and controls
30 lines (24 loc) · 872 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
/*
Plugin Name: Tim Expedia Api
Description: This plugin allows to query Expedia Affiliate Network API
Author: Tymur Morozov
Version: 1.0
*/
defined( 'ABSPATH' ) or die( 'Plugin file cannot be accessed directly.' );
define( 'TIMEXPAPI_VERSION', '1.0' );
define( 'TIMEXPAPI__PLUGIN_URL', plugin_dir_url( __FILE__ ) );
define( 'TIMEXPAPI__PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
// add Options Page
require_once( TIMEXPAPI__PLUGIN_DIR . 'options-page.php' );
new TimExpediaApiOptionsPage;
// if ( is_admin() ) {
// }
// register search widget
require_once( TIMEXPAPI__PLUGIN_DIR . 'widget-search.php' );
require_once( TIMEXPAPI__PLUGIN_DIR . 'widget-list.php' );
function register_timexpapi_widgets() {
register_widget("TimExpediaApiSearchWidget");
register_widget("TimExpediaApiListWidget");
}
add_action( 'widgets_init', 'register_timexpapi_widgets' );