Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions mu-plugins/10up-plugin/plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
* @package TenUpPlugin
*/

declare( strict_types = 1 );

// Useful global constants.
define( 'TENUP_PLUGIN_VERSION', '0.1.0' );
define( 'TENUP_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
Expand Down
10 changes: 6 additions & 4 deletions mu-plugins/10up-plugin/src/Assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* @package TenUpPlugin
*/

declare( strict_types = 1 );

namespace TenUpPlugin;

use TenupFramework\Assets\GetAssetInfo;
Expand All @@ -26,7 +28,7 @@ class Assets implements ModuleInterface {
*
* @return bool
*/
public function can_register() {
public function can_register(): bool {
return true;
}

Expand All @@ -35,7 +37,7 @@ public function can_register() {
*
* @return void
*/
public function register() {
public function register(): void {
$this->setup_asset_vars(
dist_path: TENUP_PLUGIN_PATH . 'dist/',
fallback_version: TENUP_PLUGIN_VERSION
Expand All @@ -50,7 +52,7 @@ public function register() {
*
* @return void
*/
public function admin_scripts() {
public function admin_scripts(): void {
wp_enqueue_script(
'tenup_plugin_admin',
TENUP_PLUGIN_URL . 'dist/js/admin.js',
Expand All @@ -65,7 +67,7 @@ public function admin_scripts() {
*
* @return void
*/
public function admin_styles() {
public function admin_styles(): void {
wp_enqueue_style(
'tenup_plugin_admin',
TENUP_PLUGIN_URL . 'dist/css/admin.css',
Expand Down
2 changes: 2 additions & 0 deletions mu-plugins/10up-plugin/src/Core/Emoji.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* @package TenUpPlugin/Core
*/

declare( strict_types = 1 );

namespace TenUpPlugin\Core;

use TenupFramework\Module;
Expand Down
2 changes: 2 additions & 0 deletions mu-plugins/10up-plugin/src/Core/HeadOverrides.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* @package TenUpPlugin/Core
*/

declare( strict_types = 1 );

namespace TenUpPlugin\Core;

use TenupFramework\Module;
Expand Down
2 changes: 2 additions & 0 deletions mu-plugins/10up-plugin/src/PluginCore.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* @package TenUpPlugin
*/

declare( strict_types = 1 );

namespace TenUpPlugin;

use TenupFramework\ModuleInitialization;
Expand Down
16 changes: 9 additions & 7 deletions mu-plugins/10up-plugin/src/PostTypes/Demo.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* @package TenUpPlugin
*/

declare( strict_types = 1 );

namespace TenUpPlugin\PostTypes;

use TenupFramework\PostTypes\AbstractPostType;
Expand All @@ -19,7 +21,7 @@ class Demo extends AbstractPostType {
*
* @return string
*/
public function get_name() {
public function get_name(): string {
return 'tenup-demo';
}

Expand All @@ -28,7 +30,7 @@ public function get_name() {
*
* @return string
*/
public function get_singular_label() {
public function get_singular_label(): string {
return esc_html__( 'Demo', 'tenup-plugin' );
}

Expand All @@ -37,7 +39,7 @@ public function get_singular_label() {
*
* @return string
*/
public function get_plural_label() {
public function get_plural_label(): string {
return esc_html__( 'Demos', 'tenup-plugin' );
}

Expand All @@ -50,7 +52,7 @@ public function get_plural_label() {
*
* @return string
*/
public function get_menu_icon() {
public function get_menu_icon(): string {
return 'dashicons-chart-pie';
}

Expand All @@ -59,7 +61,7 @@ public function get_menu_icon() {
*
* @return bool
*/
public function can_register() {
public function can_register(): bool {
return false;
}

Expand All @@ -69,7 +71,7 @@ public function can_register() {
*
* @return array<string>
*/
public function get_supported_taxonomies() {
public function get_supported_taxonomies(): array {
return [
'tenup-tax-demo',
];
Expand All @@ -80,7 +82,7 @@ public function get_supported_taxonomies() {
*
* @return void
*/
public function after_register() {
public function after_register(): void {
// Register any hooks/filters you need.
}
}
8 changes: 5 additions & 3 deletions mu-plugins/10up-plugin/src/PostTypes/Page.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* @package TenUpPlugin
*/

declare( strict_types = 1 );

namespace TenUpPlugin\PostTypes;

use TenupFramework\PostTypes\AbstractCorePostType;
Expand All @@ -22,7 +24,7 @@ class Page extends AbstractCorePostType {
*
* @return string
*/
public function get_name() {
public function get_name(): string {
return 'page';
}

Expand All @@ -32,7 +34,7 @@ public function get_name() {
*
* @return array<string>
*/
public function get_supported_taxonomies() {
public function get_supported_taxonomies(): array {
return [];
}

Expand All @@ -41,7 +43,7 @@ public function get_supported_taxonomies() {
*
* @return void
*/
public function after_register() {
public function after_register(): void {
// Do nothing.
}
}
8 changes: 5 additions & 3 deletions mu-plugins/10up-plugin/src/PostTypes/Post.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* @package TenUpPlugin
*/

declare( strict_types = 1 );

namespace TenUpPlugin\PostTypes;

use TenupFramework\PostTypes\AbstractCorePostType;
Expand All @@ -22,7 +24,7 @@ class Post extends AbstractCorePostType {
*
* @return string
*/
public function get_name() {
public function get_name(): string {
return 'post';
}

Expand All @@ -34,7 +36,7 @@ public function get_name() {
*
* @return array<string>
*/
public function get_supported_taxonomies() {
public function get_supported_taxonomies(): array {
return [];
}

Expand All @@ -43,7 +45,7 @@ public function get_supported_taxonomies() {
*
* @return void
*/
public function after_register() {
public function after_register(): void {
// Do nothing.
}
}
10 changes: 6 additions & 4 deletions mu-plugins/10up-plugin/src/Taxonomies/Demo.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* @package TenUpPlugin
*/

declare( strict_types = 1 );

namespace TenUpPlugin\Taxonomies;

use TenupFramework\Taxonomies\AbstractTaxonomy;
Expand All @@ -19,7 +21,7 @@ class Demo extends AbstractTaxonomy {
*
* @return string
*/
public function get_name() {
public function get_name(): string {
return 'tenup-tax-demo';
}

Expand All @@ -28,7 +30,7 @@ public function get_name() {
*
* @return string
*/
public function get_singular_label() {
public function get_singular_label(): string {
return esc_html__( 'Demo Term', 'tenup-plugin' );
}

Expand All @@ -37,7 +39,7 @@ public function get_singular_label() {
*
* @return string
*/
public function get_plural_label() {
public function get_plural_label(): string {
return esc_html__( 'Demo Terms', 'tenup-plugin' );
}

Expand All @@ -46,7 +48,7 @@ public function get_plural_label() {
*
* @return bool
*/
public function can_register() {
public function can_register(): bool {
return false;
}
}
14 changes: 8 additions & 6 deletions themes/10up-block-theme/src/Assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* @package TenupBlockTheme
*/

declare( strict_types = 1 );

namespace TenupBlockTheme;

use TenupFramework\Assets\GetAssetInfo;
Expand All @@ -26,7 +28,7 @@ class Assets implements ModuleInterface {
*
* @return bool
*/
public function can_register() {
public function can_register(): bool {
return true;
}

Expand All @@ -35,7 +37,7 @@ public function can_register() {
*
* @return void
*/
public function register() {
public function register(): void {
$this->setup_asset_vars(
dist_path: TENUP_BLOCK_THEME_DIST_PATH,
fallback_version: TENUP_BLOCK_THEME_VERSION
Expand All @@ -51,7 +53,7 @@ public function register() {
*
* @return void
*/
public function enqueue_frontend_assets() {
public function enqueue_frontend_assets(): void {
wp_enqueue_style(
'tenup-theme-styles',
TENUP_BLOCK_THEME_TEMPLATE_URL . '/dist/css/frontend.css',
Expand All @@ -77,7 +79,7 @@ public function enqueue_frontend_assets() {
*
* @return void
*/
public function enqueue_block_editor_assets() {
public function enqueue_block_editor_assets(): void {
wp_enqueue_style(
'tenup-theme-editor-frame-style-overrides',
TENUP_BLOCK_THEME_TEMPLATE_URL . '/dist/css/editor-frame-style-overrides.css',
Expand All @@ -99,7 +101,7 @@ public function enqueue_block_editor_assets() {
*
* @return void
*/
public function enqueue_block_editor_iframe_assets() {
public function enqueue_block_editor_iframe_assets(): void {

// The `enqueue_block_assets` action is triggered both on the front-end and in the editor iframe.
// We only want to enqueue these styles inside the editor iframe.
Expand All @@ -120,7 +122,7 @@ public function enqueue_block_editor_iframe_assets() {
*
* @return void
*/
public function register_all_icons() {
public function register_all_icons(): void {
if ( ! function_exists( '\UIKitCore\Helpers\register_icons' ) ) {
return;
}
Expand Down
10 changes: 6 additions & 4 deletions themes/10up-block-theme/src/Blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* @package TenupBlockTheme
*/

declare( strict_types = 1 );

namespace TenupBlockTheme;

use TenupFramework\Assets\GetAssetInfo;
Expand All @@ -26,7 +28,7 @@ class Blocks implements ModuleInterface {
*
* @return bool
*/
public function can_register() {
public function can_register(): bool {
return true;
}

Expand All @@ -35,7 +37,7 @@ public function can_register() {
*
* @return void
*/
public function register() {
public function register(): void {
$this->setup_asset_vars(
dist_path: TENUP_BLOCK_THEME_DIST_PATH,
fallback_version: TENUP_BLOCK_THEME_VERSION
Expand All @@ -53,7 +55,7 @@ public function register() {
*
* @return void
*/
public function register_theme_blocks() {
public function register_theme_blocks(): void {
// Register all the blocks in the theme.
if ( file_exists( TENUP_BLOCK_THEME_BLOCK_DIST_DIR ) ) {
$block_json_files = glob( TENUP_BLOCK_THEME_BLOCK_DIST_DIR . '*/block.json' );
Expand Down Expand Up @@ -91,7 +93,7 @@ function ( array|bool $allowed_blocks ) use ( $block_names ): array|bool {
*
* @return void
*/
public function enqueue_theme_block_styles() {
public function enqueue_theme_block_styles(): void {
$stylesheets = glob( TENUP_BLOCK_THEME_DIST_PATH . '/blocks/autoenqueue/**/*.css' );

if ( empty( $stylesheets ) ) {
Expand Down
Loading