Skip to content

Commit

Permalink
Use SVG for logo.
Browse files Browse the repository at this point in the history
  • Loading branch information
spacedmonkey committed May 14, 2020
1 parent 4981827 commit def0146
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
Binary file removed assets/images/logo.png
Binary file not shown.
3 changes: 3 additions & 0 deletions assets/images/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions php/class-plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -531,12 +531,12 @@ public function admin_notice() {
}

$class = 'notice notice-warning is-dismissible';
$logo = $this->asset_url( 'assets/images/logo.png' );
$logo = $this->asset_url( 'assets/images/logo.svg' );
$title = esc_html__( 'Unsplash', 'unsplash' );
$message = esc_html__( 'To complete set up of the Unsplash plugin you’ll need to add the API access key.', 'unsplash' );
$button = esc_html__( 'Complete setup', 'unsplash' );
$url = get_admin_url( null, 'options-general.php?page=unsplash' );

printf( '<div class="%1$s"><h3><img src="%2$s" height="14" "/> %3$s</h3><p>%4$s</p><p><a href="%5$s" class="button button-primary button-large">%6$s</a></p></div>', esc_attr( $class ), esc_url( $logo ), esc_html( $title ), esc_html( $message ), esc_url( $url ), esc_html( $button ) );
printf( '<div class="%1$s"><h3><img src="%2$s" height="18" "/> %3$s</h3><p>%4$s</p><p><a href="%5$s" class="button button-primary button-large">%6$s</a></p></div>', esc_attr( $class ), esc_url( $logo ), esc_html( $title ), esc_html( $message ), esc_url( $url ), esc_html( $button ) );
}
}
4 changes: 2 additions & 2 deletions php/class-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ public function sanitize_settings( $settings ) {
* Renders the entire settings page.
*/
public function settings_page_render() {
$logo = $this->plugin->asset_url( 'assets/images/logo.png' );
$logo = $this->plugin->asset_url( 'assets/images/logo.svg' );
$auth = get_option( 'unsplash_auth' );
if ( ! empty( $auth['message'] ) ) {
printf( '<div class="%s notice is-dismissible"><p>%s</p></div>', esc_attr( $auth['type'] ), esc_html( $auth['message'] ) );
Expand All @@ -250,7 +250,7 @@ public function settings_page_render() {
margin-bottom: 20px;
}
</style>
<h1><img src="<?php echo esc_url( $logo ); ?>" height="20" /> <?php esc_html_e( 'Unsplash', 'unsplash' ); ?></h1>
<h1><img src="<?php echo esc_url( $logo ); ?>" height="26" /> <?php esc_html_e( 'Unsplash', 'unsplash' ); ?></h1>
<p><i><?php esc_html_e( 'Search the internet’s source of freely usable images.', 'unsplash' ); ?></i></p><br />
<h1><?php esc_html_e( 'General Settings', 'unsplash' ); ?></h1>
<?php
Expand Down

0 comments on commit def0146

Please sign in to comment.