PluginProbe
Document Embedder – let visitors read files without downloading / 2.0.1
Document Embedder – let visitors read files without downloading v2.0.1
2.3.1 2.3.0 2.2.1 2.2.0 2.1.2 2.1.1 trunk 1.0 1.1 1.2 1.3 1.7.4 1.7.6 1.7.9 1.8.1 1.8.2 1.8.3 1.8.5 1.8.6 1.8.7 1.8.8 1.8.9 2.0.0 2.0.1 2.0.2 All 30 releases
document-emberdder / includes / DocumentLibrary / DocumentLibrary.php

DocumentLibrary.php in Document Embedder – let visitors read files without downloading 2.0.1, at includes/DocumentLibrary/DocumentLibrary.php

36 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 class DocumentLibrary {
4 protected static $_instance = null;
5
6 public function __construct() {
7 add_action('admin_menu', [$this, 'bplde_submenu']);
8 }
9
10
11 public static function instance(){
12 if(self::$_instance === null){
13 self::$_instance = new self();
14 }
15 return self::$_instance;
16 }
17
18 public function bplde_submenu(){
19 add_submenu_page(
20 'edit.php?post_type=ppt_viewer',
21 __("Document Library", "document-embedder"),
22 __("Document Library", "document-embedder"),
23 'manage_options',
24 'document-library',
25 [$this, 'render_document_library_page']
26 );
27 }
28
29 public function render_document_library_page() {
30 ?>
31 <div class="bplde-" id="bpldeDocumentLibraryWrapper" data-is-premium="<?php echo de_fs()->can_use_premium_code(); ?>">
32 </div>
33 <?php
34 }
35 }
36 DocumentLibrary::instance();