Skip to content

Commit

Permalink
masteriyo (#88)
Browse files Browse the repository at this point in the history
* refactor: certificate sample json

* add: preview images

* add: preview images

* fix: image id placeholder
  • Loading branch information
asheshmagar authored Dec 18, 2023
1 parent 466de63 commit 4a86412
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion resources/masteriyo/certificate/sample.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function( $dir ) {
function( $images, $file ) use ( $samples_dir, $base_url, $dir ) {
$image_file = $samples_dir . '/' . $dir . '/' . $file;
$image_url = $base_url . '/' . $dir . '/' . $file;
if ( is_file( $image_file ) && in_array( pathinfo( $file, PATHINFO_EXTENSION ), [ 'jpg', 'jpeg', 'png', 'gif' ] ) ) {
if ( is_file( $image_file ) && false === strpos( $file, 'preview' ) && in_array( pathinfo( $file, PATHINFO_EXTENSION ), [ 'jpg', 'jpeg', 'png', 'gif' ] ) ) {
$images[] = [
'url' => $image_url,
'url_placeholder' => "{{{$file}}}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@

<!-- wp:column {"width":"35%"} -->
<div class="wp-block-column" style="flex-basis:35%">
<!-- wp:image {"align":"center","id":{{signature.png}},"width":153,"height":53,"sizeSlug":"full","linkDestination":"none"} -->
<!-- wp:image {"align":"center","id":{{signature}},"width":153,"height":53,"sizeSlug":"full","linkDestination":"none"} -->
<figure class="wp-block-image aligncenter size-full is-resized"><img src="{{signature.png}}" alt="" class="wp-image-{{masteriyo_signature_image_id}}" width="153" height="53"/></figure>
<!-- /wp:image -->

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 4a86412

Please sign in to comment.