Filters the news stock tickers array in Google News Advanced. Passes the stock tickers array and $post_id; must return an array.
apply_filters( 'xmlsf_news_stock_tickers', array[] $stock_tickers, int[] $post_id )
Used in xml-sitemap-feed-advanced-news/inc/class-main.php
Parameters (2)
- $stock_tickers
(array)The news stock tickers array. - $post_id
(int)The current post ID.
Return
(array)The news stock tickers array.
The filter should return an array with stock tickers for the current post.
Usage example
function my_custom_stock_tickers( $stock_tickers, $post_id ) {
$post_stock_tickers = get_post_meta( $post_id, 'stock_ticker' );
return array_merge( (array) $stock_tickers, $post_stock_tickers );
}
add_filter( 'xmlsf_news_stock_tickers', 'my_custom_stock_tickers' );
Related
| Used by | Description |
|---|---|
| none |