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

fix ARI default image #317

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

fix ARI default image #317

wants to merge 4 commits into from

Conversation

lphoumpakka
Copy link
Contributor

No description provided.

Copy link
Member

@petitphp petitphp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On parse déjà le assets.json dans le service Assets. Pour moi, ce serait plus intéressant de déplacer ces modifications à cet endroit.

inc/Services/Theme.php Outdated Show resolved Hide resolved
inc/Services/Theme.php Outdated Show resolved Hide resolved
Copy link
Member

@petitphp petitphp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merci pour la modification.

Il faudrait faire une autre modification pour travailler directement avec l'instance du container pour récupérer le service Assets et l'utiliser dans les méthodes.

inc/Services/Theme.php Outdated Show resolved Hide resolved
inc/Services/Theme.php Outdated Show resolved Hide resolved
inc/Services/Theme.php Show resolved Hide resolved
inc/Services/Assets.php Show resolved Hide resolved
inc/Services/Theme.php Outdated Show resolved Hide resolved
@lphoumpakka lphoumpakka requested review from petitphp and Rahe May 31, 2024 15:41
break;
case 'js':
$file = $assets['app.js'];
$file = $assets['app.js'] ?? '';
break;
default:
$file = null;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Plutôt que d'avoir le code pour le custom type après, je l'aurais déplacé ici :

Suggested change
$file = null;
$file = $assets[ $type ] ?? '';

Et supprimer la partie après :

// Custom type
if ( ! empty( $assets[ $type ] ) ) {
	$file = $assets[ $type ];
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants