Skip to content

Commit

Permalink
Fix buy links (#886)
Browse files Browse the repository at this point in the history
* Replace ibooks with applebooks

* Update CI pipeline
  • Loading branch information
SteelWagstaff authored Nov 1, 2021
1 parent eb4c9d1 commit 84e4669
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/.pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
matrix:
php: [ 7.3 ]
os: [ ubuntu-18.04 ]
wordpress: [5.8, latest]
wordpress: [5.8.1, latest]
experimental: [false]
include:
- php: 7.4
Expand Down Expand Up @@ -90,6 +90,7 @@ jobs:

- name: Run Coverage
run: composer require pcov/clobber; vendor/bin/pcov clobber; vendor/bin/phpunit --configuration phpunit.xml --coverage-clover coverage.xml
if: matrix.experimental == false

- name: Run Frontend Tests
run: |
Expand All @@ -102,6 +103,7 @@ jobs:

- name: Upload Coverage to Codecov
run: bash <(curl -s https://codecov.io/bash)
if: matrix.experimental == false

- name: Prepare Build
if: startsWith(github.ref, 'refs/tags/')
Expand Down
5 changes: 2 additions & 3 deletions page-buy.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,10 @@
<li class="buy-kobo"><a href="<?php print $urls['kobo']; ?>" class="bookstore-logo-link logo"><img src="<?php bloginfo( 'template_directory' ); ?>/dist/images/kobo.png" width="54" height="29" alt="kobo-logo" title="Kobo"/></a><?php printf( __( 'Purchase on <a href="%1$s">kobobooks.com</a>', 'pressbooks-book' ), $urls['kobo'] ); ?></li>
<?php endif; ?>

<?php if ( isset( $urls['ibooks'] ) && $urls['ibooks'] ) : ?>
<?php if ( isset( $urls['applebooks'] ) && $urls['applebooks'] ) : ?>
<?php /* translators: %1$s: url to purchase */ ?>
<li class="buy-ibooks"><a href="<?php print $urls['ibooks']; ?>" class="bookstore-logo-link logo"><img src="<?php bloginfo( 'template_directory' ); ?>/dist/images/ibooks.png" width="34" height="34" alt="ibooks-logo" title="iBook"/></a><?php printf( __( 'Purchase on <a href="%1$s">apple.com</a>', 'pressbooks-book' ), $urls['ibooks'] ); ?></li>
<li class="buy-applebooks"><a href="<?php print $urls['applebooks']; ?>" class="bookstore-logo-link logo"><img src="<?php bloginfo( 'template_directory' ); ?>/dist/images/ibooks.png" width="34" height="34" alt="ibooks-logo" title="iBook"/></a><?php printf( __( 'Purchase on <a href="%1$s">apple.com</a>', 'pressbooks-book' ), $urls['applebooks'] ); ?></li>
<?php endif; ?>

<?php if ( isset( $urls['otherservice'] ) && $urls['otherservice'] ) : ?>
<?php /* translators: %1$s: url to purchase */ ?>
<li class="buy-other"><?php _e( 'Purchase here:', 'pressbooks-book' ); ?> <a href="<?php print $urls['otherservice']; ?>"><?php print $urls['otherservice']; ?></a></li>
Expand Down

0 comments on commit 84e4669

Please sign in to comment.