PluginProbe
WP Coder – Insert & Manage Code Snippets / 2.5.6
WP Coder – Insert & Manage Code Snippets v2.5.6
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
wp-coder / public / class-public.php

class-public.php in WP Coder – Insert & Manage Code Snippets 2.5.6, at public/class-public.php

51 lines 1.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Public Class
4 *
5 * @package Wow_Plugin
6 * @subpackage Public
7 * @copyright Copyright (c) 2018, Dmytro Lobov
8 * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
9 * @since 1.0
10 */
11 namespace wpcoder;
12
13 if ( ! defined( 'ABSPATH' ) ) exit;
14
15 class Wow_Public_Class {
16
17 private $arg;
18
19 public function __construct( $arg ) {
20
21 $this->plugin_name = $arg['plugin_name'];
22 $this->plugin_menu = $arg['plugin_menu'];
23 $this->plugin_home_url = $arg['plugin_home_url'];
24 $this->plugin_version = $arg['plugin_version'];
25 $this->plugin_file = $arg['plugin_file'];
26 $this->plugin_slug = $arg['plugin_slug'];
27 $this->plugin_dir = $arg['plugin_dir'];
28 $this->plugin_url = $arg['plugin_url'];
29 $this->plugin_pref = $arg['plugin_pref'];
30 $this->author_url = $arg['author_url'];
31 $this->pro_url = $arg['pro_url'];
32 $this->shortcode = $arg['shortcode'];
33
34 $upload = wp_upload_dir();
35 $this->basedir = $upload['basedir'] . '/' . $this->plugin_slug . '/';
36 $this->baseurl = $upload['baseurl'] . '/' . $this->plugin_slug . '/';
37
38 add_shortcode( $this->shortcode, array( $this, 'shortcode' ) );
39
40 }
41
42
43 function shortcode( $atts ) {
44 ob_start();
45 require plugin_dir_path( __FILE__ ) . 'shortcode.php';
46 $shortcode = ob_get_contents();
47 ob_end_clean();
48 return $shortcode;
49 }
50
51 }