Skip to content

Commit

Permalink
Merge branch 'develop' into feature/APP-704-add-base
Browse files Browse the repository at this point in the history
  • Loading branch information
nirbhayel authored Nov 5, 2024
2 parents 96fec7c + ae23a19 commit c9c7a4f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
12 changes: 7 additions & 5 deletions .github/scripts/update-version-in-files.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
'use strict';

const fs = require( "fs" );
const MAIN_FILE_NAME = 'pojo-accessibility.php';
const VERSION_CONSTANT = 'EA11Y_VERSION';

const { VERSION } = process.env;
if ( ! VERSION ) {
Expand Down Expand Up @@ -39,17 +41,17 @@ const run = async () => {
]
);

// update version in image-optimization.php
await replaceInFileWithArray( './image-optimization.php',
// update version in MAIN_FILE_NAME
await replaceInFileWithArray( `./${MAIN_FILE_NAME}`,
[
{
from: /\* Version: (.*)/m,
to: `* Version: ${ VERSION }`,
},
{
from: /define\( \'IMAGE_OPTIMIZER_VERSION\', \'(.*)\' \)\;/m,
to: `define( 'IMAGE_OPTIMIZER_VERSION', '${ VERSION }' );`,
},
from: new RegExp(`define\\( '${VERSION_CONSTANT}', '(.*)' \\);`, 'm' ),
to: `define( '${VERSION_CONSTANT}', '${VERSION}' );`,
}
]
);

Expand Down
4 changes: 2 additions & 2 deletions classes/logger.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ private static function log( string $log_level, $message ): void {
$function = $backtrace[2]['function'];

if ( $class ) {
$message = '[Site Mailer]: ' . $log_level . ' in ' . "$class$type$function()" . ': ' . $message;
$message = '[EA11Y]: ' . $log_level . ' in ' . "$class$type$function()" . ': ' . $message;
} else {
$message = '[Site Mailer]: ' . $log_level . ' in ' . "$function()" . ': ' . $message;
$message = '[EA11Y]: ' . $log_level . ' in ' . "$function()" . ': ' . $message;
}

error_log( $message ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log
Expand Down
4 changes: 4 additions & 0 deletions classes/utils/assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

namespace EA11y\Classes\Utils;

use const EA11Y_ASSETS_PATH;
use const EA11Y_ASSETS_URL;
use const EA11Y_VERSION;

if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
Expand Down
2 changes: 1 addition & 1 deletion ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<arg name="parallel" value="8" />

<config name="text_domain" value="site-mailer" />
<config name="text_domain" value="pojo-accessibility" />

<exclude-pattern>vendor/</exclude-pattern>
<exclude-pattern>tmp/</exclude-pattern>
Expand Down

0 comments on commit c9c7a4f

Please sign in to comment.