跳到内容

Credits Shortcode & Block

v1.6.1

jashjacob · 2014年10月2日 上架

Add clean Source and Via attribution links with a Gutenberg block, shortcode, or Classic Editor button.

正在使用
10+
评分
暂无
累计下载
2,251
最近更新
2026年10月27日
需要 WordPress 6.3+已测试到 7.1.5PHP 7.4+

贡献者

截图

A Source or Via attribution rendered on the front end.
A Source or Via attribution rendered on the front end.
Credits Link settings in the Gutenberg block sidebar.
Credits Link settings in the Gutenberg block sidebar.

Give readers a clear path back to the original source. Credits Shortcode & Block adds compact, theme-friendly Source or Via attribution links to WordPress posts and pages.

Highlights

  • Native Gutenberg block with a live editor preview.
  • Simple [credits] shortcode for any post, page, or widget area.
  • Site-wide defaults under Settings > Credits.
  • Optional colors for the badge, link background, and link text.
  • Compact, standard, or spacious gaps between consecutive credits.
  • Classic Editor toolbar button for legacy workflows.
  • Responsive, theme-friendly output with subtle hover feedback.
  • Translation-ready and compatible with WordPress multisite.
  • No external service, account, tracking, or front-end JavaScript.

Gutenberg Block

  1. Open a post or page in the Block Editor.
  2. Add the Credits Link block by clicking + or typing /credits.
  3. Choose Source or Via, enter the attribution name, and add its URL.
  4. Optionally choose accent colors in the block sidebar.

The block is rendered dynamically, so saved content stays clean and current.

Shortcode

Basic source attribution:

[credits link="https://example.com"]Source Name[/credits]

Via attribution:

[credits link="https://example.com" type="via"]Publication Name[/credits]

Using a name attribute:

[credits name="Source Name" link="https://example.com"]

Custom colors:

[credits link="https://example.com" type="source" badge_color="#0073aa" link_color="#f0f0f0" link_text_color="#0073aa"]Source Name[/credits]

Supported attributes:

  • name – attribution text; inner shortcode content takes precedence.
  • link – destination URL.
  • type – source or via.
  • badge_color – badge background as a 3- or 6-digit hex color.
  • link_color – link area background as a 3- or 6-digit hex color.
  • link_text_color – link text as a 3- or 6-digit hex color.
  • spacing – compact, standard, or spacious; defaults to the site-wide setting.

To keep several credits close together:

[credits link="https://example.com" spacing="compact"]Source Name[/credits]

Site-wide Defaults

Go to Settings > Credits to choose the default credit type, spacing, and optional accent colors. Individual blocks and shortcodes can override those defaults.

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums