coresocial-share-inline

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
[coresocial-share-inline layout="icon" align="center" /]
coreSocial 4.0 — core/basic/Shortcodes.php:59
Attributes
Name
Type
Description
Default
item
string
Tracking context: post, term, or custom. Pair custom URLs with item_id 0.
Current page context
item_id
int
WordPress post or term ID; use 0 for custom URLs.
Current page context
url
string
Page URL used in links and tracking.
Current page URL
title
string
Page title used in sharing text or the AI prompt.
Current page title
image
string
Featured-image URL in the context passed to the renderer.
Current page image
id
string
Wrapper HTML ID. Use a unique ID if provided.
align
string
none, left, center, right, or justify.
Saved display setting
layout
string
left, right, or icon.
Saved display setting
color
string
fill, plain, custom_background, or custom_colors.
Saved display setting
styling
string
normal, rounded, or round.
Saved display setting
classes
string
Additional wrapper CSS classes. The manual inline renderer reads classes, not class.
Saved inline class setting
Output
HTML for an inline share block; empty string if the inline method is unavailable.

Renders enabled social networks and internal share methods using the current page context unless overridden. Omitted display values come from the saved Inline Styling settings.

The current manual renderer does not implement a networks override or per-instance font_size, button_size, button_gap, or share_count_active overrides. It builds from all currently enabled share networks; selecting networks for automatic insertion does not restrict this manual call.

Use classes for additional wrapper classes. The manual renderer does not read the class key shown in some PHPDoc comments. Custom colors and sizing continue to use the configured CSS variables.

These are display/context options, not registration of arbitrary tracking targets. For a custom URL, supply item=”custom” and item_id=”0″; tracked post and term targets must be publicly viewable.

The definition demonstrates attribute syntax. The attribute rows distinguish fixed defaults from values inherited from saved settings.

Example

[[coresocial-share-inline layout="icon" align="center" /]]
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