Viewing 5 replies - 1 through 5 (of 5 total)
  • This is not currently possible. To help me assess how/if I could add this capability, what is your rationale for needing to hide the link? Is it that you don’t want them to be able to alter it (that is, change the displayed feed to a different one), or do you not want them to be able to find out what it is (that is, be able to access the feed from an external application)?

    I would assume it is the former — being able to change what feed is being displayed on the page — because simply having access to the feed’s URL is not any kind of security risk; the plugin can only access feeds that are public anyway, and just having access to the feed doesn’t give you the ability to change any of the events on the calendar itself.

    Thread Starter defaliz

    (@defaliz)

    thanks for quick reply
    it’s just to have the lightest menu for my user…

    my editors have only post and media in there menu, for that i ‘ve modify functions.php like in this post :
    https://www.creazo.fr/masquer-elements-du-menu-dadministration/

    i wander if it’s possible with your ICS plugin
    regards

    Ah, I misunderstood! I thought you were referring to hiding the shortcodes in your content, not the admin menu item.

    Yes, you should be able to add a bit of code in your functions.php file to hide this for non-administrators. Try this:

    add_action('admin_menu', function() {
        if (!current_user_can('manage_options')) {
            remove_menu_page('ics-calendar');
        }
    }, 11);

    You may not actually need the , 11 in there. Try it without it first and if it doesn’t work, add it in. (That’s the priority value, which controls the order actions are run.)

    Thread Starter defaliz

    (@defaliz)

    great works fine !
    thank a lot for this tip, i’ve try with ics-calendar.php, extension was too much…

    so you save my life

    regards

    Great!

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘hide ics menu for non admin’ is closed to new replies.