did-web/wp-my-autoloader

Simple autoloader to use in your wordpress plugins.


Keywords
autoloader, wordpress
License
CNRI-Python-GPL-Compatible

Documentation

WP My Autoloader 馃嚞馃嚙

Simple autoloader to use in your WordPress plugins.

Instalaci贸n

To be able to install it, place it in the composer.json of your plugin ...

{
  "require": {
            "did-web/wp-my-autoloader": "1.0.*"
}

Mode of use

To be able to use it in your code you will have to place the following line of code in the header of your files ...

require_once(dirname(__FILE__) . 'vendor/did-web/wp-my-autoloader/autoloader.php');

note In the main file of the plugin we must define a constant with the name: PLUGIN_NAME_AUTOLOADER.

define ('PLUGIN_NAME_AUTOLOADER', plugin_basename (dirname (__ FILE__)));

If you need to use AJAX, place the following code to make sure that the Constant with the name of the plugin written manually:

if (! defined ('PLUGIN_NAME_AUTOLOADER')) {
聽聽聽聽 define ('PLUGIN_NAME_AUTOLOADER', 'name_your_plugin');
}

More information on how to use composer: Info Composer

Compatibility

Tested on:

  • WordPress 4.9.6

WP My Autoloader 馃嚛馃嚜

Einfacher Autoloader zur Verwendung in Ihren WordPress-Plugins.

Installation

Um es zu installieren, legen Sie es in die composer.json Ihres Plugins ...

{
  "require": {
            "did-web/wp-my-autoloader": "1.0.*"
}

Modus der Verwendung

Um es in Ihrem Code verwenden zu k枚nnen, m眉ssen Sie die folgende Codezeile in die Kopfzeile Ihrer Dateien einf眉gen ...

require_once(dirname(__FILE__) . 'vendor/did-web/wp-my-autoloader/autoloader.php');

Hinweis In der Hauptdatei des Plugins m眉ssen wir eine Konstante mit folgendem Namen definieren: PLUGIN_NAME_AUTOLOADER.

define ('PLUGIN_NAME_AUTOLOADER', plugin_basename (dirname (__ FILE__)));

Wenn Sie AJAX verwenden m眉ssen, f眉gen Sie den folgenden Code ein, um sicherzustellen, dass der Konstante mit dem Namen des manuell geschriebenen Plugins:

if (! defined ('PLUGIN_NAME_AUTOLOADER')) {
聽聽聽聽 define ('PLUGIN_NAME_AUTOLOADER', 'Name_Ihr_Plugin');
}

Weitere Informationen zur Verwendung composer: Info Composer

Kompatibilit盲t

Getestet am:

  • WordPress 4.9.6

WP My Autoloader 馃嚜馃嚫

Sencillo autoloader para utilizar en tus plugins de WordPress.

Instalaci贸n

Para poderlo instalar coloca en el composer.json de tu plugin ...

{
  "require": {
            "did-web/wp-my-autoloader": "1.0.*"
}

Modo de uso

Para poderlo utilizar en tu c贸digo tendr谩s que colocar la siguiente l铆nea de c贸digo en la cabecera de tus archivos...

require_once(dirname(__FILE__) . 'vendor/did-web/wp-my-autoloader/autoloader.php');

nota En el archivo principal del plugin debemos definir una constante con el nombre: PLUGIN_NAME_AUTOLOADER .

define('PLUGIN_NAME_AUTOLOADER', plugin_basename(dirname(__FILE__)));

Si necesitas usar AJAX coloca el siguiente c贸digo para asegurarte de que existe la constante con el nombre del plugin escrito manualmente:

if (!defined('PLUGIN_NAME_AUTOLOADER')) {
    define('PLUGIN_NAME_AUTOLOADER', 'name_your_plugin');
}

M谩s informaci贸n de como usar composer: Info Composer

Compatibilidad

Probado en:

  • WordPress 4.9.6

Change Log

  • 1.0.7 - 2018-7-10 : Fix bug name function duplicate
  • 1.0.6 - 2018-7-10 : Namespace
  • 1.0.5 - 2018-7-10 : Plugin name with constant
  • 1.0.4 - 2018-7-5 : Change name function
  • 1.0.3 - 2018-7-5 : More Documentation
  • 1.0.2 - 2018-7-5 : Fix Bug Documentation
  • 1.0.1 - 2018-7-5 : Documentation
  • 1.0.0 - 2018-7-5 : Basic Functions