coresocial_profile

Developer Knowledge Level

This content is intended for WordPress developers, and it may require coding knowledge of WordPress, PHP, and JavaScript. Code examples provided here may contain errors or needs some additional coding. Make sure to test the code before using it on a live website!

PHP
Definition
apply_filters( "coresocial_profile", $profile, $id, $service );
Arguments
Name
Type
Description
$profile
array|false
Raw profile, or false when missing. Return false to hide it.
$id
int|string
Requested profile ID.
$service
Dev4Press\Plugin\coreSocial\Basic\Profiles
Profiles service.
Returns
array|false — raw profile or false.

Runs after the list filter and before count defaults, brand lookup, and mailto/tel/skype prefixes. Supply unprefixed email, phone, and Skype values. Unsupported networks are rejected. Each lookup resolves fresh data without changing stored settings; selection-control labels come from coresocial_profiles.

Example

add_filter( 'coresocial_profile', function ( $profile, $id ) {
    if ( is_array( $profile ) && $id === 12 ) {
        $profile['count'] = 1250;
    }
    return $profile;
}, 10, 2 );
Rate this reference
0
0
2

You are not allowed to rate this post.

Leave a Comment

0
0
0
0
0
0
0
0
0