Created
May 27, 2015 23:50
-
-
Save Kaiderella/2f5c8c7a7806fe500c9d to your computer and use it in GitHub Desktop.
Shortcodes tạo mục subscribe nhiều chức năng
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Extended subscription function with subscription type variable | |
function subscribe_multilink_shortcode( $atts ) { | |
extract( shortcode_atts( array( | |
'subtype' => 'RSS', | |
'subtypeurl' => 'http://feeds.feedburner.com/ebooksvn', | |
), $atts, 'multilink' ) ); | |
return sprtinf( 'Hãy đăng ký theo dõi eBooksvn để cập nhật các bài viết mới trong tương lai <a href='%1$s'>thông qua %2$s</a>.', | |
esc_url( $subtypeurl ), | |
esc_html( $subtype ) | |
); | |
} | |
add_shortcode( 'subscribe', 'subscribe_multilink_shortcode' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment