-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbootstrap.php
More file actions
62 lines (55 loc) · 1.37 KB
/
bootstrap.php
File metadata and controls
62 lines (55 loc) · 1.37 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<?php
/**
* Groupby Lab Tester Plugin
*
* You can find the Hands-on Advanced Lab here: https://knowthecode.io/labs/get-posts-by-terms
*
* @package UpTechLabs\KnowTheCode\GroupbyLab
* @author hellofromTonya
* @license GPL-2.0+
*
* @wordpress-plugin
* Plugin Name: Groupby Lab Tester Plugin
* Plugin URI: https://gitlab.com/knowthecode/Groupby-Lab-Tester
* Lab URI: https://knowthecode.io/labs/get-posts-by-terms
* Description: Know the Code Hands-on Advanced Lab - demonstrating approaches to get posts grouped by their terms.
* Version: 1.0.0
* Author: hellofromTonya
* Author URI: https://uptechlabs.io
* Text Domain: groupby_lab
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
*/
namespace UpTechLabs\KnowTheCode\GroupbyLab;
if ( ! defined( 'ABSPATH' ) ) {
exit( 'Cheatin’ uh?' );
}
/**
* Setup the plugin's constants.
*
* @since 1.0.0
*
* @return void
*/
function init_constants() {
$plugin_url = plugin_dir_url( __FILE__ );
if ( is_ssl() ) {
$plugin_url = str_replace( 'http://', 'https://', $plugin_url );
}
define( 'GROUPBY_LAB_URL', $plugin_url );
define( 'GROUPBY_LAB_DIR', plugin_dir_path( __DIR__ ) );
}
/**
* Launch the plugin
*
* @since 1.0.0
*
* @return void
*/
function launch() {
init_constants();
require_once( 'src/tester.php' );
}
if ( ! is_admin() ) {
launch();
}