PluginProbe
Document Embedder – let visitors read files without downloading / 1.7.6
Document Embedder – let visitors read files without downloading v1.7.6
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 / document-embedder.php

document-embedder.php in Document Embedder – let visitors read files without downloading 1.7.6, at document-embedder.php

60 lines 1.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /*
3 * Plugin Name: Document Embedder
4 * Plugin URI: http://documentembedder.com/
5 * Description: Embed Any document easily in wordpress such as word, excel, powerpoint, pdf and more
6 * Version: 1.7.8
7 * Author: bPlugins LLC
8 * Author URI: http://bplugins.com
9 * License: GPLv3
10 * Text Domain: ppv
11 * Domain Path: /languages
12 */
13
14 function ppv_load_textdomain() {
15 load_plugin_textdomain( 'document-emberdder', false, dirname( __FILE__ ) . "/languages" );
16 }
17
18 add_action( "plugins_loaded", 'ppv_load_textdomain' );
19
20 /*Some Set-up*/
21 define('PPV_VER', '1.7.6');
22 define('PPV_PLUGIN_DIR', WP_PLUGIN_URL . '/' . plugin_basename( dirname(__FILE__) ) . '/' );
23 define('PPV_IMPORT', '1.0.0');
24
25
26 require_once(__DIR__.'/upgrade.php');
27
28 use PPV\Services\Import;
29
30 //Remove post update massage and link
31 function ppv_updated_messages( $messages ) {
32 $messages['ppt_viewer'][1] = __('Updated ');
33 return $messages;
34 }
35 add_filter('post_updated_messages','ppv_updated_messages');
36
37 // After activation redirect
38 register_activation_hook(__FILE__, 'ppv_plugin_activate');
39 add_action('admin_init', 'ppv_plugin_redirect');
40
41 function ppv_plugin_activate() {
42 add_option('ppv_plugin_do_activation_redirect', true);
43 }
44
45 function ppv_plugin_redirect() {
46 if (get_option('ppv_plugin_do_activation_redirect', false)) {
47 delete_option('ppv_plugin_do_activation_redirect');
48 wp_redirect('edit.php?post_type=ppt_viewer&page=ppv_howto');
49 }
50
51 if(get_option('ppv_import', '0') < PPV_IMPORT){
52 Import::import();
53 update_option('ppv_import', PPV_IMPORT);
54 }
55 }
56
57 add_action('init', function(){
58 Import::import();
59 // echo PPV_PRO_PLUGIN;
60 });