gambitph / Titan-Framework

The easiest to use WordPress option framework.
http://www.titanframework.net
377 stars 137 forks source link

Titan hook for delete_transient #395

Open askaria opened 7 years ago

askaria commented 7 years ago

Hello! I need delete_transient after updating the page in the admin panel, but for some reason the hook does not work.

$titan = TitanFramework::getInstance( 'fairy' );

My function:

function fcook_cat_delete_transients($container, $activeTab, $options) { if ( $activeTab == 'homepage-options' ) { delete_transient( 'some_old_transient' ); } } add_action( 'tf_pre_save_admin_fairy', 'fcook_cat_delete_transients', 10, 3 );​

Gives an error: PHP Parse error: syntax error, unexpected end of file in....