Changeset 2679598
- Timestamp:
- 02/16/2022 05:54:14 AM (4 years ago)
- File:
-
- 1 edited
-
morphii/trunk/morphii-init.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
morphii/trunk/morphii-init.php
r2677088 r2679598 1 1 <?php 2 3 4 2 5 3 /* 6 4 7 8 9 5 Plugin Name: Morphii 10 11 12 6 13 7 Plugin URI: https://morphii.com/ 14 8 15 16 17 9 Description: A plugin that for adding reviews to your product by adding morphii reactions. 18 19 20 10 21 11 Author: Morphii Team 22 12 23 24 25 13 Text Domain: morphii 26 27 28 14 29 15 Version: 1.0 30 16 31 32 33 17 Author URI: https://morphii.com/ 34 18 35 36 37 19 License: GPL2 38 39 40 20 41 21 */ … … 43 23 44 24 45 46 47 48 49 25 // don't call the file directly 50 51 52 26 53 27 if ( ! defined( 'ABSPATH' ) ) exit; … … 55 29 56 30 57 58 59 60 31 if ( ! function_exists( 'is_plugin_active' ) ) { 61 62 63 32 64 33 require_once ABSPATH . 'wp-admin/includes/plugin.php'; 65 34 66 67 68 35 } 69 70 71 72 73 36 if (is_plugin_active('morphii-pro/morphii-init.php') ) 37 return; 38 else 39 { 74 40 define( 'MORPHII_DIR', plugin_dir_path( __FILE__ ) ); 75 76 77 41 78 42 define( 'MORPHII_MWAR_URL', plugins_url( '/', __FILE__ ) ); 79 43 80 81 82 44 define( 'MORPHII_INCLUDE_DIR', MORPHII_DIR . '/includes/' ); 83 84 85 45 86 46 define( 'MORPHII_ASSETS_URL', MORPHII_DIR . 'assets' ); 87 47 88 89 90 48 define( 'MORPHII_TEMPLATE_PATH', MORPHII_DIR . 'templates' ); 91 92 93 49 94 50 define( 'MORPHII_TEMPLATES_DIR', MORPHII_DIR . '/templates/' ); 95 51 96 97 98 52 add_action('morphii_start', 'morphii_buffering'); 99 53 100 101 102 54 function morphii_buffering() 103 104 55 { 105 106 56 ob_start(); 107 108 57 } 109 110 111 58 112 59 function morphii_init() { 113 60 114 115 116 61 require_once MORPHII_DIR . 'morphii.php'; 117 118 119 62 120 63 require_once MORPHII_INCLUDE_DIR . 'class.morphii-shortcode.php'; 121 64 122 123 124 65 require_once MORPHII_INCLUDE_DIR . 'class.morphii-data.php'; 125 126 127 66 128 67 global $Morphii_AdvancedReview, $Morphii_Shortcode, $Morphii_Data; 129 68 130 131 132 69 $Morphii_AdvancedReview = Morphii::get_instance(); 133 134 135 70 136 71 $Morphii_Shortcode = Morphii_Shortcode::get_instance(); 137 72 138 139 140 73 $Morphii_Data = Morphii_Data::get_instance(); 141 74 142 143 144 75 } 145 146 147 148 149 76 150 77 … … 154 81 155 82 156 157 158 159 160 83 function morphii_install() { 161 162 163 84 164 85 // if ( ! function_exists( 'WC' ) ) { 165 86 166 167 168 87 // add_action( 'admin_notices', 'morphii_install_woocommerce_admin_notice' ); 169 170 171 88 172 89 // } else { 173 90 174 175 176 91 do_action( 'morphii_init' ); 177 178 179 92 180 93 do_action( 'morphii_start' ); 181 94 182 183 184 95 //} 185 186 187 96 188 97 } 189 98 190 191 192 99 add_action( 'plugins_loaded', 'morphii_install', 11 ); 100 }
Note: See TracChangeset
for help on using the changeset viewer.