PluginProbe
F4 Post Tree / 1.1.5
F4 Post Tree v1.1.5
trunk 1.0.2 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.1.1 1.1.10 1.1.11 1.1.12 1.1.13 1.1.14 1.1.15 1.1.16 1.1.18 1.1.19 1.1.2 1.1.20 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.1.8 All 29 releases
f4-tree / f4-tree.php

f4-tree.php in F4 Post Tree 1.1.5, at f4-tree.php

97 lines 3.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /*
4 Plugin Name: F4 Post Tree
5 Plugin URI: https://www.faktorvier.ch
6 Description: Adds a tree to the pages
7 Version: 1.1.5
8 Author: FAKTOR VIER
9 Author URI: https://www.faktorvier.ch
10 License: GPLv2
11 License URI: https://www.gnu.org/licenses/gpl-2.0.html
12 Text Domain: f4-tree
13 Domain Path: /languages*/
14 if ( !defined( 'ABSPATH' ) ) {
15 exit;
16 }
17 define( 'F4_TREE_VERSION', '1.1.5' );
18 define( 'F4_TREE_SLUG', 'f4-tree' );
19 define( 'F4_TREE_MAIN_FILE', __FILE__ );
20 define( 'F4_TREE_BASENAME', plugin_basename( F4_TREE_MAIN_FILE ) );
21 define( 'F4_TREE_PATH', dirname( F4_TREE_MAIN_FILE ) . DIRECTORY_SEPARATOR );
22 define( 'F4_TREE_URL', plugins_url( '/', F4_TREE_MAIN_FILE ) );
23 define( 'F4_TREE_PLUGIN_FILE', basename( F4_TREE_BASENAME ) );
24 define( 'F4_TREE_PLUGIN_FILE_PATH', F4_TREE_PATH . F4_TREE_PLUGIN_FILE );
25
26 if ( function_exists( 'ft_tree_fs' ) ) {
27 ft_tree_fs()->set_basename( false, __FILE__ );
28 } else {
29
30 if ( !function_exists( 'ft_tree_fs' ) ) {
31 // Create a helper function for easy SDK access.
32 function ft_tree_fs()
33 {
34 global $ft_tree_fs ;
35
36 if ( !isset( $ft_tree_fs ) ) {
37 // Include Freemius SDK.
38 require_once dirname( __FILE__ ) . '/freemius/start.php';
39 $ft_tree_fs = fs_dynamic_init( array(
40 'id' => '6913',
41 'slug' => 'f4-tree',
42 'premium_slug' => 'f4-tree-pro',
43 'type' => 'plugin',
44 'public_key' => 'pk_9fe9dc7631d539c9f0edd5ec059f2',
45 'is_premium' => false,
46 'premium_suffix' => 'PRO',
47 'navigation' => 'tabs',
48 'has_addons' => false,
49 'has_paid_plans' => true,
50 'menu' => array(
51 'slug' => 'f4-tree-settings',
52 'support' => false,
53 'contact' => false,
54 'pricing' => false,
55 'parent' => array(
56 'slug' => 'options-general.php',
57 ),
58 ),
59 'is_live' => true,
60 ) );
61 }
62
63 return $ft_tree_fs;
64 }
65
66 // Init Freemius.
67 ft_tree_fs();
68 // Add plugin icon
69 ft_tree_fs()->add_filter( 'plugin_icon', function () {
70 return F4_TREE_PATH . 'assets/img/f4-tree.jpg';
71 } );
72 // Signal that SDK was initiated.
73 do_action( 'ft_tree_fs_loaded' );
74 }
75
76 }
77
78 // Add autoloader
79 spl_autoload_register( function ( $class ) {
80 $class = ltrim( $class, '\\' );
81 $ns_prefix = 'F4\\TREE\\';
82 if ( strpos( $class, $ns_prefix ) !== 0 ) {
83 return;
84 }
85 $class_name = str_replace( $ns_prefix, '', $class );
86 $class_path = str_replace( '\\', DIRECTORY_SEPARATOR, $class_name );
87 $class_file = F4_TREE_PATH . $class_path . '.php';
88 if ( file_exists( $class_file ) ) {
89 require_once $class_file;
90 }
91 } );
92 // Init core
93 F4\TREE\Core\Hooks::init();
94 // Init modules
95 //F4\TREE\Update\Hooks::init();
96 F4\TREE\Tree\Hooks::init();
97