File tree Expand file tree Collapse file tree 1 file changed +21
-15
lines changed Expand file tree Collapse file tree 1 file changed +21
-15
lines changed Original file line number Diff line number Diff line change @@ -700,21 +700,27 @@ function main_menu_url() {
700700 }
701701
702702 $ 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 ' ];
703+ $ parent_slug = isset ( $ menu ['parent_slug ' ] ) ?
704+ $ menu ['parent_slug ' ] :
705+ 'admin.php ' ;
706+
707+ if ( fs_apply_filter ( $ this ->_module_unique_affix , 'enable_cpt_advanced_menu_logic ' , false ) ) {
708+ $ parent_slug = 'admin.php ' ;
709+
710+ /**
711+ * This line and the `if` block below it are based on the `menu_page_url()` function of WordPress.
712+ *
713+ * @author Leo Fajardo (@leorw)
714+ * @since 2.10.2
715+ */
716+ global $ _parent_pages ;
717+
718+ if ( ! empty ( $ _parent_pages [ $ menu_slug ] ) ) {
719+ $ _parent_slug = $ _parent_pages [ $ menu_slug ];
720+ $ parent_slug = isset ( $ _parent_pages [ $ _parent_slug ] ) ?
721+ $ parent_slug :
722+ $ menu ['parent_slug ' ];
723+ }
718724 }
719725
720726 return admin_url (
You can’t perform that action at this time.
0 commit comments