Skip to content

Commit

Permalink
Merge pull request #37 from christiespeich/bug-fixes
Browse files Browse the repository at this point in the history
Bug fixes
  • Loading branch information
christiespeich committed Jan 16, 2018
2 parents 9aa876c + 5592469 commit 4f89ae3
Show file tree
Hide file tree
Showing 225 changed files with 11,808 additions and 3,447 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,6 @@ pip-log.txt
.coverage
.tox

#Translations
*.mo

#Mr Developer
.mr.developer.cfg
Expand Down
14 changes: 11 additions & 3 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Donate link: https://www.paypal.me/mooberrydreams/
Tags: book, author, publisher, writer, writing, publishing, library, book store, author website management, book shop, sell books, link to Amazon
Requires at least: 3.8.0
Tested up to: 4.9
Stable tag: 4.1
Stable tag: 4.1.1
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -184,6 +184,10 @@ Check out the [documentation and support page.](http://www.bookmanager.mooberryd
5. Choose from four types of widgets to feature books on your sidebar.

== Changelog ==
= 4.1.1 =
* Fixed: Fatal error: Declaration of CMB2_Type_File::render() must be compatible with CMB2_Type_Text::render($args = Array) on Settings-> Book Page. (caused by error in included library CMB2 when used with PHP 7.2 )
* Added: Brazilian Portuguese translations ( thanks Vinicius Cubas Brand! )

= 4.1 =
* Updated: Improved mobile layout for book pages
* New: Compatible with Duplicate Post so that books can be duplicated into new posts
Expand Down Expand Up @@ -406,7 +410,9 @@ Redesigned, responsive book page and much more!

* Greek

**NOTE:** Mooberry Book Manager is translatable. If you'd like to volunteer a translation for your language, the template file (.pot) is available in the `languages` folder. [Contact us](http://www.mooberrydreams.com/contact/) when your translation is ready or if you need assistance.
* Brazilian Portuguese

**NOTE:** Mooberry Book Manager is translatable. If you'd like to volunteer a translation for your language, the template file (.pot) is available in the `languages` folder. [Contact us](http://www.mooberrydreams.com/contact/) when your translation is ready or if you need assistance. You can also enter your translations on translate.wordpress.org here: https://translate.wordpress.org/projects/wp-plugins/mooberry-book-manager

* Thanks to [Kathrin Hamann](https://profiles.wordpress.org/thrakonia) for providing the German translation!

Expand All @@ -420,4 +426,6 @@ Redesigned, responsive book page and much more!

* Thanks to Fabrizio Guidicini for the Italian translation!

* Thanks to Eleni Linaki for the Greek translation!
* Thanks to Eleni Linaki for the Greek translation!

* Thanks to Vinicius Cubas Brand for the Brazilian Portuguese translation!
12 changes: 7 additions & 5 deletions includes/class-mbm-book-cpt.php
Original file line number Diff line number Diff line change
Expand Up @@ -1312,6 +1312,12 @@ function meta_tags() {
if ( get_post_type() == $this->post_type ) {
global $post;
$this->set_data_object( $post->ID );

$summary = $this->data_object->summary;
if ( strlen($summary) > 150 ) {
$summary = substr( $summary, 0, 150 ) . '...';
}


if ( !MBDB_WPSEO_INSTALLED || MBDB()->options->override_wpseo( 'description' ) ) {
$series_info = '';
Expand All @@ -1330,11 +1336,7 @@ function meta_tags() {
$retailer_info = ' ' . sprintf( __('Available from %s.', 'mooberry-book-manager'), $this->data_object->get_retailer_list() );
}

$summary = $this->data_object->summary;
if ( strlen($summary) > 150 ) {
$summary = substr( $summary, 0, 150 ) . '...';
}


echo '<meta name="description" content="' . esc_attr( apply_filters('mbdb_book_meta_description', $series_info . $genre_info . '.' . $retailer_info, $this->data_object ) ) . ' ' . esc_attr( $summary) . '">';
}

Expand Down
36 changes: 36 additions & 0 deletions includes/cmb2/.github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<!--
Before posting a new issue:
- Please post general support and questions at https://www.wordpress.org/support/plugin/cmb2/. We will move to GitHub once a confirmed bug.
- Please check if your issue is addressed in the CMB2 Wiki Troubleshooting page: https://github.com/CMB2/CMB2/wiki/Troubleshooting
- Please review the contributing guidelines: https://github.com/CMB2/CMB2/blob/trunk/CONTRIBUTING.md.
-->
### Expected Behavior:



### Actual Behavior:



### Steps to reproduce (I have confirmed I can reproduce this issue on the trunk branch):

1.
2.

### CMB2 Field Registration Code:

```php
add_action( 'cmb2_admin_init', 'yourprefix_register_demo_metabox' );
function yourprefix_register_demo_metabox() {

$cmb = new_cmb2_box( array(
// Box Config...
) );

$cmb->add_field( array(
// Field Config...
) );

// Additional fields...
}
```
10 changes: 10 additions & 0 deletions includes/cmb2/.github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Fixes #{issue-number}.

### Changes proposed in this pull request

-

-

-

407 changes: 288 additions & 119 deletions includes/cmb2/CHANGELOG.md

Large diffs are not rendered by default.

11 changes: 6 additions & 5 deletions includes/cmb2/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ _Support is not offered for this library, and the likelihood that the maintainer

Before reporting a bug
---
1. Search [issues](https://github.com/WebDevStudios/CMB2/issues) to see if the issue has been previously reported.
2. Install the trunk version of CMB2 and test there.
1. Please review the [documentation](https://github.com/CMB2/CMB2/wiki). Most questions revolve around the [field types](https://github.com/CMB2/CMB2/wiki/Field-Types), [field parameters](https://github.com/CMB2/CMB2/wiki/Field-Parameters), or are addressed in the [troubleshooting](https://github.com/CMB2/CMB2/wiki/Troubleshooting) section.
2. Search [issues](https://github.com/CMB2/CMB2/issues) to see if the issue has been previously reported.
3. Install the trunk version of CMB2 and test there.


How to report a bug
Expand Down Expand Up @@ -43,9 +44,9 @@ If you are looking to provide language translation files, Please do so via [WP-T
Additional Resources
---

* [CMB2 Documentation Wiki](https://github.com/WebDevStudios/CMB2/wiki)
* [CMB2 Snippet Library](https://github.com/WebDevStudios/CMB2-Snippet-Library)
* [CMB2 Documentation Wiki](https://github.com/CMB2/CMB2/wiki)
* [CMB2 Snippet Library](https://github.com/CMB2/CMB2-Snippet-Library)
* [CMB2 API Documentation](http://cmb2.io/api/)
* [General GitHub Documentation](http://help.github.com/)
* [GitHub Pull Request documentation](http://help.github.com/send-pull-requests/)
* [PHPUnit Tests Guide](http://phpunit.de/manual/current/en/writing-tests-for-phpunit.html)
* [PHPUnit Tests Guide](http://phpunit.de/manual/current/en/writing-tests-for-phpunit.html)
35 changes: 22 additions & 13 deletions includes/cmb2/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@
*
* @category WordPress_Plugin
* @package CMB2
* @author WebDevStudios
* @author CMB2
* @license GPL-2.0+
* @link http://webdevstudios.com
* @link https://cmb2.io
*/

/**
* Function to encapsulate the CMB2 bootstrap process.
*
* @since 2.2.0
* @return void
*/
Expand All @@ -35,6 +36,7 @@ function cmb2_bootstrap() {
/**
* For back-compat. Does the dirty-work of instantiating all the
* CMB2 instances for the cmb2_meta_boxes filter
*
* @since 2.0.2
*/
$cmb_config_arrays = apply_filters( 'cmb2_meta_boxes', array() );
Expand All @@ -50,20 +52,27 @@ function cmb2_bootstrap() {
/**
* Get all created metaboxes, and instantiate CMB2_hookup
* on metaboxes which require it.
*
* @since 2.0.2
*/
foreach ( CMB2_Boxes::get_all() as $cmb ) {

if ( $cmb->prop( 'hookup' ) ) {
$hookup = new CMB2_hookup( $cmb );
$hookup->universal_hooks();
}

if ( $cmb->prop( 'show_in_rest' ) && function_exists( 'rest_get_server' ) ) {
$rest = new CMB2_REST( $cmb );
$rest->universal_hooks();
}

/**
* Initiates the box "hookup" into WordPress.
*
* Unless the 'hookup' box property is `false`, the box will be hooked in as
* a post/user/comment/option/term box.
*
* And if the 'show_in_rest' box property is set, the box will be hooked
* into the CMB2 REST API.
*
* The dynamic portion of the hook name, $cmb->cmb_id, is the box id.
*
* @since 2.2.6
*
* @param array $cmb The CMB2 object to hookup.
*/
do_action( "cmb2_init_hookup_{$cmb->cmb_id}", $cmb );
}

/**
Expand All @@ -72,4 +81,4 @@ function cmb2_bootstrap() {
do_action( 'cmb2_after_init' );
}

// End. That's it, folks! //
/* End. That's it, folks! */
Loading

0 comments on commit 4f89ae3

Please sign in to comment.