• Resolved generosus

    (@generosus)


    Good Day,

    Here’s a challenge πŸ™‚

    Does anyone know what code snippet we can use to comment out a particular plugin’s php file code line(s) using either // for a single line of code or /* code here */ for several lines of code?

    The code snippet would have to know the plugin’s php file name and line of code(s) affected.

    Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Shea Bunge

    (@bungeshea)

    I imagine this would be possible, but it’d require reading and writing to files, which can be fraught with difficulty.

    Is there a reason why you’re preferring to comment out code instead of using a filter hook or similar to toggle functionality?

    Thread Starter generosus

    (@generosus)

    Hi @bungeshea,

    If the code snippet is too difficult to develop, please ignore our request.

    The reason for the request is because some of the plugins we use are customized to suit our needs. Customization sometimes requires commenting out plugin file code lines. Unfortunately, when the affected plugin is updated, the commented out code lines are reinstated. Makes sense?

    Thank you!

    Thread Starter generosus

    (@generosus)

    Update:

    We’ve decided not to pursue this.

    Thank you.

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

The topic ‘Code Snippet to Comment Out PHP Code Line(s)’ is closed to new replies.