Skip to content

Commit

Permalink
Bump version to 0.1.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
felixarntz committed Oct 28, 2024
1 parent e897e02 commit 257c8ea
Show file tree
Hide file tree
Showing 162 changed files with 1,141 additions and 1,141 deletions.
28 changes: 14 additions & 14 deletions src/Admin_Pages/Abstract_Admin_Page.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Class Felix_Arntz\WP_OOP_Plugin_Lib\Admin_Pages\Abstract_Admin_Page
*
* @since n.e.x.t
* @since 0.1.0
* @package wp-oop-plugin-lib
*/

Expand All @@ -13,38 +13,38 @@
/**
* Base class representing a WordPress admin page.
*
* @since n.e.x.t
* @since 0.1.0
*/
abstract class Abstract_Admin_Page implements Admin_Page {

/**
* Admin page slug.
*
* @since n.e.x.t
* @since 0.1.0
* @var string
*/
private $slug;

/**
* Admin page title.
*
* @since n.e.x.t
* @since 0.1.0
* @var string
*/
private $title;

/**
* Admin page capability.
*
* @since n.e.x.t
* @since 0.1.0
* @var string
*/
private $capability;

/**
* Constructor.
*
* @since n.e.x.t
* @since 0.1.0
*/
public function __construct() {
$this->slug = $this->slug();
Expand All @@ -55,7 +55,7 @@ public function __construct() {
/**
* Gets the admin page slug.
*
* @since n.e.x.t
* @since 0.1.0
*
* @return string Admin page slug.
*/
Expand All @@ -66,7 +66,7 @@ final public function get_slug(): string {
/**
* Gets the admin page title.
*
* @since n.e.x.t
* @since 0.1.0
*
* @return string Admin page title.
*/
Expand All @@ -77,7 +77,7 @@ final public function get_title(): string {
/**
* Gets the admin page's required capability.
*
* @since n.e.x.t
* @since 0.1.0
*
* @return string Admin page capability.
*/
Expand All @@ -88,21 +88,21 @@ final public function get_capability(): string {
/**
* Initializes functionality for the admin page.
*
* @since n.e.x.t
* @since 0.1.0
*/
abstract public function load(): void;

/**
* Renders the admin page.
*
* @since n.e.x.t
* @since 0.1.0
*/
abstract public function render(): void;

/**
* Returns the admin page slug.
*
* @since n.e.x.t
* @since 0.1.0
*
* @return string Admin page slug.
*/
Expand All @@ -111,7 +111,7 @@ abstract protected function slug(): string;
/**
* Returns the admin page title.
*
* @since n.e.x.t
* @since 0.1.0
*
* @return string Admin page title.
*/
Expand All @@ -120,7 +120,7 @@ abstract protected function title(): string;
/**
* Returns the admin page's required capability.
*
* @since n.e.x.t
* @since 0.1.0
*
* @return string Admin page capability.
*/
Expand Down
20 changes: 10 additions & 10 deletions src/Admin_Pages/Admin_Menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Class Felix_Arntz\WP_OOP_Plugin_Lib\Admin_Pages\Admin_Menu
*
* @since n.e.x.t
* @since 0.1.0
* @package wp-oop-plugin-lib
*/

Expand All @@ -15,14 +15,14 @@
*
* It may be an existing admin menu or a new custom admin menu.
*
* @since n.e.x.t
* @since 0.1.0
*/
class Admin_Menu {

/**
* Admin menu slug.
*
* @since n.e.x.t
* @since 0.1.0
* @var string
*/
private $menu_slug;
Expand All @@ -32,23 +32,23 @@ class Admin_Menu {
*
* Only relevant if this is a new admin menu.
*
* @since n.e.x.t
* @since 0.1.0
* @var array<string, mixed>
*/
private $menu_args;

/**
* Whether the menu has been added (or was already present).
*
* @since n.e.x.t
* @since 0.1.0
* @var bool
*/
private $menu_added;

/**
* Constructor.
*
* @since n.e.x.t
* @since 0.1.0
*
* @param string $menu_slug Admin menu slug. Must be either one of the default admin menu files (e.g.
* 'options-general.php'), or a custom menu slug, or an empty string to
Expand Down Expand Up @@ -77,7 +77,7 @@ public function __construct( string $menu_slug, array $menu_args = array() ) {
/**
* Adds an admin page to the admin menu.
*
* @since n.e.x.t
* @since 0.1.0
*
* @param Admin_Page $page Admin page to add.
* @return string Page hook suffix generated by WordPress on success, or empty string on failure.
Expand Down Expand Up @@ -125,7 +125,7 @@ public function add_page( Admin_Page $page ): string {
/**
* Returns the slug of the admin menu.
*
* @since n.e.x.t
* @since 0.1.0
*
* @return string Admin menu slug.
*/
Expand All @@ -136,7 +136,7 @@ public function get_slug(): string {
/**
* Checks whether the menu is already present.
*
* @since n.e.x.t
* @since 0.1.0
*
* @return bool True if the menu was already added, false otherwise.
*/
Expand Down Expand Up @@ -164,7 +164,7 @@ private function is_menu_already_present(): bool {
/**
* Returns the full page title to use as part of the HTML document title for the page.
*
* @since n.e.x.t
* @since 0.1.0
*
* @param Admin_Page $page Admin page to get the full page title for.
* @return string Full page title.
Expand Down
12 changes: 6 additions & 6 deletions src/Admin_Pages/Admin_Page_Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Class Felix_Arntz\WP_OOP_Plugin_Lib\Admin_Pages\Admin_Page_Collection
*
* @since n.e.x.t
* @since 0.1.0
* @package wp-oop-plugin-lib
*/

Expand All @@ -17,22 +17,22 @@
/**
* Class for a collection of admin pages.
*
* @since n.e.x.t
* @since 0.1.0
*/
class Admin_Page_Collection implements Collection {

/**
* Admin pages stored in the collection.
*
* @since n.e.x.t
* @since 0.1.0
* @var Admin_Page[]
*/
private $admin_pages = array();

/**
* Constructor.
*
* @since n.e.x.t
* @since 0.1.0
*
* @param Admin_Page[] $admin_pages List of admin page instances.
*
Expand All @@ -52,7 +52,7 @@ public function __construct( array $admin_pages ) {
/**
* Returns an iterator for the collection.
*
* @since n.e.x.t
* @since 0.1.0
*
* @return ArrayIterator<int, Admin_Page> Collection iterator.
*/
Expand All @@ -63,7 +63,7 @@ public function getIterator(): Traversable {
/**
* Returns the size of the collection.
*
* @since n.e.x.t
* @since 0.1.0
*
* @return int Collection size.
*/
Expand Down
14 changes: 7 additions & 7 deletions src/Admin_Pages/Contracts/Admin_Page.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Interface Felix_Arntz\WP_OOP_Plugin_Lib\Admin_Pages\Contracts\Admin_Page
*
* @since n.e.x.t
* @since 0.1.0
* @package wp-oop-plugin-lib
*/

Expand All @@ -11,14 +11,14 @@
/**
* Interface for an admin page.
*
* @since n.e.x.t
* @since 0.1.0
*/
interface Admin_Page {

/**
* Gets the admin page slug.
*
* @since n.e.x.t
* @since 0.1.0
*
* @return string Admin page slug.
*/
Expand All @@ -27,7 +27,7 @@ public function get_slug(): string;
/**
* Gets the admin page title.
*
* @since n.e.x.t
* @since 0.1.0
*
* @return string Admin page title.
*/
Expand All @@ -36,7 +36,7 @@ public function get_title(): string;
/**
* Gets the admin page's required capability.
*
* @since n.e.x.t
* @since 0.1.0
*
* @return string Admin page capability.
*/
Expand All @@ -45,14 +45,14 @@ public function get_capability(): string;
/**
* Initializes functionality for the admin page.
*
* @since n.e.x.t
* @since 0.1.0
*/
public function load(): void;

/**
* Renders the admin page.
*
* @since n.e.x.t
* @since 0.1.0
*/
public function render(): void;
}
10 changes: 5 additions & 5 deletions src/Capabilities/Abstract_Capability.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Class Felix_Arntz\WP_OOP_Plugin_Lib\Capabilities\Abstract_Capability
*
* @since n.e.x.t
* @since 0.1.0
* @package wp-oop-plugin-lib
*/

Expand All @@ -13,22 +13,22 @@
/**
* Base class representing a WordPress capability.
*
* @since n.e.x.t
* @since 0.1.0
*/
abstract class Abstract_Capability implements Capability {

/**
* Capability key.
*
* @since n.e.x.t
* @since 0.1.0
* @var string
*/
private $key;

/**
* Constructor.
*
* @since n.e.x.t
* @since 0.1.0
*
* @param string $key Capability key.
*/
Expand All @@ -39,7 +39,7 @@ public function __construct( string $key ) {
/**
* Gets the capability key / slug.
*
* @since n.e.x.t
* @since 0.1.0
*
* @return string Capability key.
*/
Expand Down
Loading

0 comments on commit 257c8ea

Please sign in to comment.