Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
crstauf committed Feb 7, 2024
1 parent 6f549bf commit eacaa85
Showing 1 changed file with 27 additions and 2 deletions.
29 changes: 27 additions & 2 deletions Demo.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ public function action__template_redirect() : void {
$this->picsum();
$this->unsplash();
$this->placeholder();
$this->placehold();
$this->url();
$this->fallback();

Expand Down Expand Up @@ -297,8 +298,32 @@ protected function placeholder() : void {
$this->output( $image, ob_get_clean() );
}

protected function placehold() : void {
$image = \Image_Tag::create( 'placehold', array(
'width' => 1000,
'height' => 350,
), array(
'text' => 'Placehold.co \n FTW',
'retina' => 2,
) );

ob_start();
?>

\Image_Tag::create( 'placehold', array(
'width' => 1000,
'height' => 350,
), array(
'text' => 'Placehold.co \n FTW',
'retina' => 2,
) );

<?php
$this->output( $image, ob_get_clean() );
}

protected function url() {
$url = get_theme_file_uri( 'assets/images/playing-in-the-sand.jpg' );
$url = 'https://placehold.co/982x1424@2x.png';

$image = \Image_Tag::create( $url, array(
'width' => 982,
Expand Down Expand Up @@ -327,7 +352,7 @@ protected function fallback() {
'image-sizes' => 'full',
'fallback' => array(
'joeschmoe' => ! empty( $_GET['person'] ),
'placeholder' => current_user_can( 'edit_post', get_queried_object_id() ),
'placehold' => current_user_can( 'edit_post', get_queried_object_id() ),
'picsum' => true
),
) );
Expand Down

0 comments on commit eacaa85

Please sign in to comment.