Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #41387, comment 4


Ignore:
Timestamp:
12/04/2017 09:24:26 PM (6 years ago)
Author:
adamsilverstein
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #41387, comment 4

    initial v1  
    1 @bobbingwide Your use case seems out of scope for using the postbox.js script. Eg, it wasn't designed for this. Instead of changing corfe to fit your use, I'd suggest you overwrite the postbox script functionality after it loads to get it to more closely match what you want it to do.
     1@bobbingwide Your use case seems out of scope for using the postbox.js script. Eg, it wasn't designed for this. Instead of changing core to fit your use, I'd suggest you overwrite the postbox script functionality after it loads to get it to more closely match what you want it to do.
    22
    33Since postboxes is exposed as a global, you can overwrite the save functionality. Something like this should work, make sure it runs immediately after postbox.js loads, and ideally prevent interaction with the toggles until your code runs: