开发者 | dshanske |
---|---|
更新时间 | 2024年10月12日 00:53 |
WordPress版本: | 6.6 |
版权: | GPLv2 or later |
You will have to add the following code to your theme add_filter( 'syndication_links_display', '__return_false' );
and then you can call get_syndication_links() directly in your theme. You should add
this to the init hook.
get_comment_syndication_links( $comment, $args ) - Returns the HTML for a comment. ** $args ***
style- Defaults to ul ***
text- Display text, defaults to settings option ***
icons- Display icons, defaults to settings option ***
container-css- Class to wrap entire syndication links in ***
single-css- Class to wrap a single link in ***
text-css` - Class to wrap the text before the links inIf you add ?original-of=
and the URL-encoded URL it will return the post that has that URL stored. As no two posts should have the same two syndication links it will by default only return the first.
If you want to do this with a form, there is a function you can add to your theme called get_original_of_form()
and a widget that calls this. Like the search form if you have a
originalofform.php in your theme folder the function will return it so you can customize the form.
syn_rewrite_secure( $domains )
- $domains is an array of domain names to rewrite to https if foundsyn_metabox_types( $screens )
- $screens would be an array of post types to add the Syndication Link metabox to.syn_network_strings( $strings )
- $strings is an array of descriptive text strings by domain namesyn_add_links( $urls, $post_ID )
- (Deprecated) $urls is an array of retrieved links from $post_IDget_post_syndication_links( $urls, $post_ID)
- Replaces syn_add_links.get_comment_syndication_links( $urls, $comment_ID
- Filters an array of retrieved comment syndication links.syn_links_display_defaults( $defaults )
- Filter the defaults for displaying Syndication Linkssyndication_link_checked( $checked, $uid, $post_ID )
- Will check a syndication provider($uid) when loaded. The post ID is passed through to allow more specific targeting.syndication_link_disabled( $disabled, $uid, $post_ID )
- Will disable the checkbox for a syndication provider($uid) when loaded. The post ID is passed through to allow more specific targeting.syn_link_title( $title, $name )
- Allows you to set the title string for Links. Example, pinboard => Pinboard.syn_link_mapping( $icon, $url )
- Allows you to override or set the mapping from URL to icon name.pre_syn_link_icon( $icon, $name )
- Allows you to provide a custom icon. Icons by default are SVG, not URL or filenames.syndication_links_display( true )
- Adds Syndication Links to content display. Set to false if the theme supports this.pre_syndication_links_webmention
hook to allow you to clear cache before sending webmention.syn_link_name
filter that allows you to set the name string.pre_syn_link_icon
filter to allow short circuiting the domain mapping and providing an SVG of your choice.get_original_of_form()
which creates a search for for the original of query which looks up posts by their syndication linkget_syndication_links function
into smaller pieces ( props @Ruxton )get_syndication_links_elements
which returns array of anchor tagsget_syndication_links_display_defaults
to return default optionsget_syndication_links_text_before
to return textbefore on it's ownget_syndication_links
to allow for customized presentation?original-of=url
with url being the syndication URL will return the original entry.