Skip to content

Commit

Permalink
Update readme and framework version
Browse files Browse the repository at this point in the history
  • Loading branch information
mostafasoufi committed Jul 27, 2022
1 parent 7e9d78c commit 95ee091
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
18 changes: 9 additions & 9 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ The `Plugin Prefix` field is used by the framework to automatically [define cons
/**
* Plugin Name: Example plugin
* Plugin URI: https://example.com
* Plugin Prefix: TD
* Plugin Prefix: EP
* Description: Description
* Author: Alessandro Tesoro
* Author URI: https://example.com
* Text Domain: example-plugin
* Domain Path: /languages
* Version: 0.1.0
*/

```

## Load Composer autoloader
Expand All @@ -61,7 +61,7 @@ if ( file_exists( dirname( __FILE__ ) . '/vendor/autoload.php' ) ) {
require dirname( __FILE__ ) . '/vendor/autoload.php';
}
```



## Create a new Application instance
Expand Down Expand Up @@ -91,7 +91,7 @@ The `loadPlugin()` method takes 3 arguments, **the third is optional**.
3. The name of the folder that holds the configuration files.

$myPlugin = $myPlugin->loadPlugin( __DIR__, __FILE__, 'config' );


The `loadPlugin()` method returns the `Plugin` container. You will then use the container to add functionalities to your plugin.

Expand Down Expand Up @@ -156,7 +156,7 @@ $myPlugin->onDeactivation(
// Do something on deactivation here
}
);

```


Expand Down Expand Up @@ -188,7 +188,7 @@ $myPlugin->boot(
}
);
```


## Include files

Expand All @@ -201,7 +201,7 @@ $myPlugin->boot(
}
);
```


The example above will automatically include *.php files from the `includes` subfolder of your plugin.

Expand All @@ -213,7 +213,7 @@ The example above will automatically include *.php files from the `includes` sub
/**
* Plugin Name: Rabbit example plugin
* Plugin URI: https://example.com
* Plugin Prefix: TD
* Plugin Prefix: REP
* Description: Example plugin
* Author: John Doe
* Author URI: https://example.me
Expand Down Expand Up @@ -292,7 +292,7 @@ class RabbitExamplePlugin extends Singleton
// load template
$this->application->view('plugin-template.php', ['foo' => 'bar']);
///...

});

} catch (Exception $e) {
Expand Down
4 changes: 2 additions & 2 deletions src/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ class Plugin extends Container {
use Macroable;

/**
* Framwork version.
* Framework version.
*
* @var string
*/
const VERSION = '0.1.0';
const VERSION = '4.0';

/**
* @var string
Expand Down

0 comments on commit 95ee091

Please sign in to comment.