2017 © Pedro Peláez
 

library wp-ssl

Helper class for WordPress projects to see if something is really SSL or not

image

wecodemore/wp-ssl

Helper class for WordPress projects to see if something is really SSL or not

  • Tuesday, March 3, 2015
  • by wecodemore
  • Repository
  • 6 Watchers
  • 3 Stars
  • 3 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Is SSL?

Utility class for WordPress to check if a (local/on the current host) URL is accessible via SSL (or not)., (*1)

Methods

To setup the class, you need just a relative path. This path gets added to get_site_url(). The second and third arguments are optional and can get omitted., (*2)

$ssl_utils = new \WCM\SSL\Check( $path );

$ssl_utils = new \WCM\SSL\Check( 'some/relative/path', 443, 12 );

The SSL $port defaults to 443, but can get set to something totally different. It can also get set later on by using the setter., (*3)

$ssl_utils->setPort( 12345 );

The class can as well try to figure it out for you:, (*4)

$guessed_port = $ssl_utils->getPort();

To find out if the current host is running on ssl, you can simply check, (*5)

$is_ssl = $ssl_utils->isSSL();

And finally retrieving the SSL URl is as easy as just calling, (*6)

$ssl_url = $ssl_utils->getURl();

To use the class on a different site than the current one in a Multisite install, you can explicitly set the $blog_id either during instantiating the class or with the setter., (*7)

$ssl_url = $ssl_utils->setBlogID( 12 );

All mentioned setter methods are chainable:, (*8)

$ssl_utils = new \WCM\SSL\Check( 'example/path' );
$ssl_utils
    ->setPort( 443 )
    ->setBlogID( 12 );

Install

Best served via Composer:, (*9)

"wecodemore/wp-ssl" : "^1.0"

The Versions

03/03 2015

dev-master

9999999-dev https://github.com/wecodemore/wp-ssl

Helper class for WordPress projects to see if something is really SSL or not

  Sources   Download

MIT

The Requires

 

wordpress wp composer ssl

14/01 2015

v1.0.1

1.0.1.0 https://github.com/wecodemore/wp-ssl

Helper class for WordPress projects to see if something is really SSL or not

  Sources   Download

MIT

The Requires

 

wordpress wp composer ssl

14/01 2015

v1.0.0

1.0.0.0 https://github.com/wecodemore/wp-ssl

Helper class for WordPress projects to see if something is really SSL or not

  Sources   Download

MIT

The Requires

 

wordpress wp composer ssl