Install message
This commit is contained in:
parent
b934c40794
commit
bf13ba4a8b
|
@ -39,7 +39,7 @@ function woocommerce_admin_menu() {
|
|||
*/
|
||||
add_action( "admin_print_styles", 'woocommerce_admin_notices_styles' );
|
||||
|
||||
function woocommerce_admin_notices() {
|
||||
function woocommerce_admin_install_notice() {
|
||||
?>
|
||||
<div id="message" class="updated woocommerce-message wc-connect">
|
||||
<div class="squeezer">
|
||||
|
@ -50,10 +50,16 @@ function woocommerce_admin_notices() {
|
|||
<?php
|
||||
}
|
||||
function woocommerce_admin_notices_styles() {
|
||||
if (get_option('woocommerce_installed')!=1 || get_option('skip_install_woocommerce_pages')==1 || woocommerce_get_page_id('shop')>0 || isset($_GET['install_woocommerce_pages']) || isset($_GET['skip_install_woocommerce_pages'])) return;
|
||||
|
||||
add_action( 'admin_notices', 'woocommerce_admin_notices' );
|
||||
wp_enqueue_style( 'woocommerce-activation', plugins_url( '/assets/css/wc-activation.css', dirname( __FILE__ ) ) );
|
||||
if ( get_option('woocommerce_installed')==1 ) {
|
||||
|
||||
wp_enqueue_style( 'woocommerce-activation', plugins_url( '/assets/css/wc-activation.css', dirname( __FILE__ ) ) );
|
||||
|
||||
if (get_option('skip_install_woocommerce_pages')!=1 && woocommerce_get_page_id('shop')<1 && !isset($_GET['install_woocommerce_pages']) && !isset($_GET['skip_install_woocommerce_pages'])) {
|
||||
add_action( 'admin_notices', 'woocommerce_admin_install_notice' );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1075,10 +1075,15 @@ function woocommerce_settings() {
|
|||
|
||||
update_option('woocommerce_installed', 0);
|
||||
|
||||
echo '<div id="message" class="updated fade">
|
||||
<p style="float:right;">' . __( 'Like WooCommerce? <a href="http://wordpress.org/extend/plugins/woocommerce/">Support us by leaving a rating!</a>', 'woocommerce' ) . '</p>
|
||||
<p><strong>' . __( 'WooCommerce has been installed and setup. Enjoy :)', 'woocommerce' ) . '</strong></p>
|
||||
</div>';
|
||||
?>
|
||||
<div id="message" class="updated woocommerce-message wc-connect">
|
||||
<div class="squeezer">
|
||||
<h4><?php _e( '<strong>Congratulations!</strong> – WooCommerce has been installed and setup. Enjoy :)', 'woocommerce' ); ?></h4>
|
||||
<p><a href="https://twitter.com/share" class="twitter-share-button" data-url="http://www.woothemes.com/woocommerce/" data-text="An open-source #ecommerce plugin for #wordpress that helps you sell anything. Beautifully." data-via="woothemes" data-size="large" data-hashtags="woocommerce">Tweet</a>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script></p>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
|
||||
flush_rewrite_rules( false );
|
||||
|
||||
|
|
|
@ -9,20 +9,20 @@
|
|||
-moz-box-shadow: inset 0 0 15px rgba( 0,0,0,0.04 );
|
||||
box-shadow: inset 0 0 15px rgba( 0,0,0,0.04 );
|
||||
overflow: hidden;
|
||||
line-height: 180%;
|
||||
padding: 10px 0 5px !important;
|
||||
padding: 10px 0 10px !important;
|
||||
background: #cc99c2 url(../images/message.png) no-repeat right bottom !important;
|
||||
}
|
||||
.woocommerce-message .squeezer {
|
||||
max-width: 940px;
|
||||
margin: 0 0 2px;
|
||||
margin: 0;
|
||||
padding: 0 10px;
|
||||
text-align: left;
|
||||
overflow: hidden;
|
||||
}
|
||||
.woocommerce-message h4 {
|
||||
margin: 0 10px 10px 0;
|
||||
margin: 0 10px 0 0;
|
||||
font-size: 18px;
|
||||
line-height: 36px;
|
||||
font-family: "Helvetica Neue",Helvetica,Arial,"Lucida Grande",Verdana,"Bitstream Vera Sans",sans-serif;
|
||||
font-weight: normal;
|
||||
color: #fff;
|
||||
|
@ -30,17 +30,22 @@
|
|||
-moz-border-radius: 5px;
|
||||
-webkit-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
display: inline-block;
|
||||
float: left;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.woocommerce-message p {
|
||||
margin: -1px 0 0 0 !important;
|
||||
padding: 0;
|
||||
display: inline-block;
|
||||
margin: 0 !important;
|
||||
padding: 2px 0 !important;
|
||||
float: left;
|
||||
line-height: 32px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.woocommerce-message p a.button-primary {
|
||||
font-size: 16px !important;
|
||||
display: inline-block;
|
||||
padding: 8px 15px;
|
||||
line-height: 16px !important;
|
||||
margin: 0 5px 0 0;
|
||||
padding: 6px 15px;
|
||||
vertical-align: middle;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
|
@ -67,4 +72,7 @@
|
|||
}
|
||||
.woocommerce-message p a.skip {
|
||||
opacity: 0.5;
|
||||
}
|
||||
.woocommerce-message .twitter-share-button {
|
||||
vertical-align: middle;
|
||||
}
|
Loading…
Reference in New Issue