You've already forked wp-fedistream
feat: Initial release v0.1.0
WP FediStream - Stream music over ActivityPub Features: - Custom post types: Artist, Album, Track, Playlist - Custom taxonomies: Genre, Mood, License - User roles: Artist, Label - Admin dashboard with statistics - Frontend templates and shortcodes - Audio player with queue management - ActivityPub integration with actor support - WooCommerce product types for albums/tracks - User library with favorites and history - Notification system (in-app and email) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
67
includes/Taxonomies/AbstractTaxonomy.php
Normal file
67
includes/Taxonomies/AbstractTaxonomy.php
Normal file
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
/**
|
||||
* Abstract base class for custom taxonomies.
|
||||
*
|
||||
* @package WP_FediStream
|
||||
*/
|
||||
|
||||
namespace WP_FediStream\Taxonomies;
|
||||
|
||||
// Prevent direct file access.
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Abstract taxonomy class.
|
||||
*
|
||||
* Provides common functionality for all custom taxonomies.
|
||||
*/
|
||||
abstract class AbstractTaxonomy {
|
||||
|
||||
/**
|
||||
* Taxonomy key.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected string $taxonomy;
|
||||
|
||||
/**
|
||||
* Post types this taxonomy applies to.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected array $post_types = array();
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
public function __construct() {
|
||||
add_action( 'init', array( $this, 'register' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Register the taxonomy.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
abstract public function register(): void;
|
||||
|
||||
/**
|
||||
* Get the taxonomy key.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function get_taxonomy(): string {
|
||||
return $this->taxonomy;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the post types this taxonomy is registered for.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function get_post_types(): array {
|
||||
return $this->post_types;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user