If I use plugins:
http://wordpress.org/extend/plugins/wp-noexternallinks/
&
http://wordpress.org/extend/plugins/advanced-custom-fields/
<strong>What is the problem that occurs:</strong> On a post the Wp No External Links fails to mask the links if Advanced Custom Fields has been used.. <strong>EVEN if</strong> the link is outside of an acf field.
<strong>Let's be clear:</strong> Wp NO External Links DOES NOT MASK ANY LINKS that are on a page that uses any advanced custom field. REGARDLESS OF WHERE THE LINKS IS.
E.G.
1. There are 5 advanced custom fields. NONE with links.
2. There is links on that page.
3. WP No External Links doesn't mask any links.
4. If there wasn't any advanced custom fields used, the links would mask.
I need them to work in harmony and know they will if there's a way to understand why one plugin makes the other not work.
The answer from one developer of the plugins was:
<blockquote>Its most likely that this external link plugin uses the the_content filter to apply the logic to the standard the_content() data.
Perhaps you you can run the_content filter on the acf value?
Cheers
Elliot</blockquote>
I THINK he is wrong. Because it sounds like he is saying that it doesn't mask links that are in and advanced custom field. When in reality, it doesn't mask any links. EVEN LINKS OUTSIDE the custom fields, on the normal parts of the page.
I don't know what the solution is.. But I'm hoping you guys do.
Getting this both to work together is very important for me.
Please elaborate on his answer but I'm not looking for that as solution if it doesn't work. My reason for asking is to find a fix.
<strong>Please Note: The version of WP is irrelevant here so don't ask questions like that. As it happens on all versions of WP that I've tested it across.</strong>
<strong>Note 2: Obviously I already know that the Advanced Custom Field plugin is what stops the Wp No External Links from working proerly. So disabling it isn't necessary.</strong>
<strong>Note 3: The AIM as stated above is to have both work in harmony. Not to disable one so the other can work.
</strong>
Thanks.
Arnav Joy answers:
which version of wp you are using?
Arnav Joy comments:
why you say
Please Note: The version of WP is irrelevant here so don't ask questions like that.
because the plugin WP No External Links says it works with wp version upto 3.4.2
Arnav Joy comments:
if you think it is caused by advance custom field plugin then try deactivating this plugin , and then check if it works
Dbranes answers:
Hi, maybe this will run the wp-noexternallinks filter on your acf fields:
function my_acf_load_value( $value, $field, $post_id )
{
// run the_content filter on all textarea values
$value = apply_filters('the_content',$value);
return $value;
}
// acf_load_value-{$field_type} - filter for a value load based on it's field type
add_filter('acf_load_value-textarea', 'my_acf_load_value');
where you have to edit the field_type.
Luco Man comments:
This is nice.. But I don't understand what you mean by:
Where I have to change the field type.
&
Where would this code go?
Plus
Do the other values need anything assigned to them?
Thanks.
Luco Man comments:
Also I don't think my question is clear... It d<strong>oesn't work at all</strong> on a post that uses acf fields.
Not just on the acf fields but anywhere on the page..
Dbranes comments:
ok, you might want to check if it works on the default theme.
(the code was for functions.php in your current theme directory)
Dbranes comments:
It seems to work on the default theme (2012) to have "Wp No External Links" with some Advanced Custom Fields set in a post.