Home » Topics » Priority Support » Plugin conflict "Customizer Remove All Parts"

Plugin conflict "Customizer Remove All Parts"

ACF Widgets Support Priority Support Plugin conflict "Customizer Remove All Parts"

This topic contains 1 reply, has 2 voices, and was last updated by  Daron Spence 9 months, 2 weeks ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #104849

    Thomas Meyer
    Participant

    If the plugin Customizer Remove All Parts is activated the “Menu” item in the Design menu disappears.

    Deactivating ACF Widgets and the “Menu” item is back.

    I thinks this has something to do with the acfw_edit_admin_menu function in admin-setup.php.

    I changed the code to

    function acfw_edit_admin_menu(){
    if ( !current_user_can(‘manage_options’) )
    return;

    global $submenu;

    if ( empty( $submenu[‘themes.php’][7] ) ){
    return; // return if the default menu structure has been modified
    }

    $widgets_postion[6] = $submenu[‘themes.php’][10]; // preserve key for widgets.php
    $widgets_postion[7] = $submenu[‘themes.php’][7]; // preserve key for widgets.php
    $widgets_postion[] = array_pop($submenu[‘themes.php’]);
    // Splice and preserve keys
    acfw_array_splice_assoc($submenu[‘themes.php’], 2, 1, $widgets_postion);
    ksort($submenu[‘themes.php’]);
    }

    and I get the “Menu” item back if both plugins activated.

    Don’t know if this is the best solution – but it works for me.

    Thanks
    Thomas

    • This topic was modified 10 months, 3 weeks ago by  Thomas Meyer.
    • This topic was modified 10 months, 3 weeks ago by  Thomas Meyer.
    • This topic was modified 10 months, 3 weeks ago by  Thomas Meyer.
    #104948

    Daron Spence
    Keymaster

    Hey Thomas,

    I apologize for missing your request here.

    What I think is happening, is that the plugin you mentioned above is removing the link to the customizer by unsetting that key within the array of links. Since ACF Widgets inserts itself directly under the ‘Widgets’ link in that menu, it pushes everything down, and when the customizer link is trying to be removed, it actually removes the menu link instead.

    I’m in the process of revamping the plugin for 2018, so I’m putting this on my list to hopefully gracefully fallback to something workable. If by chance, this doesn’t make it into the update, you’ll have to re-do this modification when I push the next update.

    Cheers

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.