Plugin Directory

Changeset 2679598


Ignore:
Timestamp:
02/16/2022 05:54:14 AM (4 years ago)
Author:
morphii
Message:

Morphii Version Check condition added

File:
1 edited

Legend:

Unmodified
Added
Removed
  • morphii/trunk/morphii-init.php

    r2677088 r2679598  
    11<?php
    2 
    3 
    42
    53/*
    64
    7 
    8 
    95Plugin Name: Morphii
    10 
    11 
    126
    137Plugin URI: https://morphii.com/
    148
    15 
    16 
    179Description: A plugin that for adding reviews to your product by adding morphii reactions.
    18 
    19 
    2010
    2111Author: Morphii Team
    2212
    23 
    24 
    2513Text Domain: morphii
    26 
    27 
    2814
    2915Version: 1.0
    3016
    31 
    32 
    3317Author URI: https://morphii.com/
    3418
    35 
    36 
    3719License: GPL2
    38 
    39 
    4020
    4121*/
     
    4323
    4424
    45 
    46 
    47 
    48 
    4925// don't call the file directly
    50 
    51 
    5226
    5327if ( ! defined( 'ABSPATH' ) ) exit;
     
    5529
    5630
    57 
    58 
    59 
    6031if ( ! function_exists( 'is_plugin_active' ) ) {
    61 
    62 
    6332
    6433    require_once ABSPATH . 'wp-admin/includes/plugin.php';
    6534
    66 
    67 
    6835}
    69 
    70 
    71 
    72 
    73 
     36if (is_plugin_active('morphii-pro/morphii-init.php')  )
     37    return;
     38else
     39{
    7440define( 'MORPHII_DIR', plugin_dir_path( __FILE__ ) );
    75 
    76 
    7741
    7842define( 'MORPHII_MWAR_URL', plugins_url( '/', __FILE__ ) );
    7943
    80 
    81 
    8244define( 'MORPHII_INCLUDE_DIR', MORPHII_DIR . '/includes/' );
    83 
    84 
    8545
    8646define( 'MORPHII_ASSETS_URL', MORPHII_DIR . 'assets' );
    8747
    88 
    89 
    9048define( 'MORPHII_TEMPLATE_PATH', MORPHII_DIR . 'templates' );
    91 
    92 
    9349
    9450define( 'MORPHII_TEMPLATES_DIR', MORPHII_DIR . '/templates/' );
    9551
    96 
    97 
    9852add_action('morphii_start', 'morphii_buffering');
    9953
    100 
    101 
    10254function morphii_buffering()
    103 
    10455{
    105 
    10656    ob_start();
    107 
    10857}
    109 
    110 
    11158
    11259function morphii_init() {
    11360
    114 
    115 
    11661    require_once MORPHII_DIR . 'morphii.php';
    117 
    118 
    11962
    12063    require_once MORPHII_INCLUDE_DIR . 'class.morphii-shortcode.php';
    12164
    122 
    123 
    12465    require_once MORPHII_INCLUDE_DIR . 'class.morphii-data.php';
    125 
    126 
    12766
    12867    global $Morphii_AdvancedReview, $Morphii_Shortcode, $Morphii_Data;
    12968
    130 
    131 
    13269    $Morphii_AdvancedReview = Morphii::get_instance();
    133 
    134 
    13570
    13671    $Morphii_Shortcode = Morphii_Shortcode::get_instance();
    13772
    138 
    139 
    14073    $Morphii_Data = Morphii_Data::get_instance();
    14174
    142 
    143 
    14475}
    145 
    146 
    147 
    148 
    14976
    15077
     
    15481
    15582
    156 
    157 
    158 
    159 
    16083function morphii_install() {
    161 
    162 
    16384
    16485    // if ( ! function_exists( 'WC' ) ) {
    16586
    166 
    167 
    16887    //  add_action( 'admin_notices', 'morphii_install_woocommerce_admin_notice' );
    169 
    170 
    17188
    17289    // } else {
    17390
    174 
    175 
    17691        do_action( 'morphii_init' );
    177 
    178 
    17992
    18093        do_action( 'morphii_start' );
    18194
    182 
    183 
    18495    //}
    185 
    186 
    18796
    18897}
    18998
    190 
    191 
    19299add_action( 'plugins_loaded', 'morphii_install', 11 );
     100}
Note: See TracChangeset for help on using the changeset viewer.