Garee's Random Image
plugin viewable in the dashboard for non-admin users (3 posts)

  1. aundc
    Posted 4 years ago #

    unfortunately there is the plugin viewable in the dashboard for logged in non-admin users. i think they wouldn´t be able to change anything, but it is not usefull anymore. may there be a possibility to switch this off for non-admin users please? thx!


  2. blalond
    Posted 3 years ago #

    Here's how I fixed this. Pardon the lack of line numbers, but I hope you can follow.

    -function garees_random_image_plugin_menu() {
    -	add_plugins_page("Garee's Random Image", "Garee's Random Image", 'read', 'garees_random_image', 'garees_random_image_show_menu');
    +function garees_random_image_menu() {
    +  add_options_page("Garee's Random Image", "Garee's Random Image", 8, __FILE__, 'garees_random_image_options');
    -function garees_random_image_show_menu() {
    +function garees_random_image_options() {
    -add_action('admin_menu', 'garees_random_image_plugin_menu');
    +add_action('admin_menu', 'garees_random_image_menu');

    Also, I removed a "\n" after line 29 because it was just showing up at the top of every wp admin page:
    define('GAREE_FLATTRSCRIPT', 'http://www.garee.ch/js/flattr/flattr.js');\n

  3. aundc
    Posted 3 years ago #

    thank you!

    & that's a good idea:
    i'd a look for this disturbing \n i knew well ;-(
    it isn't anymore in the plugin version i did use ...

    inbetween i do use this nomore
    but the „Random Image block"

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic