Quantcast
Channel: WordPress.org Forums » [Yoast SEO] Support
Viewing all articles
Browse latest Browse all 41896

Parneix on "[Plugin: WordPress SEO by Yoast] Consider whitelisting editing of custom fields"

$
0
0

*** PLEASE READ: SMALL EDIT:

When you’ll look into the meta.php file the first time, the code will look like this (in the example above, I copy/pasted the code from my meta.php which was already modified):

/**
 * Determine whether a meta key is protected
 *
 * @since 3.1.3
 *
 * @param string $meta_key Meta key
 * @return bool True if the key is protected, false otherwise.
 */
function is_protected_meta( $meta_key, $meta_type = null ) {
	$protected = ( '_' == $meta_key[0] );

	return apply_filters( 'is_protected_meta', $protected, $meta_key, $meta_type );
}

The only line you have to change is this one:
$protected = ( '_' == $meta_key[0] );

Change it for this:
$protected = (( '_' == $meta_key[0] ) && ( strpos($meta_key, "_yoast") !== 0));

That’s it.


Viewing all articles
Browse latest Browse all 41896

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>