Skip to content

Commit

Permalink
Merge pull request #34 from infinum/feature/plugin
Browse files Browse the repository at this point in the history
Feature/plugin
  • Loading branch information
iruzevic authored Jan 16, 2020
2 parents 89e025e + 170c70a commit be0cd79
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 40 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ This projects adheres to [Semantic Versioning](https://semver.org/) and [Keep a

_No documentation available about unreleased changes as of yet._

## [2.0.4]

### Added

- has-activation-interface.php - New interface used in plugin activation.
- has-deactivation-interface.php - New interface used in plugin deactivation.

## [2.0.3]

### Updated
Expand Down Expand Up @@ -103,6 +110,7 @@ Init setup

[Unreleased]: https://github.com/infinum/eightshift-libs/compare/master...HEAD

[2.0.4]: https://github.com/infinum/eightshift-libs/compare/2.0.3...v2.0.4
[2.0.3]: https://github.com/infinum/eightshift-libs/compare/2.0.2...v2.0.3
[2.0.2]: https://github.com/infinum/eightshift-libs/compare/2.0.1...v2.0.2
[2.0.1]: https://github.com/infinum/eightshift-libs/compare/2.0.0...v2.0.1
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "infinum/eightshift-libs",
"version": "2.0.3",
"version": "2.0.4",
"description": "WordPress libs developed by Eightshift team to use in modern WordPress.",
"keywords": [
"composer",
Expand Down
29 changes: 29 additions & 0 deletions src/has-activation-interface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php
/**
* File that holds Has_Activation interface
*
* @since 1.0.0
* @package Eightshift_Libs\Core
*/
declare( strict_types=1 );

namespace Eightshift_Libs\Core;
/**
* Interface Has_Activation.
*
* An object that can be activated.
*
* @since 1.0.0
*/
interface Has_Activation {
/**
* Activate the service.
*
* Used when adding certain capabilities of a service.
*
* Example: add_role, add_cap, etc.
*
* @return void
*/
public function activate() : void;
}
29 changes: 29 additions & 0 deletions src/has-deactivation-interface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php
/**
* * File that holds Has_Deactivation interface
*
* @since 1.0.0
* @package Eightshift_Libs\Core
*/
declare( strict_types=1 );

namespace Eightshift_Libs\Core;
/**
* Interface Has_Deactivation.
*
* An object that can be deactivated.
*
* @since 1.0.0
*/
interface Has_Deactivation {
/**
* Deactivate the service.
*
* Can be used to remove parts of the functionality defined by certain service.
*
* Examples: remove_role, remove_cap, flush_rewrite_rules etc.
*
* @return void
*/
public function deactivate() : void;
}
39 changes: 0 additions & 39 deletions src/interface-config-data.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,45 +47,6 @@ public static function get_project_version() : string;
*/
public static function get_project_prefix() : string;

/**
* Returns the project environment variable descriptor.
*
* Used for defining global settings depending on the environment of the project.
* Can be one of, but not limited to, development, staging, production.
*
* @return string Current project environment string.
*
* @since 2.0.0 Added in the project
*/
public static function get_project_env() : string;

/**
* Method that returns project REST-API namespace.
*
* Used for namespacing projects REST-API routes and fields.
*
* @since 2.0.0 Added in the project
*/
public static function get_project_routes_namespace() : string;

/**
* Method that returns project REST-API version.
*
* Used for versioning projects REST-API routes and fields.
*
* @since 2.0.0 Added in the project
*/
public static function get_project_routes_version() : string;

/**
* Method that returns project primary color.
*
* Used for styling the mobile browser color and splash screens. Check head.php for more details.
*
* @since 2.0.0 Added in the project
*/
public static function get_project_primary_color() : string;

/**
* Return project absolute path.
*
Expand Down

0 comments on commit be0cd79

Please sign in to comment.