> For the complete documentation index, see [llms.txt](https://knowledgebase.ajaxsearchpro.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://knowledgebase.ajaxsearchpro.com/hooks/filters/index-table-related/asp_post_permalink_before_tokenize.md).

# asp\_post\_permalink\_before\_tokenize

This filter runs just before the attachment file contents are processed and cleared from HTML etc.., before it is passed to the tokenization process.

```
apply_filters('asp_post_permalink_before_tokenize', $permalink, $post);
```

### Parameters

* **$permalink(string)** - the post content
* **$post(WP\_Post)** - post type object

```php
add_filter( 'asp_post_permalink_before_tokenize', 'asp_change_post_field_index', 10, 2 );
function asp_change_post_field_index( $permalink, $post ) {
    return "my/custom/link/";
}
```
