Skip to content
This repository has been archived by the owner on Nov 6, 2022. It is now read-only.

Commit

Permalink
Merge branch 'develop' into bump/1.5.5
Browse files Browse the repository at this point in the history
  • Loading branch information
lukecarbis committed Apr 23, 2020
2 parents 120126f + e117329 commit db1e1d1
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 64 deletions.
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,11 @@ Simple to use functions, ready to render and work with the values stored through
### Connect with Community ###
Join The Lab, our free Block Lab Community on Slack. The Lab is our real-time home for sharing resources, learning, and making connections. [Learn more.](https://getblocklab.com/welcome-to-the-lab/)

### Go Pro ###
Block Lab Pro is here, with powerful features to take your block building to the next level. [Learn more.](https://getblocklab.com/block-lab-pro)

## Links ##
* [WordPress.org](https://wordpress.org/plugins/block-lab)
* [Github](https://github.com/getblocklab/block-lab)
* [Documentation](https://getblocklab.com/docs)
* [Support](https://wordpress.org/support/plugin/block-lab)
* [Block Lab Pro](https://getblocklab.com/block-lab-pro)

## Installation ##
### From Within WordPress ###
Expand Down
1 change: 1 addition & 0 deletions css/admin.upgrade.css
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@
color: #000;
padding-top: 12px;
text-shadow: 0 0 4px #fff;
font-style: normal;
}
/* Tile sizing */
.block-lab-pro .tile_2 {
Expand Down
2 changes: 1 addition & 1 deletion php/admin/class-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function init() {
$this->onboarding = new Onboarding();
block_lab()->register_component( $this->onboarding );

$show_pro_nag = apply_filters( 'block_lab_show_pro_nag', true );
$show_pro_nag = apply_filters( 'block_lab_show_pro_nag', false );
if ( $show_pro_nag && ! block_lab()->is_pro() ) {
$this->upgrade = new Upgrade();
block_lab()->register_component( $this->upgrade );
Expand Down
10 changes: 2 additions & 8 deletions php/views/license.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,8 @@
} else {
echo wp_kses_post(
sprintf(
'<p>%1$s %2$s</p>',
__( 'No Pro license was found for this installation.', 'block-lab' ),
sprintf(
// translators: Opening and closing anchor and emphasis tags.
__( '%1$sGet Block Lab Pro!%2$s', 'block-lab' ),
'<a href="' . add_query_arg( [ 'page' => 'block-lab-pro' ] ) . '"><em>',
'</em></a>'
)
'<p>%1$s</p>',
__( 'No license was found for this installation.', 'block-lab' )
)
);
}
Expand Down
48 changes: 3 additions & 45 deletions php/views/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,63 +13,21 @@
<div class="tile_body">
<div>
<h1>Block Lab <span class="pro-pill">Pro</span></h1>
<p class="description"><?php esc_html_e( 'A custom block building experience perfect for agencies and freelancers.', 'block-lab' ); ?></p>
<div class="cta_license_form_wrapper">
<form class="license_key_form" method="post" action="options.php">
<?php
register_setting( 'block-lab-license-key', 'block_lab_license_key' );
settings_fields( 'block-lab-license-key' );
?>
<input class="input_text" placeholder="Enter license key" name="block_lab_license_key" type="text" />
<input class="button" type="submit" value="<?php esc_html_e( 'Activate', 'block-lab' ); ?>" />
</form>
<p class="license_key_text">or</p>
<a target="_blank" class="button button--secondary button_cta" href="https://getblocklab.com/block-lab-pro"><?php esc_html_e( 'Go Pro', 'block-lab' ); ?></a>
</div>
<p class="description"><?php esc_html_e( '…is no longer available. 😢', 'block-lab' ); ?></p>
</div>
</div>
</div>
<!-- Dashboard Tile -->
<div class="tile tile_2">
<div class="tile_header">
<div class="tile_icon_wrapper" style="background-image: url('https://getblocklab.com/wp-content/uploads/2019/02/block_lab_admin_icon_new_fields.svg');"></div>
</div>
<div class="tile_body">
<h4 class="align_center"><?php esc_html_e( 'Pro Fields', 'block-lab' ); ?></h4>
<p class="align_center"><?php esc_html_e( 'More fields including repeater, post object, and more to help you build the custom blocks you need for yourself and your clients.', 'block-lab' ); ?></p>
</div>
</div>
<!-- Dashboard Tile -->
<div class="tile tile_2">
<div class="tile_header">
<div class="tile_icon_wrapper" style="background-image: url('https://getblocklab.com/wp-content/uploads/2019/02/block_lab_admin_icon_features.svg');"></div>
</div>
<div class="tile_body">
<h4 class="align_center"><?php esc_html_e( 'Pro Features', 'block-lab' ); ?></h4>
<p class="align_center"><?php esc_html_e( 'Features including conditional logic, custom validation, and white-labeling, to help you extend Block Lab and leverage the best of Gutenberg.', 'block-lab' ); ?></p>
</div>
</div>
<!-- Dashboard Tile -->
<div class="tile tile_2">
<div class="tile_header">
<div class="tile_icon_wrapper" style="background-image: url('https://getblocklab.com/wp-content/uploads/2019/02/block_lab_admin_icon_support.svg');"></div>
</div>
<div class="tile_body">
<h4 class="align_center"><?php esc_html_e( 'Pro Support', 'block-lab' ); ?></h4>
<p class="align_center"><?php esc_html_e( 'Priority support and regular feature updates. We’re right here for you whenever you have a question.', 'block-lab' ); ?></p>
</div>
</div>
<!-- Dashboard Tile -->
<div class="tile tile_3">
<div class="tile_body">
<div class="tile_body">
<h4><?php esc_html_e( '★★ Loving Block Lab? ★★', 'block-lab' ); ?></h4>
<p><?php esc_html_e( 'If Block Lab has helped you build amazing custom blocks for your site, leave us a review on WordPress.org.', 'block-lab' ); ?></p>
<a class="button" target="_blank" href="https://wordpress.org/plugins/block-lab/#reviews"><?php esc_html_e( '★ Leave Review ★', 'block-lab' ); ?></a>
</div>
</div>
<!-- Dashboard Tile -->
<div class="tile tile_3">
<div class="tile_body">
<div class="tile_body">
<h4><?php esc_html_e( 'Get more out of Block Lab', 'block-lab' ); ?></h4>
<p><?php esc_html_e( 'Subscribe to our newsletter for news, updates, and tutorials on working with Gutenberg.', 'block-lab' ); ?></p>
</div>
Expand Down
6 changes: 0 additions & 6 deletions tests/php/unit/admin/test-class-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,6 @@ public function test_init() {
$this->assertArrayHasKey( $settings_class, $components_value );
$this->assertArrayHasKey( $license_class, $components_value );

// Because the Pro license isn't active, there should be an Upgrade class instantiated.
$upgrade_class = 'Block_Lab\Admin\Upgrade';
$this->assertEquals( $upgrade_class, get_class( $this->instance->upgrade ) );
$this->assertArrayHasKey( $upgrade_class, $components_value );
$this->assertFalse( $this->did_settings_redirect_occur() );

// With an active Pro license, this should redirect from the Pro page to the settings page.
$this->set_license_validity( true );
Monkey\Functions\expect( 'filter_input' )
Expand Down

0 comments on commit db1e1d1

Please sign in to comment.