PluginProbe
MooWoodle – WordPress Moodle LMS Integration, Sell Moodle Courses via WooCommerce / 3.0
MooWoodle – WordPress Moodle LMS Integration, Sell Moodle Courses via WooCommerce v3.0
3.4.9 3.4.8 3.4.7 3.4.6 3.4.5 3.4.4 3.4.3 3.4.1 3.4.2 trunk 1.1.0 1.2 1.2.1 1.2.2 1.3.0 2.0 2.0.1 2.1 2.2 2.3 2.4 3.0 3.0.1 3.0.2 3.0.3 All 57 releases
moowoodle / moowoodle.php

moowoodle.php in MooWoodle – WordPress Moodle LMS Integration, Sell Moodle Courses via WooCommerce 3.0, at moowoodle.php

70 lines 2.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Plugin Name: MooWoodle
4 * Plugin URI: https://dualcube.com/
5 * Description: The MooWoodle plugin is an extention of WooCommerce that acts as a bridge between WordPress/Woocommerce and Moodle.
6 * Author: DualCube
7 * Version: 3.0
8 * Author URI: https://dualcube.com/
9 * Requires at least: 5.0
10 * Tested up to: 5.6
11 * WC requires at least: 4.0
12 * WC tested up to: 4.9.0
13 *
14 * Text Domain: moowoodle
15 * Domain Path: /languages/
16 */
17
18 if ( ! class_exists( 'MooWoodle_Dependencies' ) )
19 require_once trailingslashit( dirname( __FILE__ ) ) . 'includes/class-moowoodle-dependencies.php';
20
21 require_once trailingslashit( dirname( __FILE__ ) ) . 'includes/moowoodle-core-functions.php';
22 require_once trailingslashit( dirname( __FILE__ ) ) . 'moowoodle-config.php';
23 if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
24 if ( ! defined( 'MOOWOODLE_PLUGIN_TOKEN' ) ) exit;
25 if ( ! defined( 'MOOWOODLE_TEXT_DOMAIN' ) ) exit;
26
27 if ( ! MooWoodle_Dependencies::woocommerce_active_check() )
28 add_action( 'admin_notices', 'moowoodle_alert_notice' );
29
30 /**
31 * Plugin page links
32 */
33 function moowoodle_plugin_links( $links ) {
34 $plugin_links = array(
35 '<a href="' . admin_url( 'admin.php?page=moowoodle-settings' ) . '">' . __( 'Settings', 'moowoodle' ) . '</a>',
36 '<a href="https://wordpress.org/support/plugin/moowoodle/">' . __( 'Support', 'moowoodle' ) . '</a>',
37 );
38 $links = array_merge( $plugin_links, $links );
39 if ( apply_filters( 'moowoodle_free_active', true ) ) {
40 $links[] = '<a href="https://dualcube.com/shop/" target="_blank">' . __( 'Upgrade to Pro', 'moowoodle' ) . '</a>';
41 }
42 return $links;
43 }
44 add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), 'moowoodle_plugin_links' );
45
46 // Migration at activation hook
47 register_activation_hook( __FILE__, 'moowoodle_option_migration_2_to_3' );
48 // Update time migration
49 add_action( 'upgrader_process_complete', 'moowoodle_option_migration_2_to_3' );
50
51 if ( ! defined( 'MOOWOODLE_PLUGIN_BASENAME' ) )
52 define( 'MOOWOODLE_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
53
54 require_once trailingslashit( dirname( __FILE__ ) ) . 'includes/class-moowoodle-install.php';
55 register_activation_hook( __FILE__, array( 'MooWoodle_Install', 'init' ) );
56
57 if ( session_status() == PHP_SESSION_NONE ) {
58 session_start(
59 array( 'read_and_close' => true )
60 );
61 }
62
63 if ( ! class_exists( 'MooWoodle' ) ) {
64 require_once( 'classes/class-moowoodle.php' );
65 global $MooWoodle;
66
67 $MooWoodle = new MooWoodle( __FILE__ );
68 $GLOBALS[ 'MooWoodle' ] = $MooWoodle;
69 }
70