| 1 |
<?php defined( 'ABSPATH' ) or die( 'No fankari bachay!' ); |
| 2 |
/* |
| 3 |
Plugin Name: WP Docs |
| 4 |
Plugin URI: http://androidbubble.com/blog/wp-docs |
| 5 |
Description: A documents management tool for education portals. |
| 6 |
Author: Fahad Mahmood |
| 7 |
Version: 2.3.0 |
| 8 |
Text Domain: wp-docs |
| 9 |
Domain Path: /languages |
| 10 |
Author URI: https://profiles.wordpress.org/fahadmahmood/ |
| 11 |
License: GPL2 |
| 12 |
|
| 13 |
This WordPress Plugin is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or any later version. This free software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this software. If not, see http://www.gnu.org/licenses/gpl-2.0.html. |
| 14 |
*/ |
| 15 |
|
| 16 |
require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); |
| 17 |
|
| 18 |
if(isset($_GET['page']) && $_GET['page']=='wpdocs'){ |
| 19 |
//require_once __DIR__ . '/spatie/vendor/autoload.php'; |
| 20 |
} |
| 21 |
|
| 22 |
if(!function_exists('pre')){ |
| 23 |
function pre($data){ |
| 24 |
if(isset($_GET['debug'])){ |
| 25 |
pree($data); |
| 26 |
} |
| 27 |
} |
| 28 |
} |
| 29 |
if(!function_exists('pree')){ |
| 30 |
function pree($data){ |
| 31 |
echo '<pre>'; |
| 32 |
print_r($data); |
| 33 |
echo '</pre>'; |
| 34 |
|
| 35 |
} |
| 36 |
} |
| 37 |
|
| 38 |
global $wpdocs_data, $wpdocs_pro, $wpdocs_premium_link, $wpdocs_dir, $wpdocs_levels, $wpdocs_versions_type, $wpdocs_url, $icon_sub_path, $wpdocs_options, $wpdocs_android_settings, $wp_docs_tabs, $wp_docs_is_memphis, $wpdocs_post_types, $wpdocs_post_status, $wpdocs_current_theme; |
| 39 |
|
| 40 |
$wp_docs_is_memphis = (defined('MDOC_PATH') || defined('MDOCS_PATH')); |
| 41 |
$wpdocs_data = get_plugin_data(__FILE__, true, false); |
| 42 |
$wpdocs_dir = plugin_dir_path( __FILE__ ); |
| 43 |
$wpdocs_url = plugin_dir_url( __FILE__ ); |
| 44 |
$wpdocs_versions_type = get_option('wpdocs_versions_type', 'old'); |
| 45 |
$icon_sub_path = 'img/filetype-icons/'; |
| 46 |
$wpdocs_options = get_option('wpdocs_options', array()); |
| 47 |
$wpdocs_post_types = array('dir'=>'wpdocs_folder', 'shortcut'=>'wpdocs_shortcut'); |
| 48 |
$wpdocs_post_status = 'hidden'; |
| 49 |
|
| 50 |
|
| 51 |
$wp_docs_tabs = in_array( 'wp-responsive-tabs/index.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ; |
| 52 |
|
| 53 |
|
| 54 |
$wpdocs_premium_link = 'https://shop.androidbubbles.com/product/wp-docs-pro';//https://shop.androidbubble.com/products/wordpress-plugin?variant=36439508320411';// |
| 55 |
|
| 56 |
|
| 57 |
$wpdocs_pro_file = $wpdocs_dir.'pro/wp-docs-pro.php'; |
| 58 |
|
| 59 |
|
| 60 |
include_once 'inc/common.php'; |
| 61 |
|
| 62 |
$wpdocs_pro = file_exists($wpdocs_pro_file); |
| 63 |
if($wpdocs_pro){ |
| 64 |
include($wpdocs_pro_file); |
| 65 |
} |
| 66 |
|
| 67 |
include_once('inc/functions.php'); |
| 68 |
|
| 69 |
if(is_admin()){ |
| 70 |
$plugin = plugin_basename(__FILE__); |
| 71 |
add_filter("plugin_action_links_$plugin", 'wpdocs_plugin_links' ); |
| 72 |
} |
| 73 |
|
| 74 |
if($wp_docs_is_memphis){ |
| 75 |
|
| 76 |
global $memphis_list_id, $memphis_folders_id, $memphis_folders_array, $memphis_files_array, $wpdocs_imported_folder, $wpdocs_imported_files, $wpdocs_memphis_list; |
| 77 |
|
| 78 |
|
| 79 |
|
| 80 |
$memphis_list_id = wp_docs_get_option_id('mdocs-list'); |
| 81 |
$memphis_folders_id = wp_docs_get_option_id('mdocs-cats'); |
| 82 |
|
| 83 |
$wpdocs_memphis_list = get_option('wpdocs_memphis_list', array()); |
| 84 |
$wpdocs_memphis_list = (is_array($wpdocs_memphis_list) ? $wpdocs_memphis_list : array()); |
| 85 |
|
| 86 |
$memphis_folders_array = get_option('mdocs-cats', array()); |
| 87 |
$memphis_folders_array = (is_array($memphis_folders_array) ? $memphis_folders_array : array()); |
| 88 |
|
| 89 |
$memphis_files_array = get_option('mdocs-list', array()); |
| 90 |
$memphis_files_array = (is_array($memphis_files_array) ? $memphis_files_array : array()); |
| 91 |
|
| 92 |
$wpdocs_imported_folder = get_option('wpdocs_imported_folder', array()); |
| 93 |
$wpdocs_imported_folder = (is_array($wpdocs_imported_folder) ? $wpdocs_imported_folder : array()); |
| 94 |
|
| 95 |
$wpdocs_imported_files = get_option('wpdocs_imported_files', array()); |
| 96 |
$wpdocs_imported_files = (is_array($wpdocs_imported_files) ? $wpdocs_imported_files : array()); |
| 97 |
|
| 98 |
|
| 99 |
} |