fair-plugin/inc/updater/class-themepackage.php
John Blackbourn e9dd5d2805
Rearchitect Updater into a registry (#428)
Signed-off-by: John Blackbourn <john@johnblackbourn.com>
Signed-off-by: Andy Fragen <andy@thefragens.com>
Signed-off-by: Carrie Dils <carriedils@gmail.com>
Signed-off-by: Norcross <andrew.norcross@gmail.com>
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: joedolson <joedolson@users.noreply.github.com>
Signed-off-by: Joe Dolson <design@joedolson.com>
Signed-off-by: Shadi Sharaf <shady@sharaf.me>
Co-authored-by: Chuck Adams <chaz@chaz.works>
Co-authored-by: Andy Fragen <andy@thefragens.com>
Co-authored-by: Norcross <andrew.norcross@gmail.com>
Co-authored-by: Carrie Dils <cdils@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: rmccue <21655+rmccue@users.noreply.github.com>
Co-authored-by: cdils <3099408+cdils@users.noreply.github.com>
Co-authored-by: joedolson <joedolson@users.noreply.github.com>
Co-authored-by: Joe Dolson <design@joedolson.com>
Co-authored-by: Shady Sharaf <shady@sharaf.me>
2026-02-12 14:08:33 -08:00

32 lines
607 B
PHP

<?php
/**
* Theme package data container.
*
* @package FAIR
*/
namespace FAIR\Updater;
/**
* Represents a registered FAIR theme.
*/
final class ThemePackage extends Package {
/**
* Get the theme slug.
*
* @return string The theme stylesheet (directory name).
*/
public function get_slug(): string {
return basename( dirname( $this->filepath ) );
}
/**
* Get the relative path used in update transients.
*
* @return string The relative path (theme directory name).
*/
public function get_relative_path(): string {
return dirname( plugin_basename( $this->filepath ) );
}
}