Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change sizes of (default) labels & Add GatherPress (ugly WIP :( ) #22

Merged
merged 3 commits into from
Oct 25, 2024
Merged
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 README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ This is the long desc
This package contains the following plugins.
Thoose are completely managed by code and lack of their typical UI.

* [GatherPress](https://github.com/GatherPress/gatherpress)
Powering our community's event management needs.
* [figuren-theater/label-printing](https://github.com/figuren-theater/label-printing)
Create printable labels with blocks
* [figuren-theater/theater-production-blocks](https://github.com/figuren-theater/theater-production-blocks)
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
"require": {
"figuren-theater/label-printing": "0.3.5",
"figuren-theater/theater-production-blocks": "0.2.0",
"figuren-theater/theater-production-subsites": "^0.1.1"
"figuren-theater/theater-production-subsites": "^0.1.1",
"wpackagist-plugin/gatherpress": "*"
},
"require-dev": {
"figuren-theater/code-quality": "^1.1"
Expand Down
168 changes: 166 additions & 2 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 13 additions & 8 deletions inc/label-printing/namespace.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
use function is_network_admin;
use function is_user_admin;

const BASENAME = 'label-printing/plugin.php';
const BASENAME = 'label-printing/label-printing.php';
const PLUGINPATH = '/figuren-theater/' . BASENAME;
// const PLUGINPATH = '/wpackagist-plugin/' . BASENAME; // Not yet, see #6.

Expand All @@ -35,7 +35,6 @@
* @return void
*/
function load_plugin(): void {

$config = Figuren_Theater\get_config()['modules']['theater'];
if ( ! $config['label-printing'] ) {
return;
Expand All @@ -48,7 +47,6 @@
if ( is_network_admin() || is_user_admin() ) {
return;
}

require_once FT_VENDOR_DIR . PLUGINPATH; // phpcs:ignore WordPressVIPMinimum.Files.IncludingFile.UsingCustomConstant

add_filter(
Expand All @@ -64,8 +62,8 @@
*
* @return array<int, array<string, string|int|float>>
*/
function filter_default_labels( array $default_labels ): array {

Check warning on line 65 in inc/label-printing/namespace.php

View workflow job for this annotation

GitHub Actions / call-workflow-build-test-measure / Lint: PHP

The method parameter $default_labels is never used

Check warning on line 65 in inc/label-printing/namespace.php

View workflow job for this annotation

GitHub Actions / call-workflow-build-test-measure / Lint: PHP

Unused function parameter $default_labels.
$default_labels = [
return [
[
'name' => 'A6 Landscape (4 Stück)',
'width' => 148,
Expand All @@ -84,8 +82,8 @@
],
[
'name' => 'HERMA Neon No. 5147 (8 Stück)',
'width' => 96,
'height' => 67,
'width' => 99,
'height' => 68,
'a4_border_tb' => 14,
'a4_border_lr' => 9,
'orientation' => 'portrait',
Expand All @@ -94,10 +92,17 @@
'name' => 'LABELident (64 Stück)',
'width' => 48,
'height' => 17,
'a4_border_tb' => 13,
'a4_border_tb' => 14, // 13 / 15 / 14
'a4_border_lr' => 8,
'orientation' => 'portrait',
],
[
'name' => 'AVERY 6122 (24 Stück)',
'width' => 70,
'height' => 36,
'a4_border_tb' => 14,
'a4_border_lr' => 7,
'orientation' => 'portrait',
],
];
return $default_labels;
}
1 change: 0 additions & 1 deletion phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ parameters:
# when package is tested
# and not running within ft-platform
- wp-content/
- tests/
ignoreErrors:
# Find a nicer way instead of ignoring this Error on every ft-module
- '#Function Altis\\register_module not found\.#'
Expand Down