Git Product home page Git Product logo

Comments (12)

darrenjacoby avatar darrenjacoby commented on July 25, 2024 1

Thanks, will take a look at this.

from intervention.

darrenjacoby avatar darrenjacoby commented on July 25, 2024

@renatonascalves

I can confirm it's working on my end, could you provide more information? You could try run this function within your functions.php to debug and see if it works?

add_filter('show_admin_bar', '__return_false');

The module for this function is very basicβ€”
https://github.com/soberwp/intervention/blob/master/src/Module/RemoveToolbarFrontend.php

from intervention.

renatonascalves avatar renatonascalves commented on July 25, 2024

@darrenjacoby Hi!

If you add the mentioned one above, it works. If I remove the above and add in intervention one, it doesn't work as expected. :/

from intervention.

darrenjacoby avatar darrenjacoby commented on July 25, 2024

@renatonascalves could you try with the intervention function and specify an user role?

eg.
intervention('remove-toolbar-frontend', 'administrator');

(depending on the user role, or is it perhaps a custom user role you're using?)

from intervention.

renatonascalves avatar renatonascalves commented on July 25, 2024

Sorry! Forgot to come back and provide my feedback. That error still exists.

It seems user settings takes precedence. The same doesn't happen if one uses the function without checking the user role though.

from intervention.

darrenjacoby avatar darrenjacoby commented on July 25, 2024

@renatonascalves

I'm still unable to replicate. Could you provide more information? Perhaps a GitHub link to the project?

Are you perhaps using a custom user role? Do other modules work as expected that require user roles?

from intervention.

renatonascalves avatar renatonascalves commented on July 25, 2024

Strange! Really strange! I tried these:

intervention( 'remove-toolbar-frontend');
intervention( 'remove-toolbar-frontend', 'editor' );
intervention( 'remove-toolbar-frontend', 'administrator' );

None of them work. Only when I add like that: add_filter( 'show_admin_bar', '__return_false' );

from intervention.

darrenjacoby avatar darrenjacoby commented on July 25, 2024

That is strange. If you could provide a link to the project I could try debug from there. Just to ask, are the other modules working (that have user role options) ?

from intervention.

darrenjacoby avatar darrenjacoby commented on July 25, 2024

@renatonascalves

Just checking in here? I would like to resolve so that I may close the issue.

from intervention.

9585999 avatar 9585999 commented on July 25, 2024

Works for me.

Option in the admin panel is enabled, the toolbar is not displayed in the frontend.

from intervention.

darrenjacoby avatar darrenjacoby commented on July 25, 2024

Same, I haven't been able to replicate no matter what I've tried.

from intervention.

renatonascalves avatar renatonascalves commented on July 25, 2024

@darrenjacoby I decided to keep using add_filter( 'show_admin_bar', '__return_false' ); I can't make it work with the intervention one. :)

from intervention.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.