-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
simple-wall.php
40 lines (36 loc) · 1.17 KB
/
simple-wall.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
namespace SimpleWall;
/**
* Plugin Name: Simple Wall
* Plugin URI: https://thivinfo.com/en
* Description: Display your FB page timeline with a shortcode or a block
* Author: Sébastien SERRE
* Author URI: https://thivinfo.com/en
* Text Domain: simple-wall
* Requires at least: 6.3
* Requires PHP: 8.0
* Tested up to: 6.7
* Version: 1.1.4
* License: GPL v2 or later
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
**/
/**
* Plugin developed by a third party developer not in contact with Facebook company
*/
add_action( 'plugins_loaded', 'SimpleWall\define_constant' );
function define_constant() {
define( 'SIMPLE_VERSION', '1.1.4' );
define( 'SIMPLE_FB_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
define( 'SIMPLE_FB_PLUGIN_PATH', plugin_dir_path( __FILE__ ) );
define( 'SIMPLE_FB_PLUGIN_DIR', untrailingslashit( SIMPLE_FB_PLUGIN_PATH ) );
define( 'SIMPLE_FB_CUST_INC', SIMPLE_FB_PLUGIN_PATH . 'inc/' );
}
add_action( 'plugins_loaded', 'SimpleWall\load_files' );
function load_files() {
$files = scandir( SIMPLE_FB_CUST_INC );
foreach ( $files as $file ) {
if ( is_file( SIMPLE_FB_CUST_INC . $file ) ) {
require SIMPLE_FB_CUST_INC . $file;
}
}
}