{"id":26027,"date":"2014-10-02T14:47:09","date_gmt":"2014-10-02T14:47:09","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/source-shortcode\/"},"modified":"2026-08-28T10:20:38","modified_gmt":"2026-08-28T10:20:38","slug":"source-shortcode","status":"publish","type":"plugin","link":"https:\/\/ceb.wordpress.org\/plugins\/source-shortcode\/","author":9448965,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.4.0","stable_tag":"1.4.0","tested":"7.1","requires":"5.0","requires_php":"7.4","requires_plugins":null,"header_name":"Credits Shortcode & Block","header_author":"Jash Jacob","header_description":"","assets_banners_color":"3e5d75","last_updated":"2026-08-28 10:20:38","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/jashjacob.com","header_plugin_uri":"https:\/\/github.com\/jashjacob\/Credits-Shortcode-Plugin-for-Wordpress","header_author_uri":"https:\/\/jashjacob.com","rating":0,"author_block_rating":0,"active_installs":10,"downloads":1788,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.3":{"tag":"1.3","author":"jashjacob","date":"2026-08-07 09:41:37","revision":3637660},"1.3.1":{"tag":"1.3.1","author":"jashjacob","date":"2026-08-14 14:13:47","revision":3647536},"1.4.0":{"tag":"1.4.0","author":"jashjacob","date":"2026-08-28 10:20:38","revision":3670145}},"upgrade_notice":{"1.4.0":"<p>Adds translations support, block.json metadata registration (apiVersion 3), and an automated test suite. No breaking changes for existing shortcodes or blocks.<\/p>"},"ratings":{"1":0,"2":0,"3":0,"4":0,"5":0},"assets_icons":{"icon-256x256.png":{"filename":"icon-256x256.png","revision":3671249,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3671249,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3671249,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{},"all_blocks":{"credits\/shortcode":{"$schema":"https:\/\/schemas.wp.org\/trunk\/block.json","apiVersion":3,"name":"credits\/shortcode","version":"1.4.0","title":"Credits Link","category":"widgets","icon":"share","description":"Insert Source or Via credit link into your post with customizable accent colors.","keywords":["credits","source","via","attribution","color"],"textdomain":"credits-shortcode","attributes":{"link":{"type":"string","default":"#"},"type":{"type":"string","default":"source"},"name":{"type":"string","default":""},"badgeColor":{"type":"string","default":""},"linkColor":{"type":"string","default":""},"linkTextColor":{"type":"string","default":""}},"editorScript":"credits-block-js","editorStyle":"credits-shortcode","style":"credits-shortcode"}},"tagged_versions":["1.3","1.3.1","1.4.0"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3671249,"resolution":"1","location":"assets","locale":"","width":1544,"height":500},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3671249,"resolution":"2","location":"assets","locale":"","width":1544,"height":500}},"screenshots":{"1":"The credit line rendered on the frontend.","2":"Gutenberg block settings in the editor sidebar."}},"plugin_section":[],"plugin_tags":[1220,6265,80,8747,19021],"plugin_category":[43],"plugin_contributors":[95483],"plugin_business_model":[],"class_list":["post-26027","plugin","type-plugin","status-publish","hentry","plugin_tags-block","plugin_tags-credits","plugin_tags-shortcode","plugin_tags-source","plugin_tags-via","plugin_category-customization","plugin_contributors-jashjacob","plugin_committers-jashjacob"],"banners":{"banner":"https:\/\/ps.w.org\/source-shortcode\/assets\/banner-772x250.png?rev=3671249","banner_2x":"https:\/\/ps.w.org\/source-shortcode\/assets\/banner-1544x500.png?rev=3671249","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/source-shortcode\/assets\/icon-256x256.png?rev=3671249","icon_2x":"https:\/\/ps.w.org\/source-shortcode\/assets\/icon-256x256.png?rev=3671249","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/source-shortcode\/assets\/screenshot-1.png?rev=3671249","caption":"The credit line rendered on the frontend."},{"src":"https:\/\/ps.w.org\/source-shortcode\/assets\/screenshot-2.png?rev=3671249","caption":"Gutenberg block settings in the editor sidebar."}],"raw_content":"<!--section=description-->\n<p>Credits Shortcode &amp; Block allows content creators to easily add formatted \"Source\" or \"Via\" attribution credit lines to WordPress posts and pages.<\/p>\n\n<p>Supports the modern Gutenberg Block Editor (with live preview, customizable accent color pickers, and sidebar controls), traditional shortcodes, and legacy Classic Editor toolbar buttons.<\/p>\n\n<h4>Shortcode Usage<\/h4>\n\n<p>Basic Source attribution:<\/p>\n\n<pre><code>[credits link=\"https:\/\/example.com\"]Source Name[\/credits]\n<\/code><\/pre>\n\n<p>Via attribution:<\/p>\n\n<pre><code>[credits link=\"https:\/\/example.com\" type=\"via\"]Via Name[\/credits]\n<\/code><\/pre>\n\n<p>With a name attribute (instead of wrapped text):<\/p>\n\n<pre><code>[credits name=\"TechZei\" link=\"https:\/\/example.com\"]\n<\/code><\/pre>\n\n<p>Full set of attributes:<\/p>\n\n<ul>\n<li><code>name<\/code> \u2014 the attribution name to display. Defaults to the shortcode's inner content.<\/li>\n<li><code>link<\/code> \u2014 the URL the credit links to (escaped with <code>esc_url()<\/code>).<\/li>\n<li><code>source<\/code> \u2014 an optional secondary label shown alongside the name.<\/li>\n<li><code>type<\/code> \u2014 <code>source<\/code> or <code>via<\/code> badge prefix.<\/li>\n<li><code>badge_color<\/code>, <code>link_color<\/code>, <code>link_text_color<\/code> \u2014 hex color overrides for the accent styling.<\/li>\n<\/ul>\n\n<p>Example with custom colors:<\/p>\n\n<pre><code>[credits link=\"https:\/\/example.com\" type=\"source\" badge_color=\"#0073aa\" link_color=\"#f0f0f0\" link_text_color=\"#0073aa\"]Source Name[\/credits]\n<\/code><\/pre>\n\n<h4>Block Usage<\/h4>\n\n<ol>\n<li>In the WordPress Block Editor, click <strong>+<\/strong> or type <code>\/credits<\/code> to insert the <strong>Credits Link<\/strong> block (<code>credits\/shortcode<\/code>).<\/li>\n<li>Set the Credit Type (Source\/Via), attribution name, and Link URL in the block sidebar.<\/li>\n<li>Optionally expand Accent Color Settings to customize the badge background, link background, and link text colors.<\/li>\n<\/ol>\n\n<p>The block renders live in the editor and adapts to modern block themes so the credit line sits flush with paragraph content.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>In your WordPress admin, go to <strong>Plugins &gt; Add New<\/strong>.<\/li>\n<li>Search for \"Credits Shortcode &amp; Block\".<\/li>\n<li>Click <strong>Install Now<\/strong>, then <strong>Activate<\/strong>.<\/li>\n<\/ol>\n\n<p>Manual installation:<\/p>\n\n<ol>\n<li>Download the plugin from WordPress.org (or this repository) as a <code>.zip<\/code> file.<\/li>\n<li>Go to <strong>Plugins &gt; Add New &gt; Upload Plugin<\/strong> and choose the <code>.zip<\/code>, or upload the extracted <code>credits-shortcode<\/code> folder to your <code>\/wp-content\/plugins\/<\/code> directory via FTP\/SFTP.<\/li>\n<li>Activate the plugin through the <strong>Plugins<\/strong> menu in WordPress.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"can%20i%20change%20how%20the%20credit%20line%20looks%3F\"><h3>Can I change how the credit line looks?<\/h3><\/dt>\n<dd><p>Yes. Use the Accent Color Settings in the block sidebar, the color attributes on the shortcode, or override the CSS classes (<code>.cre_cate<\/code>, <code>.cre_cate_link<\/code>) in <strong>Appearance &gt; Customize &gt; Additional CSS<\/strong>. The plugin enqueues minimal default styles that are easy to override.<\/p><\/dd>\n<dt id=\"can%20i%20add%20multiple%20credits%20per%20post%3F\"><h3>Can I add multiple credits per post?<\/h3><\/dt>\n<dd><p>Yes. Insert multiple blocks or shortcodes anywhere in a post or page \u2014 each one renders its own independent credit line, so you can list several sources.<\/p><\/dd>\n<dt id=\"what%20happens%20if%20i%20deactivate%20the%20plugin%3F\"><h3>What happens if I deactivate the plugin?<\/h3><\/dt>\n<dd><p>Shortcode output stops being rendered, so existing <code>[credits]<\/code> tags will appear as plain text inside your post content. Your posts are not modified; simply re-activate the plugin to restore the rendered credit lines.<\/p><\/dd>\n<dt id=\"how%20do%20i%20change%20the%20colors%3F\"><h3>How do I change the colors?<\/h3><\/dt>\n<dd><p>Per-instance colors can be set with the <code>badge_color<\/code>, <code>link_color<\/code>, and <code>link_text_color<\/code> attributes (hex values) or via the block sidebar color pickers. Site-wide defaults can be overridden with custom CSS targeting the same classes.<\/p><\/dd>\n<dt id=\"does%20it%20add%20rel%3D%22nofollow%22%20to%20the%20links%3F\"><h3>Does it add rel=\"nofollow\" to the links?<\/h3><\/dt>\n<dd><p>No, links use standard anchor markup with escaped URLs. If you need <code>nofollow<\/code> for SEO reasons, you can filter the output with your own markup filter or use a third-party link-management plugin; the credit line is plain HTML so any standard link-filtering plugin will apply to it.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.4.0<\/h4>\n\n<ul>\n<li>Added internationalization (i18n) support \u2014 all strings now use the <code>credits-shortcode<\/code> text domain; translators welcome.<\/li>\n<li>The Gutenberg block is now registered from <code>block.json<\/code> metadata with <code>apiVersion 3<\/code>.<\/li>\n<li>Version is now maintained from a single source of truth in the main plugin file.<\/li>\n<li>Added a PHPUnit test suite (32 tests) running in continuous integration.<\/li>\n<li>Neutral, theme-friendly default styling: the badge no longer forces brand colors or italics; accent colors are opt-in and links inherit your theme's link color. Existing blocks keep their saved colors.<\/li>\n<li>New Settings -&gt; Credits page: store site-wide default credit type and accent colors (saved via the Settings API with hex validation); shortcodes and blocks without explicit values use them. Settings are removed on uninstall.<\/li>\n<\/ul>\n\n<h4>1.3.1<\/h4>\n\n<ul>\n<li>Sanitize attributes on input (<code>esc_url_raw<\/code>, <code>sanitize_text_field<\/code>, <code>sanitize_key<\/code>, <code>sanitize_hex_color<\/code>).<\/li>\n<li>Escape only when building output: <code>esc_url()<\/code> for href, <code>esc_html()<\/code> for text, <code>esc_attr( safecss_filter_attr() )<\/code> for inline CSS.<\/li>\n<li>Restrict accent colors to hex values and run the final markup through <code>wp_kses()<\/code>.<\/li>\n<\/ul>\n\n<h4>1.3<\/h4>\n\n<ul>\n<li>Added native Gutenberg Block support (<code>credits\/shortcode<\/code>).<\/li>\n<li>Added custom Accent Color Pickers in the Block Editor sidebar and shortcodes.<\/li>\n<li>Added micro-interaction hover lift animations and smooth CSS transitions.<\/li>\n<li>Fixed Stored XSS vulnerability (CVE-2026-6256).<\/li>\n<\/ul>\n\n<h4>1.2<\/h4>\n\n<ul>\n<li>Initial public release with Classic Editor support.<\/li>\n<\/ul>","raw_excerpt":"Easy shortcode and Gutenberg block to insert Source and Via attribution credits inside posts in WordPress.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ceb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/26027","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ceb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/ceb.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/ceb.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=26027"}],"author":[{"embeddable":true,"href":"https:\/\/ceb.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/jashjacob"}],"wp:attachment":[{"href":"https:\/\/ceb.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=26027"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/ceb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=26027"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/ceb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=26027"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/ceb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=26027"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/ceb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=26027"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/ceb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=26027"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}