Giter Site home page Giter Site logo

factmaven / remove-http Goto Github PK

View Code? Open in Web Editor NEW
4.0 4.0 3.0 53 KB

Automatically scan your website and remove both HTTP and HTTPS protocols from your links. Helps resolve mixed content warnings.

Home Page: https://wordpress.org/plugins/remove-http/

PHP 100.00%
dom http https mixed-content-error php protocol ssl wordpress wordpress-plugin

remove-http's People

Contributors

daverandom avatar ethanosullivan avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

remove-http's Issues

Only alter links in the frontend

Source: https://wordpress.org/support/topic/please-only-alter-links-in-the-frontend/

This plugin would be perfect if: Can we please get this plugin to only alter links which are displayed in the frontend? Now it seems to modify all kind of links, regardless if it’s in the admin or not. That said, it happens by accident to store “//my.domain.tld” within the database which does break links pointing to external ressources. Also having this kind of behaviour within the admin does not create any benefit at all.

Protocols aren't removed in "style" attribute

Reference: Use With Avada Theme

When inserting an image link in the style attribute, the protocol isn't removed. Sample item:

<div class="some-class" style='background-color:rgba(255,255,255,0);background-image:url("http://placehold.it/300x125");background-position:center center;background-repeat:no-repeat;padding-top:20px;padding-right:30px;padding-bottom:20px;padding-left:30px;-webkit-background-size:cover;-moz-background-size:cover;-o-background-size:cover;background-size:cover;background-attachment:none;'>

Links in "style" tags aren't affected

Hi @DaveRandom,

The code is now able to remove the protocol in style attributes (#1). Thank you.

However, I notice that the new update doesn't work on <script> tags:

<script type='text/javascript' src='http://example.com/wp-includes/js/jquery/jquery.js'></script>

I made some tweaks to the code, but I haven't been able to figure out why it's doing that.

Also, on L19-L30 and L183-L189, I commented this function out since L192-L196 gives the same results and only requires me to enter the list of attributes instead of tags and attributes. Unless there's a reason to keep both functions, please let me know.

if ( !empty( $this->list_attributes ) ) {
    foreach ( $xpath->query( '//*[@' . implode( ' or @', $this->list_attributes ) . ']' ) as $element ) {
        $this->process_element_attributes( $element, $this->list_attributes, $regex );
    }
}

Please: Only alter links in the frontend

This plugin would be perfect if: Can we please get this plugin to only alter links which are displayed in the frontend? Now it seems to modify all kind of links, regardless if it’s in the admin or not. That said, it happens by accident to store “//my.domain.tld” within the database which does break links pointing to external ressources. Also having this kind of behaviour within the admin does not create any benefit at all.

Source: https://wordpress.org/support/topic/please-only-alter-links-in-the-frontend/

Breaks wptexturize()

Hi! Small but annoying bug (issue?). Spent some hours trying to find where it's triggered, but still no luck...

Remove-HTTP disabled (everything's okay):

<p>В городе Нежин Черниговской области злоумышленники украли памятник советскому актеру и исполнителю песен Марку Бернесу. Об этом сообщил народный депутат Украины Андрей Лозовой на странице в Facebook.</p>
<p>&#171;Ничего святого. В Нежине на Черниговщине украли&#8230; памятник Марку Бернесу в Графском парке. Кто не знает, Бернес родился в Нежине, и в 2011 году, к столетию со дня его рождения&#8230; был открыт памятник великому артисту. А прошлой ночью – его украли, вероятно, на металл&#187;, – написал нардеп на своей странице в Facebook.</p>

Remove-HTTP enabled (broken quotes and dashes):

<p>В городе Нежин Черниговской области злоумышленники украли памятник советскому актеру и исполнителю песен Марку Бернесу. Об этом сообщил народный депутат Украины Андрей Лозовой на странице в Facebook.</p>
<p>&#8220;Ничего святого. В Нежине на Черниговщине украли&#8230; памятник Марку Бернесу в Графском парке. Кто не знает, Бернес родился в Нежине, и в 2011 году, к столетию со дня его рождения&#8230; был открыт памятник великому артисту. А прошлой ночью – его украли, вероятно, на металл&#8221;, – написал нардеп на своей странице в Facebook.</p>

Skip domain(s)

Dear Support,

I need to make sure that the protocol is not altered for a specific URL (so based on a specific domain).

The reason I need that is that the website in question looks terrible when called as HTTPS.

I’ve tried to set your plugin to apply only to internal links, but when I do that lots of other external URLs are changed back to HTTP because the plugins that generate them don’t have an HTTPS or protocol free setup.

That’s the case with the plugins “FeedBurner Email Subscription” and “Floating Social Media Links” and makes the website not secure because it contains a mix of HTTP and HTTPS elements 🙂

Is it possible to add a variable or something somewhere where I could provide either my specific external URL or the domain from it so that your plugin will ignore only that very specific URL?

Thanks,
Mihai

Source: https://wordpress.org/support/topic/skip-domains/

Relative path in domain

This code adds support for relative paths, if you want to serve the WP site via proxy where the domain is different:

-                $website = preg_replace( '/https?:\/\//', '', home_url() );
+                $website = preg_replace( '/^https?:\/\//', '', home_url() );
+                $website = preg_replace('/\/.*$/', '', $website);

Page constantly reloading

After activating this plugin, lumise frontend editor to design a product page constantly reloading. Could you please help me.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.