Skip to content

Commit

Permalink
Merge pull request #302 from 10up/develop
Browse files Browse the repository at this point in the history
Release 2.8.1
  • Loading branch information
oscarssanchez authored Dec 13, 2022
2 parents 3ae0620 + e68858c commit 8c89fc2
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 22 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file, per [the Ke

## [Unreleased] - TBD

## [2.8.1] - 2022-12-13

### Fixed
- Fixes fatal error when Brightcove submenu item is null. Props [@phpbits](https://github.com/phpbits) and [@oscarssanchez](https://github.com/oscarssanchez) via [#300](https://github.com/10up/brightcove-video-connect/pull/300)

## [2.8.0] - 2022-10-17

### Deprecated
Expand Down Expand Up @@ -399,6 +404,7 @@ All notable changes to this project will be documented in this file, per [the Ke
- First release

[Unreleased]: https://github.com/10up/brightcove-video-connect/compare/master...develop
[2.8.1]: https://github.com/10up/brightcove-video-connect/compare/2.8.0...2.8.1
[2.8.0]: https://github.com/10up/brightcove-video-connect/compare/2.7.0...2.8.0
[2.7.0]: https://github.com/10up/brightcove-video-connect/compare/2.6.1...2.7.0
[2.6.1]: https://github.com/10up/brightcove-video-connect/compare/2.6.0...2.6.1
Expand Down
4 changes: 2 additions & 2 deletions brightcove-video-connect.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: Brightcove Video Connect
* Plugin URI: https://wordpress.org/plugins/brightcove-video-connect/
* Description: A Brightcove™ Connector for WordPress that leverages enhanced APIs and Brightcove™ Capabilities
* Version: 2.8.0
* Version: 2.8.1
* Author: 10up
* Author URI: http://10up.com
* License: GPLv2+
Expand Down Expand Up @@ -31,7 +31,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 021.0.2301 USA
*/

define( 'BRIGHTCOVE_VERSION', '2.8.0' );
define( 'BRIGHTCOVE_VERSION', '2.8.1' );
define( 'BRIGHTCOVE_URL', plugin_dir_url( __FILE__ ) );
define( 'BRIGHTCOVE_PATH', dirname( __FILE__ ) . '/' );
define( 'BRIGHTCOVE_BASENAME', plugin_basename( __FILE__ ) );
Expand Down
6 changes: 1 addition & 5 deletions includes/admin/class-bc-admin-menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ public function __construct() {
* Generates the Brightcove Menus and non-menu admin pages
*/
public function register_admin_menu() {
global $submenu;

if ( BC_Utility::current_user_can_brightcove() ) {

add_menu_page( esc_html__( 'Brightcove', 'brightcove' ), esc_html__( 'Brightcove', 'brightcove' ), 'edit_posts', 'brightcove', array( $this, 'render_settings_page' ), plugins_url( 'images/sidebar-icon.svg', dirname( __DIR__ ) ), 50 );
Expand All @@ -36,9 +34,7 @@ public function register_admin_menu() {
add_submenu_page( null, esc_html__( 'Add Source', 'brightcove' ), esc_html__( 'Add Source', 'brightcove' ), 'manage_options', 'page-brightcove-edit-source', array( $this, 'render_edit_source_page' ) );
add_submenu_page( null, esc_html__( 'Edit Label', 'brightcove' ), esc_html__( 'Edit Label', 'brightcove' ), 'manage_options', 'page-brightcove-edit-label', array( $this, 'render_edit_label_page' ) );

// Removes the Brightcove Submenu from the menu that WP automatically provides when registering a top level page
array_shift( $submenu['brightcove'] );

remove_submenu_page( 'brightcove', 'brightcove' );
}
}

Expand Down
26 changes: 13 additions & 13 deletions languages/brightcove.pot
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
# This file is distributed under the GPLv2+.
msgid ""
msgstr ""
"Project-Id-Version: Brightcove Video Connect 2.8.0\n"
"Project-Id-Version: Brightcove Video Connect 2.8.1\n"
"Report-Msgid-Bugs-To: "
"https://wordpress.org/support/plugin/brightcove-video-connect\n"
"POT-Creation-Date: 2022-10-07 19:13:07+00:00\n"
"POT-Creation-Date: 2022-12-08 17:32:37+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
Expand Down Expand Up @@ -73,7 +73,7 @@ msgid "Invalid Search Type"
msgstr ""

#: includes/admin/class-bc-admin-labels-page.php:43
#: includes/admin/class-bc-admin-menu.php:37
#: includes/admin/class-bc-admin-menu.php:35
msgid "Edit Label"
msgstr ""

Expand All @@ -82,7 +82,7 @@ msgid "Enter the new label name."
msgstr ""

#: includes/admin/class-bc-admin-labels-page.php:79
#: includes/admin/class-bc-admin-menu.php:33
#: includes/admin/class-bc-admin-menu.php:31
msgid "Brightcove Labels"
msgstr ""

Expand Down Expand Up @@ -143,48 +143,48 @@ msgstr ""
msgid "Edit"
msgstr ""

#: includes/admin/class-bc-admin-menu.php:29
#: includes/admin/class-bc-admin-menu.php:27
#: includes/admin/class-bc-templates.php:481
msgid "Brightcove"
msgstr ""

#: includes/admin/class-bc-admin-menu.php:30
#: includes/admin/class-bc-admin-menu.php:28
#: includes/admin/class-bc-admin-videos-page.php:35
msgid "Brightcove Videos"
msgstr ""

#: includes/admin/class-bc-admin-menu.php:30
#: includes/admin/class-bc-admin-menu.php:28
#: includes/admin/class-bc-templates.php:487
#: includes/admin/class-bc-templates.php:673
#: includes/admin/class-bc-templates.php:1041
msgid "Videos"
msgstr ""

#: includes/admin/class-bc-admin-menu.php:31
#: includes/admin/class-bc-admin-menu.php:29
#: includes/admin/class-bc-admin-playlists-page.php:34
msgid "Brightcove Playlists"
msgstr ""

#: includes/admin/class-bc-admin-menu.php:31
#: includes/admin/class-bc-admin-menu.php:29
#: includes/admin/class-bc-templates.php:488
msgid "Playlists"
msgstr ""

#: includes/admin/class-bc-admin-menu.php:32
#: includes/admin/class-bc-admin-menu.php:30
#: includes/admin/class-bc-admin-settings-page.php:81
msgid "Brightcove Settings"
msgstr ""

#: includes/admin/class-bc-admin-menu.php:32 includes/class-bc-utility.php:533
#: includes/admin/class-bc-admin-menu.php:30 includes/class-bc-utility.php:533
msgid "Settings"
msgstr ""

#: includes/admin/class-bc-admin-menu.php:33
#: includes/admin/class-bc-admin-menu.php:31
#: includes/admin/class-bc-templates.php:247
msgid "Labels"
msgstr ""

#: includes/admin/class-bc-admin-menu.php:36
#: includes/admin/class-bc-admin-menu.php:34
msgid "Add Source"
msgstr ""

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"title": "brightcove-video-connect",
"description": "A Brightcove plugin for WordPress.",
"version": "2.8.0",
"version": "2.8.1",
"homepage": "https://wordpress.org/plugins/brightcove-video-connect/",
"author": {
"name": "10up",
Expand Down
6 changes: 5 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Donate link: https://supporters.eff.org/donate
Tags: brightcove, 10up, videos, video
Requires at least: 4.2
Tested up to: 6.0
Stable tag: 2.8.0
Stable tag: 2.8.1
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -39,6 +39,10 @@ For installation, usage, and Frequently Asked Question please see the [Brightcov

== Changelog ==

= 2.8.1 =

* Fixed fatal error when Brightcove menu is null.

= 2.8.0 =

Deprecated
Expand Down

0 comments on commit 8c89fc2

Please sign in to comment.