Skip to content

Commit

Permalink
Merge pull request #70 from bootscore/v5.7.0
Browse files Browse the repository at this point in the history
v5.7.0
  • Loading branch information
crftwrk authored Jan 16, 2024
2 parents abe6d10 + 3acf7ae commit 822db60
Show file tree
Hide file tree
Showing 10 changed files with 43 additions and 24 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 - 2023 The bootScore Contributors
Copyright (c) 2021 - 2024 The Bootscore Contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
25 changes: 17 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# bS Swiper
# bs Swiper

[![Packagist Prerelease](https://img.shields.io/packagist/vpre/bootscore/bs-swiper?logo=packagist&logoColor=fff)](https://packagist.org/packages/bootscore/bs-swiper)
[![Github All Releases](https://img.shields.io/github/downloads/bootscore/bs-swiper/total.svg)](https://github.com/bootscore/bs-swiper/releases)


WordPress plugin to show posts, pages, custom post types or WooCommerce products in a [swiper.js](https://swiperjs.com) carousel in Bootscore theme.

Expand All @@ -9,7 +11,7 @@ WordPress plugin to show posts, pages, custom post types or WooCommerce products
<img src="https://lh3.googleusercontent.com/pw/AM-JKLWiXYRnKEw159nO7pwFb4ntUSLVFvmlb8jvSaz__ucMtM26cCHhEXAwHSc58oh1FKGg99sY6sxyw1ycm5fuGUimM-lYZ2Z2yrh-imU4EE_vQhu8pwFaP4fK8yeXQdSyZowyGgwSNBR83WvRajr4M8e-Kw=w1200-h941-no" alt="bs-swiper">

## Installation
1. Download latest release [bs-swiper-main.zip](https://github.com/bootscore/bs-swiper/releases/latest/download/bs-swiper-main.zip).
1. Download latest release [bs-swiper.zip](https://github.com/bootscore/bs-swiper/releases/latest/download/bs-swiper.zip).
2. In your admin panel, go to Plugins > and click the Add New button.
3. Click Upload Plugin and Choose File, then select the Plugin's .zip file. Click Install Now.
4. Click Activate to use your new Plugin right away.
Expand Down Expand Up @@ -142,9 +144,16 @@ Bootscore v5.3.1 added a hook to all `single-*.php`'s:
<?php if (function_exists('bootscore_related_posts')) bootscore_related_posts(); ?>
```

bS Swiper hooks related posts there showing the latest 12 posts from the same category. This means that the category should have at least 4 posts to show the related posts correctly.
bs Swiper hooks related posts there showing the latest 12 posts from the same category. This means that the category should have at least 4 posts to show the related posts correctly.

Related posts can be removed by adding a filter to child's `functions.php`:

```php
// Remove related posts
add_filter('bootscore_disable_related_posts', '__return_true');
```

Related posts can simply be hidden by removing the hook in your child's `single-*.php` or by using a single line of CSS:
Or by a single line of CSS:

```css
.related-posts {
Expand All @@ -153,11 +162,11 @@ Related posts can simply be hidden by removing the hook in your child's `single-
```

## Overriding templates via theme
Template files can be found within the **/bs-swiper-main/templates/** plugin directory.
Template files can be found within the `/bs-swiper/templates/` plugin directory.

Edit files in an upgrade-safe way using overrides. Copy the template into a directory within your theme named **/bs-swiper-main/** keeping the same file structure but removing the **/templates/** subdirectory. Path must be **/your-theme/bs-swiper-main/[file].php**.
Edit files in an upgrade-safe way using overrides. Copy the template into a directory within your theme named `/bs-swiper/` keeping the same file structure but removing the `/templates/` subdirectory. Path must be `/your-theme/bs-swiper/[file].php`.

The copied file will now override the bS Swiper template file. Change cards, classes or HTML as you want.
The copied file will now override the bs Swiper template file. Change cards, classes or HTML as you want.

### Templates that can be overridden
- `related-posts.php`
Expand All @@ -168,6 +177,6 @@ The copied file will now override the bS Swiper template file. Change cards, cla
- `sc-swiper-hero-fade.php`

## License & Credits
- bS Swiper, MIT License https://github.com/bootscore/bs-swiper/blob/main/LICENSE
- bs Swiper, MIT License https://github.com/bootscore/bs-swiper/blob/main/LICENSE
- swiper.js, nolimits4web, MIT License https://github.com/nolimits4web/swiper/blob/master/LICENSE
- Plugin Update Checker, YahnisElsts, MIT License https://github.com/YahnisElsts/plugin-update-checker/blob/master/license.txt
8 changes: 4 additions & 4 deletions main.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?php
/*Plugin Name: bS Swiper
/*Plugin Name: bs Swiper
Plugin URI: https://bootscore.me/plugins/bs-swiper/
Description: Plugin to show posts, pages, custom post types or WooCommerce products in a swiper.js carousel in Bootscore theme. <a href="https://bootscore.me/documentation/bs-swiper/">Documentation</a> | <a href="https://bootscore.me/documentation/bs-swiper/#Changelog">Changelog</a>
Version: 5.6.0
Tested up to: 6.4.1
Version: 5.7.0
Tested up to: 6.4.2
Requires at least: 5.0
Requires PHP: 7.4
Author: bootScore
Author: Bootscore
Author URI: https://bootscore.me
License: MIT License
*/
Expand Down
14 changes: 12 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

Contributors: Bastian Kreiter, torricelli, Sean Emerson, Dog Byte Marketing

Stable tag: 5.6.0
Tested up to: 6.4.1
Stable tag: 5.7.0
Tested up to: 6.4.2
Requires at least: 5.0
Requires PHP: 7.4
License: MIT License
Expand Down Expand Up @@ -126,6 +126,16 @@ Plugin to show posts, pages, custom post types or WooCommerce products in a swip

== Changelog ==

= 5.7.0 - January 16 2024 =

* [FEATURE] Rewrite locate template script to skip -main suffix in child folder #67 (@crftwrk)
* [FEATURE] Add filter to remove related posts #69 (@crftwrk)
* [IMPROVEMENT] Replace text-muted with text-body-secondary ca224bc (@crftwrk)
* [IMPROVEMENT] -main branch suffix from plugin's folder. This does not affect existing bs-swiper-main installations.
* [IMPROVEMENT] Classes in hero templates 56ea649 (@crftwrk)
* [BUGFIX] Remove related posts if no other posts in the same category are available #68 (@crftwrk)
* [Update] Update checker 5.3 4e30570 (@crftwrk)

= 5.6.0 - November 28 2023 =

* [FEATURE] Added brand and onsale attribute #60 (@DogByteMarketing)
Expand Down
2 changes: 1 addition & 1 deletion templates/related-posts.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/*
*
* Adds related posts to single_*.php. Needs at least Bootscore 5.3.1
* Adds related posts to single-*.php. Needs at least Bootscore 5.3.1
*
* This template can be overridden by copying this file to your-theme/bs-swiper/related-posts.php
*
Expand Down
2 changes: 1 addition & 1 deletion templates/sc-swiper-card-autoplay.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* Post/Page/CPT Card Autoplay slider template.
*
* This template can be overriden by copying this file to your-theme/bs-swiper-main/sc-swiper-card.php
* This template can be overriden by copying this file to your-theme/bs-swiper/sc-swiper-card.php
*
* @author Bootscore
* @package bs Swiper
Expand Down
8 changes: 4 additions & 4 deletions templates/sc-swiper-card-product.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
*
* Product slider template.
*
* This template can be overriden by copying this file to your-theme/bs-swiper-main/sc-swiper-card-product.php
* This template can be overriden by copying this file to your-theme/bs-swiper/sc-swiper-card-product.php
*
* @author bootScore
* @package bS Swiper
* @version 5.6.0
* @author Bootscore
* @package bs Swiper
* @version 5.7.0
*
* Product Slider Shortcode
* [bs-swiper-card-product]
Expand Down
2 changes: 1 addition & 1 deletion templates/sc-swiper-card.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* Post/Page/CPT Card slider template.
*
* This template can be overriden by copying this file to your-theme/bs-swiper-main/sc-swiper-card.php
* This template can be overriden by copying this file to your-theme/bs-swiper/sc-swiper-card.php
*
* @author Bootscore
* @package bs Swiper
Expand Down
2 changes: 1 addition & 1 deletion templates/sc-swiper-hero-fade.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* Post/Page/CPT Hero fade slider template.
*
* This template can be overriden by copying this file to your-theme/bs-swiper-main/sc-swiper-hero.php
* This template can be overriden by copying this file to your-theme/bs-swiper/sc-swiper-hero.php
*
* @author Bootscore
* @package bs Swiper
Expand Down
2 changes: 1 addition & 1 deletion templates/sc-swiper-hero.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* Post/Page/CPT Hero slider template.
*
* This template can be overriden by copying this file to your-theme/bs-swiper-main/sc-swiper-hero.php
* This template can be overriden by copying this file to your-theme/bs-swiper/sc-swiper-hero.php
*
* @author Bootscore
* @package bs Swiper
Expand Down

0 comments on commit 822db60

Please sign in to comment.