Title: Credits Shortcode &amp; Block
Author: jashjacob
Published: <strong>Oktoba 2, 2014</strong>
Last modified: Septemba 17, 2026

---

Tafuta vijalizi

![](https://ps.w.org/source-shortcode/assets/banner-772x250.png?rev=3699445)

![](https://ps.w.org/source-shortcode/assets/icon-256x256.png?rev=3699445)

# Credits Shortcode & Block

 By [jashjacob](https://profiles.wordpress.org/jashjacob/)

[Pakua](https://downloads.wordpress.org/plugin/source-shortcode.1.5.0.zip)

 * [Details](https://sw.wordpress.org/plugins/source-shortcode/#description)
 * [Reviews](https://sw.wordpress.org/plugins/source-shortcode/#reviews)
 *  [Installation](https://sw.wordpress.org/plugins/source-shortcode/#installation)
 * [Development](https://sw.wordpress.org/plugins/source-shortcode/#developers)

 [Saidia](https://wordpress.org/support/plugin/source-shortcode/)

## Maelezo

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.

## Screenshots

[⌊A Source or Via attribution rendered on the front end.⌉⌊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.⌉[

Credits Link settings in the Gutenberg block sidebar.

## Bloku

Kijalizi hiki kinawezesha bloku 1.

 *   Credits Link Insert Source or Via credit link into your post with customizable
   accent colors.

## Installation

 1. In WordPress, go to **Plugins > Add New**.
 2. Search for **Credits Shortcode & Block**.
 3. Click **Install Now**, then **Activate**.
 4. Add a Credits Link block, use the `[credits]` shortcode, or configure defaults 
    under **Settings > Credits**.

For a manual installation, upload the plugin folder to `/wp-content/plugins/` and
activate it from the Plugins screen.

## FAQ

### Can I change how the credit line looks?

Yes. Set colors for an individual block or shortcode, configure site-wide defaults
under Settings > Credits, or use custom CSS. Without custom colors, the plugin uses
neutral styling that inherits the active theme’s link color.

### Can I add more than one credit to a post?

Yes. Add as many blocks or shortcodes as needed. Each credit is rendered independently.

### What happens if I deactivate the plugin?

Your posts are not modified or deleted. Dynamic blocks stop rendering, and shortcode
tags remain in post content until the plugin is reactivated.

### Does the plugin send data to another service?

No. The plugin makes no external requests and includes no analytics or tracking.

### Does it add rel=”nofollow” to links?

No. Credit links open in a new tab with `noopener noreferrer`. The plugin does not
add `nofollow` automatically.

### Does it work with the Classic Editor?

Yes. When the Classic Editor is active, an Add Credits toolbar button inserts the
shortcode for you.

## Reviews

Hakuna hakiki za programu-jalizi hii.

## Wachangiaji & Wasanidi

“Credits Shortcode & Block” is open source software. The following people have contributed
to this plugin.

Contributors

 *   [ jashjacob ](https://profiles.wordpress.org/jashjacob/)

[Translate “Credits Shortcode & Block” into your language.](https://translate.wordpress.org/projects/wp-plugins/source-shortcode)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/source-shortcode/),
check out the [SVN repository](https://plugins.svn.wordpress.org/source-shortcode/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/source-shortcode/)
by [RSS](https://plugins.trac.wordpress.org/log/source-shortcode/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.5.0

 * Added site-wide spacing defaults under Settings > Credits.
 * Added Compact, Standard, and Spacious spacing presets for each block or shortcode.
 * Added spacing inheritance and validation tests.

#### 1.4.1

 * Fixed Gutenberg block registration on WordPress 5.0 through 5.4.
 * Fixed new blocks so they inherit the site-wide default credit type.
 * Added block-editor JavaScript translation loading.
 * Refreshed the WordPress.org banner, icons, and screenshots.
 * Improved directory copy and release metadata.

#### 1.4.0

 * Added internationalization support for PHP and block-editor strings.
 * Registered the block from `block.json` metadata on supported WordPress versions.
 * Added site-wide defaults under Settings > Credits.
 * Added a PHPUnit test suite and PHP 7.4 through 8.4 continuous integration.
 * Switched to neutral, theme-friendly default styling while preserving saved colors.

#### 1.3.1

 * Sanitized shortcode attributes and applied context-aware escaping to rendered
   output.
 * Restricted accent colors to valid hex values.
 * Added a strict HTML allowlist for final shortcode markup.

#### 1.3

 * Added the native Credits Link Gutenberg block.
 * Added per-credit accent color controls.
 * Added hover feedback and block-theme layout compatibility.
 * Hardened shortcode rendering and output escaping.

#### 1.2

 * Initial public release with shortcode and Classic Editor support.

## Meta

 *  Version **1.5.0**
 *  Last updated **2 siku zilizopita**
 *  Active installations **10+**
 *  WordPress version ** 5.0 au juu **
 *  Tested up to **7.1.1**
 *  PHP version ** 7.4 au juu **
 *  Language
 * [English (US)](https://wordpress.org/plugins/source-shortcode/)
 * Tags
 * [attribution](https://sw.wordpress.org/plugins/tags/attribution/)[block](https://sw.wordpress.org/plugins/tags/block/)
   [credits](https://sw.wordpress.org/plugins/tags/credits/)[shortcode](https://sw.wordpress.org/plugins/tags/shortcode/)
   [source](https://sw.wordpress.org/plugins/tags/source/)
 *  [Advanced View](https://sw.wordpress.org/plugins/source-shortcode/advanced/)

## Ratings

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/source-shortcode/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/source-shortcode/reviews/)

## Contributors

 *   [ jashjacob ](https://profiles.wordpress.org/jashjacob/)

## Saidia

Got something to say? Need help?

 [Angalia Baraza ya Usaidizi](https://wordpress.org/support/plugin/source-shortcode/)

## Changia

Would you like to support the advancement of this plugin?

 [ Donate to this plugin ](https://jashjacob.com)