在不进行测试的情况下,这应该可以工作(仍然使用add\\u过滤器位):
function cwwp_custom_gforms_spinner( $src ) {
global $post;
if( $post->ID == $id ): // use whatever page identifier/conditional you like here: ID, template used, slug etc.
// other identifiers would probably be better and won\'t rely on global $post
// for example is_front_page(), is_archive(), etc
return get_stylesheet_directory_uri() . \'path/to/spinner/1.gif\';
else:
return get_stylesheet_directory_uri() . \'path/to/spinner/2.gif\';
endif;
}