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