Plugin Directory

Changeset 2677088


Ignore:
Timestamp:
02/11/2022 12:09:01 PM (4 years ago)
Author:
morphii
Message:

Free Plugin commit

File:
1 edited

Legend:

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

    r2665851 r2677088  
    11<?php
     2
     3
    24
    35/*
    46
     7
     8
    59Plugin Name: Morphii
     10
     11
    612
    713Plugin URI: https://morphii.com/
    814
     15
     16
    917Description: A plugin that for adding reviews to your product by adding morphii reactions.
     18
     19
    1020
    1121Author: Morphii Team
    1222
     23
     24
    1325Text Domain: morphii
     26
     27
    1428
    1529Version: 1.0
    1630
     31
     32
    1733Author URI: https://morphii.com/
    1834
     35
     36
    1937License: GPL2
     38
     39
    2040
    2141*/
     
    2343
    2444
     45
     46
     47
     48
    2549// don't call the file directly
     50
     51
    2652
    2753if ( ! defined( 'ABSPATH' ) ) exit;
     
    2955
    3056
     57
     58
     59
    3160if ( ! function_exists( 'is_plugin_active' ) ) {
    3261
     62
     63
    3364    require_once ABSPATH . 'wp-admin/includes/plugin.php';
     65
     66
    3467
    3568}
    3669
    3770
     71
     72
     73
    3874define( 'MORPHII_DIR', plugin_dir_path( __FILE__ ) );
     75
     76
    3977
    4078define( 'MORPHII_MWAR_URL', plugins_url( '/', __FILE__ ) );
    4179
     80
     81
    4282define( 'MORPHII_INCLUDE_DIR', MORPHII_DIR . '/includes/' );
     83
     84
    4385
    4486define( 'MORPHII_ASSETS_URL', MORPHII_DIR . 'assets' );
    4587
     88
     89
    4690define( 'MORPHII_TEMPLATE_PATH', MORPHII_DIR . 'templates' );
     91
     92
    4793
    4894define( 'MORPHII_TEMPLATES_DIR', MORPHII_DIR . '/templates/' );
    4995
     96
     97
    5098add_action('morphii_start', 'morphii_buffering');
    5199
     100
     101
    52102function morphii_buffering()
     103
    53104{
     105
    54106    ob_start();
     107
    55108}
     109
     110
    56111
    57112function morphii_init() {
    58113
     114
     115
    59116    require_once MORPHII_DIR . 'morphii.php';
     117
     118
    60119
    61120    require_once MORPHII_INCLUDE_DIR . 'class.morphii-shortcode.php';
    62121
     122
     123
    63124    require_once MORPHII_INCLUDE_DIR . 'class.morphii-data.php';
     125
     126
    64127
    65128    global $Morphii_AdvancedReview, $Morphii_Shortcode, $Morphii_Data;
    66129
     130
     131
    67132    $Morphii_AdvancedReview = Morphii::get_instance();
     133
     134
    68135
    69136    $Morphii_Shortcode = Morphii_Shortcode::get_instance();
    70137
     138
     139
    71140    $Morphii_Data = Morphii_Data::get_instance();
    72141
     142
     143
    73144}
     145
     146
     147
     148
    74149
    75150
     
    79154
    80155
     156
     157
     158
     159
    81160function morphii_install() {
     161
     162
    82163
    83164    // if ( ! function_exists( 'WC' ) ) {
    84165
     166
     167
    85168    //  add_action( 'admin_notices', 'morphii_install_woocommerce_admin_notice' );
     169
     170
    86171
    87172    // } else {
    88173
     174
     175
    89176        do_action( 'morphii_init' );
     177
     178
    90179
    91180        do_action( 'morphii_start' );
    92181
     182
     183
    93184    //}
     185
     186
    94187
    95188}
    96189
     190
     191
    97192add_action( 'plugins_loaded', 'morphii_install', 11 );
Note: See TracChangeset for help on using the changeset viewer.