{"id":96659,"date":"2019-01-11T23:33:53","date_gmt":"2019-01-11T23:33:53","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/fix-content-links\/"},"modified":"2019-01-13T15:03:52","modified_gmt":"2019-01-13T15:03:52","slug":"fix-content-links","status":"publish","type":"plugin","link":"https:\/\/te.wordpress.org\/plugins\/fix-content-links\/","author":12042763,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.0.2","stable_tag":"trunk","tested":"5.0.25","requires":"5.0","requires_php":"7.1","requires_plugins":"","header_name":"Fix Content Links","header_author":"LSVH","header_description":"Replaces incorrect links to sources located in the uploads, plugins, themes or wp-content folder.","assets_banners_color":"","last_updated":"2019-01-13 15:03:52","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"http:\/\/wordpress.org\/plugins\/fix-content-links\/","header_author_uri":"https:\/\/lsvh.org\/","rating":0,"author_block_rating":0,"active_installs":10,"downloads":1187,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":{"":"<p>N.A.<\/p>"},"ratings":[],"assets_icons":{"icon-256x256.png":{"filename":"icon-256x256.png","revision":"2010887","resolution":"256x256","location":"assets"},"icon-512x512.png":{"filename":"icon-512x512.png","revision":"2010887","resolution":"512x512","location":"assets"},"icon.svg":{"filename":"icon.svg","revision":"2010887","resolution":"","location":"assets"}},"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":[],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":"2010887","resolution":"1","location":"assets"}},"screenshots":{"1":"The plugin's settings page, located in the Settings submenu."},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[529,3971],"plugin_category":[59],"plugin_contributors":[],"plugin_business_model":[],"class_list":["post-96659","plugin","type-plugin","status-publish","hentry","plugin_tags-content","plugin_tags-tool","plugin_category-utilities-and-tools","plugin_committers-fleuv"],"banners":[],"icons":{"svg":"https:\/\/ps.w.org\/fix-content-links\/assets\/icon.svg?rev=2010887","icon":"https:\/\/ps.w.org\/fix-content-links\/assets\/icon.svg?rev=2010887","icon_2x":false,"generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/fix-content-links\/assets\/screenshot-1.png?rev=2010887","caption":"The plugin's settings page, located in the Settings submenu."}],"raw_content":"<!--section=description-->\n<p>Ever had to replace a couple of links after a migration or because another user added it somehow incorrectly to the \nsite? Well no worries about that anymore, by simply installing and activating this plugin that problem will be gone for \ngood!<\/p>\n\n<p>With this plugin you can either replace incorrect links temporary or permanently. At the plugin settings page you're\nable to tweak the replace algorithm at the following aspects:<\/p>\n\n<ul>\n<li>Only replace links with a certain path prefix.<\/li>\n<li>Exclude links from being replaced.<\/li>\n<\/ul>\n\n<p>In the future there might also be a feature added to help specify on what content the replacement will be executed. For\nnow the plugin does only replaces incorrect links in the <code>any<\/code> post type's post content.<\/p>\n\n<p>By using this plugin on your WordPress site, you're allowing the plugin to replace URL's in the <code>src<\/code> attribute which\nare stored in your WordPress site's database and thus can be altered via the WordPress admin area.<\/p>\n\n<h3>Arbitrary section<\/h3>\n\n<p>The plugin comes with one hook <code>fix-content-links_save_option_{$setting}<\/code> where $setting is either: type, path or\nexclude. With this filter you can add your own functionality before the saving process of an option completes.<\/p>\n\n<p>Use with the Transient API to modify the admin notice during the saving process.<\/p>\n\n<h4>Example<\/h4>\n\n<pre><code>&lt;?php\nadd_filter('fix-content-links_save_option_type', function ($value) {\n    $transient = 'fix-content-links_' . get_current_user_id() . '_admin_notice'\n    $update = get_transient($transient);\n\n    if ($value === 'disable' &amp;&amp; is_array($update) &amp;&amp; array_key_exists('message', $update)) {\n        $update['message'] = '&lt;p&gt;' . __('Plugin disabled.') '&lt;\/p&gt;';\n        set_transient($update);\n    }\n\n    return $value;\n}\n?&gt;\n<\/code><\/pre>\n\n<!--section=installation-->\n<p>This section describes how to install the plugin and get it working.<\/p>\n\n<ol>\n<li>Upload the wp-fix-content-links.zip to the <code>\/wp-content\/plugins\/<\/code> directory.<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress.<\/li>\n<li>Modify the plugin settings to your needs, by default the plugin will replace links temporary.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt>Why can't I set the plugin to permanently replace links by default?<\/dt>\n<dd><p>For software design principals the plugin will only permanently replace links on command and not like the temporary\nsetting on every request.<\/p><\/dd>\n<dt>Why did the plugin break my links instead of fixing them?<\/dt>\n<dd><p>You will probably have to try a different configuration. Try to disable link fixer, where after you go back to the page\nwhere you want to fix your links. Check if you can find some similarity what can be used as a general identifier to\nmatch against. Update your settings and see the effect of it by enabling the temporary link fixer. Setting up the plugin\nmight be a though process and requires you to do some research like explained above as well as your intuition.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<p>N.A.<\/p>","raw_excerpt":"Replaces incorrect links to sources located in the uploads, plugins, themes or wp-content folder.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/te.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/96659","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/te.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/te.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/te.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=96659"}],"author":[{"embeddable":true,"href":"https:\/\/te.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/fleuv"}],"wp:attachment":[{"href":"https:\/\/te.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=96659"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/te.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=96659"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/te.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=96659"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/te.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=96659"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/te.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=96659"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/te.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=96659"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}