This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Force URLs in srcset attributes into HTTPS scheme. | |
* This is particularly useful when you're running a Flexible SSL frontend like Cloudflare | |
*/ | |
function ssl_srcset( $sources ) { | |
foreach ( $sources as &$source ) { | |
$source['url'] = set_url_scheme( $source['url'], 'https' ); | |
} | |
return $sources; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php namespace PaintedCloud\WP\Classes; | |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly | |
class CustomPost { | |
protected $textdomain; | |
protected $posts; | |
public function __construct( $textdomain ) |