Source file: modules/wordads/class-wordads.php
View in GitHubParameters
- WordAds_API::get_wordads_ads_txt()
-
(string) WordAds_API::get_wordads_ads_txt() The contents of the ads.txt file.
Changelog
Since: Jetpack 6.1.0
Notes
You can use this filter to add your custom texts from other ad programs.
add_filter( 'wordads_ads_txt', 'htdat_wordads_ads_txt'); function htdat_wordads_ads_txt ( $ads_txt_transient ) { $my_text = "#My custom texts"; $my_text .= "\r\n"; // new line $my_text .= "google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0"; // Edit your own text here $my_text .= "\r\n \r\n"; // two new lines return $my_text . $ads_txt_transient; }