# document-emberdder/2.0.1/includes/DocumentLibrary/DocumentLibrary.php

Document Embedder – let visitors read files without downloading, version 2.0.1. 36 lines.

- Page: https://pluginprobe.com/plugins/document-emberdder/2.0.1/code/includes/DocumentLibrary/DocumentLibrary.php
- Raw: https://pluginprobe.com/plugins/document-emberdder/2.0.1/raw/includes/DocumentLibrary/DocumentLibrary.php
- Modified: 2025-11-04T07:16:42+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/document-emberdder/2.0.1/code/includes/DocumentLibrary/DocumentLibrary.php#L10-L20`.

```php
<?php

class DocumentLibrary {
    protected static $_instance = null;
    
    public function __construct() {
        add_action('admin_menu', [$this, 'bplde_submenu']);
    }

    
    public static function instance(){
        if(self::$_instance === null){
            self::$_instance = new self();
        }
        return self::$_instance;
    }

    public function bplde_submenu(){
        add_submenu_page(
            'edit.php?post_type=ppt_viewer', 
            __("Document Library", "document-embedder"), 
            __("Document Library", "document-embedder"),   
            'manage_options',                  
            'document-library',              
            [$this, 'render_document_library_page']  
        );
    }

    public function render_document_library_page() {
        ?>
         <div class="bplde-" id="bpldeDocumentLibraryWrapper" data-is-premium="<?php echo de_fs()->can_use_premium_code(); ?>">
         </div>
        <?php
    }
}
DocumentLibrary::instance();
```
