-
Notifications
You must be signed in to change notification settings - Fork 2
/
cpwp-showcase.php
40 lines (33 loc) · 1.08 KB
/
cpwp-showcase.php
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
<?php
/*
* Plugin Name: Showcase
* Description: Website showcase
* Version: 0.1
* Author: Comunidade Portuguesa de WordPress, Marco Pereirinha, Ricardo Correia
* Author URI: http://wp-portugal.com
* Text Domain: cpwp_showcase
* Domain Path: /languages
* License: GPLv3
* License URI: http://www.gnu.org/licenses/gpl-3.0
*/
namespace CPWP\Showcase\Core\Init;
defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
define( 'CPWP_SHOWCASE_PATH', trailingslashit( plugin_dir_path( __FILE__ ) ) );
define( 'CPWP_SHOWCASE_URL', trailingslashit( plugin_dir_url( __FILE__ ) ) );
// Register plugin textdomain
function load_textdomain() {
load_plugin_textdomain( 'cpwp_showcase', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
}
add_action( 'plugins_loaded', __NAMESPACE__ . '\load_textdomain' );
function boot() {
$boot_sequence = [
'includes/*.php',
];
foreach ( $boot_sequence as $path ) {
$includes = glob( CPWP_SHOWCASE_PATH . $path );
foreach ( $includes as $entry ) {
include_once( $entry );
}
}
}
add_action( 'init', __NAMESPACE__ . '\boot', 0 );