• Previous message: [greg-dev] Theme Browser
  • Next message: [greg-dev] ReadOnly Plugin Hook Params
  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

    [greg-dev] ReadOnly Plugin Hook Params

    Hey,
    
      I was just having a discussion about the parameters passed into a plugin
    hook and how the next plugin using that hook gets it's value.
    
      In certain cases, I would think that a plugin should not be able to
    change the value it is given, even if it does have to return it.
    
      An example of this is, *item.beforetitle . If a plugin changed the id
    passed into that, all plugins afterwords would start acting weird or not
    work at all.
    
      What was proposed is some way of making certain plugin hook parameters
    ReadOnly (the hook code replaces the return value of the hooked function
    with the original value).  It prevents the above situation and ensures
    that all plugins get the proper data.
    
      This naturally would have no effect on the hooks where changing the data
    is necessary, only the ones that need to return the data they are given
    for the plugin flow to work.
    
      Does anyone see a potential problem with this?
    
    Later,
      Chris
    -- 
    Website: http://darthsebulba.is-a-geek.org/
    Public Key:
    http://darthsebulba.is-a-geek.org/Key/Darth_Sebulba05-at-phreaker-net_pub.key
    
    
    Posted by Chris J. Friesen [reply] at Thu Jan 5 17:04:31 CET 2006