Giter Site home page Giter Site logo

tgmpa-ns's Introduction

TGMPA using Unique Namespace

TGM Plugin Activation Modified, Use unique namespace to be able to use multiple TGMPA in the same site simultaneously.

==================

We Strongly Recommended to use this plugin in WordPress Plugins and Not inside WordPress Themes, For WordPress Themes Use tgmpa-unique-cls project instead https://github.com/Oxibug/tgmpa-unique-cls

==================

How to use?

  1. Search & Modify namespace OxibugTGMPA with your own project's namespace.

  2. In class TGMPA_Includes .. Modify the following A. TGMPA_MAIN_PREFIX constant value with your own project prefix. B. CONST_OXIBUG_TEXTDOMAIN constant with your project text domain C. Modify menu, notices and page descriptions in strings array D. For WordPress Multisite, Change the key parent_slug value to plugins.php because you can't add plugins from sites and TGMPA still not compatible with Network

  3. Copy those three php files in your project's, In this example we include in inc\tgmpa directories

Finally, Including

Include the TGMPA in the main project's file like functions.php in themes or your plugin's main file

Include the TGM_Plugin_Activation class, Depending on your implementation, you may want to change the include call:

Parent Theme:

require_once get_template_directory() . '/path/to/tgmpa-includes.php';

Child Theme:

require_once get_stylesheet_directory() . '/path/to/tgmpa-includes.php';

Plugin:

require_once dirname( __FILE__ ) . '/path/to/tgmpa-includes.php';

Example

require_once ( get_template_directory() . '/inc/tgmpa/tgmpa-includes.php' );

\OxibugTGMPA\TGMPA_Includes::instance( get_template_directory() . '/inc/tgmpa' );

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.