{"id":20625,"date":"2012-11-07T18:33:53","date_gmt":"2012-11-07T18:33:53","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/my-permalink-demo\/"},"modified":"2016-12-12T21:43:08","modified_gmt":"2016-12-12T21:43:08","slug":"my-permalink-demo","status":"publish","type":"plugin","link":"https:\/\/pcd.wordpress.org\/plugins\/my-permalink-demo\/","author":3803,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.1.3","stable_tag":"1.1.3","tested":"4.7.33","requires":"3.4","requires_php":"","requires_plugins":"","header_name":"My Permalink Demo","header_author":"Per Soderlind","header_description":"","assets_banners_color":"","last_updated":"2016-12-12 21:43:08","external_support_url":"","external_repository_url":"","donate_link":"http:\/\/soderlind.no\/donate\/","header_plugin_uri":"http:\/\/soderlind.no\/archives\/2012\/11\/01\/wordpress-plugins-and-permalinks-how-to-use-pretty-links-in-your-plugin\/","header_author_uri":"http:\/\/soderlind.no\/","rating":5,"author_block_rating":0,"active_installs":10,"downloads":2019,"num_ratings":1,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","changelog"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":"1"},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.3","1.1.0","1.1.1","1.1.2","1.1.3"],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[44641,44642,44643,2662,12054],"plugin_category":[],"plugin_contributors":[78884],"plugin_business_model":[],"class_list":["post-20625","plugin","type-plugin","status-publish","hentry","plugin_tags-flush_rewrite_rules","plugin_tags-generate_rewrite_rules","plugin_tags-parse_request","plugin_tags-permalink","plugin_tags-rewrite-rules","plugin_contributors-pers","plugin_committers-pers"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/my-permalink-demo.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>While working on my <a href=\"http:\/\/wordpress.org\/extend\/plugins\/read-offline\/\">Read Offline<\/a> plugin, I wanted to implement permalinks. After intensive googling and reading the WordPress source I thought I'd share my findings.<\/p>\n\n<p>This commented plugin demonstrates how to implement a custom permalink for your plugin. To test, add the <code>[mypermalink]<\/code> or <code>[mypermalink val=\"ipsum\"]<\/code> shortcode to a page or post.<\/p>\n\n<p>You can <a href=\"http:\/\/soderlind.no\/archives\/2012\/11\/01\/wordpress-plugins-and-permalinks-how-to-use-pretty-links-in-your-plugin\/\">view the plugin source<\/a> at soderlind.no<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Download the plugin and extract the my-permalink-demo.zip<\/li>\n<li>Upload the extracted <code>my-permalink-demo<\/code> folder to the <code>\/wp-content\/plugins\/<\/code> directory<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress<\/li>\n<\/ol>\n\n<!--section=changelog-->\n<h4>1.1.2<\/h4>\n\n<ul>\n<li>Tested &amp; found compatible with WP 4.7.<\/li>\n<\/ul>\n\n<h4>1.1.1<\/h4>\n\n<ul>\n<li>Tested &amp; found compatible with WP 4.6.<\/li>\n<\/ul>\n\n<h4>1.1.0<\/h4>\n\n<ul>\n<li>Update plugin for <a href=\"https:\/\/make.wordpress.org\/core\/handbook\/best-practices\/coding-standards\/\">WordPress Coding Standards<\/a>.<\/li>\n<li>Tested &amp; found compatible with WP 4.5.<\/li>\n<li>General housekeeping.<\/li>\n<\/ul>\n\n<h4>1.0.4<\/h4>\n\n<ul>\n<li>Tested with WordPress 4.3<\/li>\n<\/ul>\n\n<h4>1.0.3<\/h4>\n\n<ul>\n<li>Tested with WordPress 3.9, bumped version number<\/li>\n<\/ul>\n\n<h4>1.0.2<\/h4>\n\n<ul>\n<li>Thanks to <a href=\"http:\/\/soderlind.no\/read-offline\/comment-page-1\/#comment-209996\">Paul<\/a>, the plugin now only flushes the rewrite rules when needed.<\/li>\n<\/ul>\n\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>Fixed a bug in my_permalink_url() that gave 404 for blogs in a subdirectory.<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial release<\/li>\n<\/ul>","raw_excerpt":"Demo plugin to show how to add a custom permalink to your plugin","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/20625","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=20625"}],"author":[{"embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/pers"}],"wp:attachment":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=20625"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=20625"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=20625"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=20625"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=20625"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=20625"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}