Skip to content

Commit

Permalink
correct error line 1022
Browse files Browse the repository at this point in the history
  • Loading branch information
Hube2 committed Dec 24, 2018
1 parent 8341433 commit afd856b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
7 changes: 4 additions & 3 deletions options-pages.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
Description: Allows easy creation of options pages using Advanced Custom Fields Pro without needing to do any PHP coding. Requires that ACF Pro is installed.
Author: John A. Huebner II
Author URI: https://github.com/Hube2
Version: 3.9.0
Version: 3.9.1
*/

// If this file is called directly, abort.
Expand All @@ -16,7 +16,7 @@

class acfOptionsPageAdder {

private $version = '3.9.0';
private $version = '3.9.1';
private $post_type = 'acf-options-page';
private $parent_menus = array();
private $exclude_locations = array('',
Expand Down Expand Up @@ -1016,7 +1016,8 @@ public function build_admin_menu_list() {
$parent_menus[$item[2]] = 'Comments';
} elseif ($item[2] == 'plugins.php') {
$parent_menus[$item[2]] = 'Plugins';
} elseif (isset($item[5]) && preg_match('/^toplevel_page_/i', $item[5])) {
} elseif (isset($item[5]) && preg_match('/^toplevel_page_/i', $item[5]) &&
count($options_pages)) {
// search options pages to get correct slug
$found = false;
foreach ($options_pages as $slug => $options_page) {
Expand Down
5 changes: 4 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Contributors: Hube2
Tags: Options Page, ACF
Requires at least: 3.5
Tested up to: 5.0
Stable tag: 3.9.0
Stable tag: 3.9.1
Donate link:
License:
License URI:
Expand Down Expand Up @@ -166,6 +166,9 @@ add_filter('remove_hube2_nag', '__return_true');

== Changelog ==

= 3.9.1 =
* corrected bug/error when installed and not acf options pages active

= 3.9.0 =
* adjusted post type to ensure disabling glutenberg
* removed donation nag
Expand Down

0 comments on commit afd856b

Please sign in to comment.