PluginProbe
PDF Embed Block – share documents right inside your posts / trunk
PDF Embed Block – share documents right inside your posts vtrunk
1.3.3 1.3.2 1.3.1 1.3.0 trunk 1.0.0 1.0.1 1.0.2 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5
pdf-embed-block / includes / core.php

core.php in PDF Embed Block – share documents right inside your posts trunk, at includes/core.php

45 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 if (!defined('ABSPATH')) exit;
4
5 if( !class_exists( 'PEB_PDFEmbed' ) ){
6 class PEB_PDFEmbed{
7 function __construct(){
8 $this -> loaded_classes();
9 }
10
11 function loaded_classes(){
12 require_once PEB_DIR_PATH . 'includes/AdminMenu.php';
13 require_once PEB_DIR_PATH . 'includes/CustomColumn.php';
14 require_once PEB_DIR_PATH . 'includes/Enqueue.php';
15 require_once PEB_DIR_PATH . 'includes/Init.php';
16 require_once PEB_DIR_PATH . 'includes/RestAPI.php';
17 require_once PEB_DIR_PATH . 'includes/ShortCode.php';
18
19 new PEB\Init();
20 new PEB\Enqueue();
21 new PEB\AdminMenu();
22 new PEB\ShortCode();
23 new PEB\CustomColumn();
24 new PEB\RestAPI();
25 }
26
27 }
28 new PEB_PDFEmbed();
29 }
30
31 if ( ! function_exists( 'pebGetGlobalViewerOptions' ) ) {
32 function pebGetGlobalViewerOptions() {
33 $defaults = [
34 'showDownloadPDF' => false,
35 'showPrintPDF' => false,
36 'showFullScreen' => true,
37 'forceGlobal' => false,
38 ];
39 $saved = get_option( 'peb_global_viewer_options', [] );
40 if ( ! is_array( $saved ) ) {
41 $saved = [];
42 }
43 return array_merge( $defaults, $saved );
44 }
45 }