PATH:
home
/
letacommog
/
les-compagnons-exterieur
/
wp-content
/
plugins
/
wordpress-seo
/
src
/
helpers
<?php namespace Yoast\WP\SEO\Helpers; /** * A helper object for the user. */ class User_Helper { /** * Retrieves user meta field for a user. * * @param int $user_id User ID. * @param string $key Optional. The meta key to retrieve. By default, returns data for all keys. * @param bool $single Whether to return a single value. * * @codeCoverageIgnore It only wraps a WordPress function. * * @return mixed Will be an array if $single is false. Will be value of meta data field if $single is true. */ public function get_meta( $user_id, $key = '', $single = false ) { return \get_user_meta( $user_id, $key, $single ); } /** * Counts the number of posts the user has written in this post type. * * @param int $user_id User ID. * @param array|string $post_type Optional. Single post type or array of post types to count the number of posts * for. Default 'post'. * * @codeCoverageIgnore It only wraps a WordPress function. * * @return int The number of posts the user has written in this post type. */ public function count_posts( $user_id, $post_type = 'post' ) { return (int) \count_user_posts( $user_id, $post_type, true ); } /** * Retrieves the requested data of the author. * * @param string $field The user field to retrieve. * @param int|false $user_id User ID. * * @codeCoverageIgnore It only wraps a WordPress function. * * @return string The author's field from the current author's DB object. */ public function get_the_author_meta( $field, $user_id ) { return \get_the_author_meta( $field, $user_id ); } }
[+]
..
[+]
twitter
[-] permalink-helper.php
[edit]
[-] string-helper.php
[edit]
[-] user-helper.php
[edit]
[-] woocommerce-helper.php
[edit]
[-] pagination-helper.php
[edit]
[-] input-helper.php
[edit]
[-] url-helper.php
[edit]
[-] language-helper.php
[edit]
[-] date-helper.php
[edit]
[-] meta-helper.php
[edit]
[-] capability-helper.php
[edit]
[-] current-page-helper.php
[edit]
[-] redirect-helper.php
[edit]
[-] post-type-helper.php
[edit]
[+]
open-graph
[-] options-helper.php
[edit]
[-] home-url-helper.php
[edit]
[-] taxonomy-helper.php
[edit]
[-] notification-helper.php
[edit]
[-] indexing-helper.php
[edit]
[-] image-helper.php
[edit]
[-] product-helper.php
[edit]
[-] primary-term-helper.php
[edit]
[+]
schema
[-] environment-helper.php
[edit]
[-] robots-helper.php
[edit]
[-] author-archive-helper.php
[edit]
[-] short-link-helper.php
[edit]
[-] blocks-helper.php
[edit]
[-] indexable-helper.php
[edit]
[-] post-helper.php
[edit]
[-] site-helper.php
[edit]