Support » Plugin: Better Search Replace » Not appearing on TEST and LIVE environments in Pantheon

  • Carl Alberto

    (@carl-alberto)


    Seems this plugin do not work because it is doing capability check for ‘update_plugins’ so it won’t work on read only environments of Pantheon, is it feasible to use the ‘manage_options’ capabilities instead? If yes, are you welcome for PR of it?

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • saffyre9

    (@saffyre9)

    Having the same problem on Pantheon

    rcwatson

    (@rcwatson)

    I also installed this on Pantheon and it does work on Dev but doesn’t show up in the Tools menu on Test/Live environments. Broken probably due to the non-writable aspect of Test/Live.

    • This reply was modified 1 year ago by  rcwatson.

    Upon digging up the code of this plugin, there is an undocumented filter in place to override the capability check.

    Adding this in the your theme’s function.php can make it work.

    
    function better_search_replace_cap_override() {
        return 'manage_options';
    }
    add_filter( 'bsr_capability', 'better_search_replace_cap_override' );
    
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Not appearing on TEST and LIVE environments in Pantheon’ is closed to new replies.