File tree Expand file tree Collapse file tree 2 files changed +25
-11
lines changed Expand file tree Collapse file tree 2 files changed +25
-11
lines changed Original file line number Diff line number Diff line change @@ -699,16 +699,30 @@ function main_menu_url() {
699699 $ menu = $ this ->find_main_submenu ();
700700 }
701701
702- $ parent_slug = isset ( $ menu ['parent_slug ' ] ) ?
703- $ menu ['parent_slug ' ] :
704- 'admin.php ' ;
705-
706- return admin_url (
707- $ parent_slug .
708- ( false === strpos ( $ parent_slug , '? ' ) ? '? ' : '& ' ) .
709- 'page= ' .
710- $ menu ['menu ' ][2 ]
711- );
702+ $ menu_slug = $ menu ['menu ' ][2 ];
703+ $ parent_slug = 'admin.php ' ;
704+
705+ /**
706+ * This line and the `if` block below it is based on the `menu_page_url()` function of WordPress.
707+ *
708+ * @author Leo Fajardo (@leorw)
709+ * @since 2.7.4
710+ */
711+ global $ _parent_pages ;
712+
713+ if ( ! empty ( $ _parent_pages [ $ menu_slug ] ) ) {
714+ $ _parent_slug = $ _parent_pages [ $ menu_slug ];
715+ $ parent_slug = isset ( $ _parent_pages [ $ _parent_slug ] ) ?
716+ $ parent_slug :
717+ $ menu ['parent_slug ' ];
718+ }
719+
720+ return admin_url (
721+ $ parent_slug .
722+ ( false === strpos ( $ parent_slug , '? ' ) ? '? ' : '& ' ) .
723+ 'page= ' .
724+ $ menu_slug
725+ );
712726 }
713727
714728 /**
Original file line number Diff line number Diff line change 1515 *
1616 * @var string
1717 */
18- $ this_sdk_version = '2.10.0 ' ;
18+ $ this_sdk_version = '2.10.0.1 ' ;
1919
2020 #region SDK Selection Logic --------------------------------------------------------------------
2121
You can’t perform that action at this time.
0 commit comments