random characters on links
random characters on links
random characters on links
Doing a search via PHPMyAdmin did not show up any instances of the wrong URL. However, when I searched and replaced using this plugin https://wordpress.org/plugins/search-and-replace/ I found certain URLs were incorrect. Some changes could not be made with the plugin as they were serialized.
Try to install plugin duplicator and create a snapshot than with the install.php and related zipped file you need to copy in a subdir or in the root (copy all site an db in local for secure restoring) the two file and launch install.php, in a wizard there is a step in wich you can … Read more
It seems you have no menu selected. In the Manage location screen select an existing menu and Save changes. If there is none, click on “Use new menu”. Then you should be able to edit it in the Edit Menus screen. See the Codex article on Menu Screens and the one on wp_nav_menu
Link rewrite to https (NOT URL rewrite)
The Link Manager is a pseudo post type at best. You can either use the default ‘Categories’, or go full circle and (1) register a new post type + the custom taxonomy on the new post type or (2) use post formats + the custom taxonomy on posts Links Manager Registering a new Post Type … Read more
Ah ha: by searching the rendered page for target I discovered that the site was running a plugin called “Open external links in a new window.” Disabling that plugin solved the problem.
Use bp_core_get_user_domain($user_id). This will give you the url part up to the username (with a slash at the end). Try something like the following: $user_id=bp_displayed_user_id(); $link=bp_core_get_user_domain($user_id).”profile/edit/group/8″;
How might one programmatically set the link for all images in all posts?
Is it possible? Sure. You just need to re-declare the wpLink function that generates the link from the button. For example like this function wpse_181706_overwrite_wpLink() { if (wp_script_is(‘quicktags’)){ ?> <script type=”text/javascript”> var wpLink;!function(e){var t,i,n,s,l={},a={},r=”ontouchend”in document;wpLink={timeToTriggerRiver:150,minRiverAJAXDuration:200,riverBottomThreshold:5,keySensitivity:100,lastSearch:””,textarea:””,init:function(){l.wrap=e(“#wp-link-wrap”),l.dialog=e(“#wp-link”),l.backdrop=e(“#wp-link-backdrop”),l.submit=e(“#wp-link-submit”),l.close=e(“#wp-link-close”),l.url=e(“#url-field”),l.nonce=e(“#_ajax_linking_nonce”),l.title=e(“#link-title-field”),l.openInNewTab=e(“#link-target-checkbox”),l.search=e(“#search-field”),a.search=new n(e(“#search-results”)),a.recent=new n(e(“#most-recent-results”)),a.elements=l.dialog.find(“.query-results”),l.queryNotice=e(“#query-notice-message”),l.queryNoticeTextDefault=l.queryNotice.find(“.query-notice-default”),l.queryNoticeTextHint=l.queryNotice.find(“.query-notice-hint”),l.dialog.keydown(wpLink.keydown),l.dialog.keyup(wpLink.keyup),l.submit.click(function(e){e.preventDefault(),wpLink.update()}),l.close.add(l.backdrop).add(“#wp-link-cancel a”).click(function(e){e.preventDefault(),wpLink.close()}),e(“#wp-link-search-toggle”).on(“click”,wpLink.toggleInternalLinking),a.elements.on(“river-select”,wpLink.updateFields),l.search.on(“focus.wplink”,function(){l.queryNoticeTextDefault.hide(),l.queryNoticeTextHint.removeClass(“screen-reader-text”).show()}).on(“blur.wplink”,function(){l.queryNoticeTextDefault.show(),l.queryNoticeTextHint.addClass(“screen-reader-text”).hide()}),l.search.keyup(function(){var e=this;window.clearTimeout(i),i=window.setTimeout(function(){wpLink.searchInternalLinks.call(e)},500)})},open:function(i){var n;wpLink.range=null,i&&(window.wpActiveEditor=i),window.wpActiveEditor&&(this.textarea=e(“#”+window.wpActiveEditor).get(0),”undefined”!=typeof tinymce&&(n=tinymce.get(wpActiveEditor),t=n&&!n.isHidden()?n:null,t&&tinymce.isIE&&(t.windowManager.bookmark=t.selection.getBookmark())),!wpLink.isMCE()&&document.selection&&(this.textarea.focus(),this.range=document.selection.createRange()),l.wrap.show(),l.backdrop.show(),wpLink.refresh(),e(document).trigger(“wplink-open”,l.wrap))},isMCE:function(){return t&&!t.isHidden()},refresh:function(){a.search.refresh(),a.recent.refresh(),wpLink.isMCE()?wpLink.mceRefresh():wpLink.setDefaultValues(),r?l.url.focus().blur():l.url.focus()[0].select(),a.recent.ul.children().length||a.recent.ajax()},mceRefresh:function(){var e;(e=t.dom.getParent(t.selection.getNode(),”A”))?(l.url.val(t.dom.getAttrib(e,”href”)),l.title.val(t.dom.getAttrib(e,”title”)),l.openInNewTab.prop(“checked”,”_blank”===t.dom.getAttrib(e,”target”)),l.submit.val(wpLinkL10n.update)):wpLink.setDefaultValues()},close:function(){wpLink.isMCE()?t.focus():(wpLink.textarea.focus(),wpLink.range&&(wpLink.range.moveToBookmark(wpLink.range.getBookmark()),wpLink.range.select())),l.backdrop.hide(),l.wrap.hide(),e(document).trigger(“wplink-close”,l.wrap)},getAttrs:function(){return{href:l.url.val(),title:l.title.val(),target:l.openInNewTab.prop(“checked”)?”_blank”:””,”class”:”myclass”}},update:function(){wpLink.isMCE()?wpLink.mceUpdate():wpLink.htmlUpdate()},htmlUpdate:function(){var e,t,i,n,s,l,a,r=wpLink.textarea;r&&(e=wpLink.getAttrs(),e.href&&”http://”!=e.href&&(t=”<a href=””+e.href+'”‘,e.title&&(l=e.title.replace(/</g,”<”).replace(/>/g,”>”).replace(/”/g,”"”),t+=’ title=”‘+l+'”‘),e.target&&(t+=’ target=”‘+e.target+'”‘),e[“class”]&&(t+=’ class=”myclass”‘),t+=”>”,document.selection&&wpLink.range?(r.focus(),wpLink.range.text=t+wpLink.range.text+”</a>”,wpLink.range.moveToBookmark(wpLink.range.getBookmark()),wpLink.range.select(),wpLink.range=null):”undefined”!=typeof r.selectionStart&&(i=r.selectionStart,n=r.selectionEnd,a=r.value.substring(i,n),t=t+a+”</a>”,s=i+t.length,i==n&&(s-=”</a>”.length),r.value=r.value.substring(0,i)+t+r.value.substring(n,r.value.length),r.selectionStart=r.selectionEnd=s),wpLink.close(),r.focus()))},mceUpdate:function(){var e,i=wpLink.getAttrs();return wpLink.close(),t.focus(),tinymce.isIE&&t.selection.moveToBookmark(t.windowManager.bookmark),e=t.dom.getParent(t.selection.getNode(),”a[href]”),i.href&&”http://”!=i.href?(e?t.dom.setAttribs(e,i):t.execCommand(“mceInsertLink”,!1,i),void t.selection.collapse()):void t.execCommand(“unlink”)},updateFields:function(e,t){l.url.val(t.children(“.item-permalink”).val()),l.title.val(t.hasClass(“no-title”)?””:t.children(“.item-title”).text())},setDefaultValues:function(){var e=t&&t.selection.getContent(),i=/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i,n=/^(https?|ftp):\/\/[A-Z0-9.-]+\.[A-Z]{2,4}[^ “]*$/i;l.url.val(e&&i.test(e)?”mailto:”+e:e&&n.test(e)?e.replace(/&|�?38;/gi,”&”):”http://”),l.title.val(“”),l.submit.val(wpLinkL10n.save)},searchInternalLinks:function(){var … Read more