Storefront banner on add-ons. closes #6923

This commit is contained in:
James Koster 2014-12-16 11:43:26 +00:00
parent 4150b03ea0
commit 0c95d76c45
5 changed files with 46 additions and 3 deletions

File diff suppressed because one or more lines are too long

View File

@ -83,6 +83,26 @@
}
}
}
.storefront {
background: url(../images/storefront-bg.jpg) bottom right #f6f6f6;
border: 1px solid #ddd;
padding: 20px;
overflow: hidden;
zoom: 1;
img {
width: 278px;
height: auto;
float: left;
margin: 0 20px 0 0;
box-shadow: 0 1px 6px rgba(0,0,0,0.1);
}
p {
max-width: 750px;
}
}
}
.woocommerce-message {

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

View File

@ -9,6 +9,7 @@ if ( ! defined( 'ABSPATH' ) ) {
}
$view = isset( $_GET['view'] ) ? sanitize_text_field( $_GET['view'] ) : '';
$theme = wp_get_theme();
?>
@ -17,7 +18,6 @@ $view = isset( $_GET['view'] ) ? sanitize_text_field( $_GET['view'] ) : '';
<h2>
<?php _e( 'WooCommerce Add-ons/Extensions', 'woocommerce' ); ?>
<a href="http://www.woothemes.com/product-category/woocommerce-extensions/" class="add-new-h2"><?php _e( 'Browse all extensions', 'woocommerce' ); ?></a>
<a href="http://www.woothemes.com/product-category/themes/woocommerce/" class="add-new-h2"><?php _e( 'Browse themes', 'woocommerce' ); ?></a>
</h2>
<?php if ( $addons ) : ?>
<ul class="subsubsub">
@ -93,4 +93,27 @@ $view = isset( $_GET['view'] ) ? sanitize_text_field( $_GET['view'] ) : '';
<?php else : ?>
<p><?php printf( __( 'Our catalog of WooCommerce Extensions can be found on WooThemes.com here: <a href="%s">WooCommerce Extensions Catalog</a>', 'woocommerce' ), 'http://www.woothemes.com/product-category/woocommerce-extensions/' ); ?></p>
<?php endif; ?>
<?php if ( 'Storefront' != $theme['Name'] ) : ?>
<div class="storefront">
<img src="<?php echo WC()->plugin_url(); ?>/assets/images/storefront.jpg" alt="Storefront" />
<h3><?php _e( 'Looking for a WooCommerce theme?', 'woocommerce' ); ?></h3>
<p>
<?php printf( __( 'We recommend Storefront, the %sofficial%s WooCommerce theme.', 'woocommerce' ), '<em>', '</em>' ); ?>
</p>
<p>
<?php printf( __( 'Storefront is an intuitive &amp; flexible, %sfree%s WordPress theme offering deep integration with WooCommerce and many of the most popular customer-facing extensions.', 'woocommerce' ), '<strong>', '</strong>' ); ?>
</p>
<p>
<a href="<?php echo esc_url( 'http://www.woothemes.com/storefront/' ); ?>" class="button">Read all about it</a>
<a href="<?php echo esc_url( wp_nonce_url( self_admin_url( 'update.php?action=install-theme&theme=storefront' ), 'install-theme_storefront' ) ); ?>" class="button button-primary"><?php _e( 'Download & install', 'woocommerce' ); ?></a>
</p>
</div>
<?php endif; ?>
</div>