PluginProbe
WP Coder – Insert & Manage Code Snippets / 4.5
WP Coder – Insert & Manage Code Snippets v4.5
4.5.1 1.1 2.3.1 2.3.2 2.4.1 2.5.1 2.5.2 2.5.3 2.5.4 2.5.5 2.5.6 3.0 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.1 3.1.1 3.2 3.2.1 3.3 3.4 3.5 3.5.1 All 39 releases
← All changes | includes/class-wowp-public.php +2 -16 3.34.5 View file →
@@ -9,35 +9,21 @@
9 9 use WPCoder\Optimization\HTMLMinifier;
10 10 use WPCoder\Publisher\Conditions;
11 11 use WPCoder\Publisher\EnqueueScript;
12 12 use WPCoder\Publisher\EnqueueStyle;
13 +use WPCoder\Publisher\PHPIncludes;
13 14 use WPCoder\Publisher\Singleton;
14 15
15 16 class WOWP_Public {
16 17
17 18 public function __construct() {
18 - $this->include_global_php();
19 -
20 19 add_shortcode( 'WP-Coder', [ $this, 'shortcode' ] );
21 20 add_shortcode( WPCoder::SHORTCODE, [ $this, 'shortcode' ] );
22 21
23 22 add_action( 'wp_footer', [ $this, 'print_footer' ], 50 );
24 - }
25 23
26 - public function include_global_php() {
27 - $page_path = FolderManager::path_upload_dir() . 'global-php.php';
28 - $save_mode = isset( $_GET['wpcoder-safe-mode'] ) ? absint( $_GET['wpcoder-safe-mode'] ) : 0;
29 -
30 - if ( $save_mode === 1 ) {
31 - return false;
32 - }
33 - if ( file_exists( $page_path ) && get_option( '_wpcoder_enable_php' ) ) {
34 - require_once $page_path;
35 - }
24 + new PHPIncludes;
36 25 }
37 -
38 -
39 -
40 26
41 27 public function shortcode( $atts, $shortcode_content = null ) {
42 28 if ( ! empty( $atts['id'] ) ) {
43 29 $result = DBManager::get_data_by_id( $atts['id'] );