chrisblakley / Nebula

Nebula is a WordPress theme framework that focuses on enhancing development. The core features of Nebula make it a powerful tool for designing, developing, and analyzing WordPress websites consistently, yet its deliberately uncomplicated code syntax also serves as a learning resource for programmers themselves.
https://nebula.gearside.com
GNU General Public License v2.0
141 stars 36 forks source link

Move where Nebula modified cf7 data to a better hook #2243

Closed chrisblakley closed 1 year ago

chrisblakley commented 1 year ago

Currently Nebula modifies the CF7 data for storage, but other child themes or plugins cannot access this data.

Instead use this hook which is triggered much earlier and modifies the data so any theme/plugin that hooks into the before_send hook (or whatever its called) will be able to access this data too.

add_filter('wpcf7_posted_data', function($data){
    $data['attribution'] = 'this-is-a-test'; //This is working!
    return $data;
}, 2, 1);
chrisblakley commented 1 year ago

Phew this is all set now.