PATH:
home
/
letacommog
/
rachat-or-bourgenbresse
/
wp-content
/
plugins
/
wordpress-seo
/
src
/
helpers
<?php namespace Yoast\WP\SEO\Helpers; use WPSEO_Meta; use WPSEO_Taxonomy_Meta; /** * A helper object for meta. */ class Meta_Helper { /** * Get a custom post meta value. * * Returns the default value if the meta value has not been set. * * {@internal Unfortunately there isn't a filter available to hook into before returning * the results for get_post_meta(), get_post_custom() and the likes. That * would have been the preferred solution.}} * * @param string $key Internal key of the value to get (without prefix). * @param int $postid Post ID of the post to get the value for. * * @codeCoverageIgnore We have to write test when this method contains own code. * * @return string All 'normal' values returned from get_post_meta() are strings. * Objects and arrays are possible, but not used by this plugin * and therefore discarted (except when the special 'serialized' field def * value is set to true - only used by add-on plugins for now). * Will return the default value if no value was found. * Will return empty string if no default was found (not one of our keys) or * if the post does not exist. */ public function get_value( $key, $postid = 0 ) { return WPSEO_Meta::get_value( $key, $postid ); } /** * Retrieve a taxonomy term's meta value(s). * * @param mixed $term Term to get the meta value for * either (string) term name, (int) term id or (object) term. * @param string $taxonomy Name of the taxonomy to which the term is attached. * @param string $meta Optional. Meta value to get (without prefix). * * @return mixed|bool Value for the $meta if one is given, might be the default. * If no meta is given, an array of all the meta data for the term. * False if the term does not exist or the $meta provided is invalid. */ public function get_term_value( $term, $taxonomy, $meta = null ) { return WPSEO_Taxonomy_Meta::get_term_meta( $term, $taxonomy, $meta ); } }
[+]
..
[-] language-helper.php
[edit]
[-] author-archive-helper.php
[edit]
[-] meta-helper.php
[edit]
[-] redirect-helper.php
[edit]
[+]
schema
[-] current-page-helper.php
[edit]
[-] date-helper.php
[edit]
[-] indexable-helper.php
[edit]
[-] environment-helper.php
[edit]
[-] home-url-helper.php
[edit]
[-] url-helper.php
[edit]
[-] robots-helper.php
[edit]
[+]
open-graph
[-] user-helper.php
[edit]
[-] image-helper.php
[edit]
[-] blocks-helper.php
[edit]
[-] product-helper.php
[edit]
[+]
twitter
[-] short-link-helper.php
[edit]
[-] options-helper.php
[edit]
[-] post-type-helper.php
[edit]
[-] string-helper.php
[edit]
[-] post-helper.php
[edit]
[-] site-helper.php
[edit]
[-] pagination-helper.php
[edit]
[-] notification-helper.php
[edit]
[-] taxonomy-helper.php
[edit]
[-] .htaccess
[edit]
[-] permalink-helper.php
[edit]
[-] capability-helper.php
[edit]
[-] woocommerce-helper.php
[edit]
[+]
helpers
[-] primary-term-helper.php
[edit]