Title: [Plugin: CF Internal Link Shortcode] Support for other attributes?
Last modified: August 20, 2016

---

# [Plugin: CF Internal Link Shortcode] Support for other attributes?

 *  [Jeff Cohan](https://wordpress.org/support/users/jdcohan/)
 * (@jdcohan)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-cf-internal-link-shortcode-support-for-other-attributes/)
 * Very nice plugin; thanks!
 * Any plans to extend the plugin to support other attributes, especially “**title**”
   and “**target**“?
 * [http://wordpress.org/extend/plugins/internal-link-shortcode/](http://wordpress.org/extend/plugins/internal-link-shortcode/)

Viewing 1 replies (of 1 total)

 *  Thread Starter [Jeff Cohan](https://wordpress.org/support/users/jdcohan/)
 * (@jdcohan)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-cf-internal-link-shortcode-support-for-other-attributes/#post-3088262)
 * Would this revision do it: ???
 *     ```
       function cfplsc_shortcode($atts, $wrapped = null) {
       	extract(shortcode_atts(array(
       		'id' => null,
       		'text' => null,
       		'class' => null,
       		'rel' => null,
       		'title' => null,
       		'target' => null
       	), $atts));
       	$wrapped = trim($wrapped);
       	if (!empty($wrapped)) {
       		$text = $wrapped;
       	}
       	$text = trim($text);
       	$id = intval($id);
       	if (empty($id)) {
       		return $text;
       	}
       	$url = get_permalink($id);
       	if (empty($text)) {
       		$text = get_the_title($id);
       	}
       	empty($class) 	? $class = '' 	: $class = 		' class="'.esc_attr($class).'"';
       	empty($rel) 	? $rel = '' 	: $rel = 		' rel="'.esc_attr($rel).'"';
       	empty($title) 	? $title = '' 	: $title = 		' title="'.esc_attr($title).'"';
       	empty($target) 	? $target = '' 	: $target = 	' target="'.esc_attr($target).'"';
       	return '<a>'.esc_html($text).'</a>';
       }
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘[Plugin: CF Internal Link Shortcode] Support for other attributes?’ is
closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/internal-link-shortcode_a9c9d7.svg)
 * [CF Internal Link Shortcode](https://wordpress.org/plugins/internal-link-shortcode/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/internal-link-shortcode/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/internal-link-shortcode/)
 * [Active Topics](https://wordpress.org/support/plugin/internal-link-shortcode/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/internal-link-shortcode/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/internal-link-shortcode/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [Jeff Cohan](https://wordpress.org/support/users/jdcohan/)
 * Last activity: [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-cf-internal-link-shortcode-support-for-other-attributes/#post-3088262)
 * Status: not resolved