-
Author
Tagged: ssl, improvement
-
May 11, 2015 at 19:26 #58391adam@jafactory.comParticipant
/**
* Defines the url to which is used to load local resources.
* This may need to be filtered for local Window installations.
* If resources do not load, please check the wiki for details.
*/
/*
if (strtoupper(substr(PHP_OS, 0, 3)) === ‘WIN’) {
//winblows
define( ‘KLEO_META_BOX_URL’, trailingslashit( str_replace( DIRECTORY_SEPARATOR, ‘/’, str_replace( str_replace( ‘/’, DIRECTORY_SEPARATOR, WP_CONTENT_DIR ), WP_CONTENT_URL, dirname(__FILE__) ) ) ) );} else {
define( ‘KLEO_META_BOX_URL’, apply_filters( ‘cmb_meta_box_url’, trailingslashit( str_replace( WP_CONTENT_DIR, WP_CONTENT_URL, dirname( __FILE__ ) ) ) ) );
}
*//* This will resolve the SSL complaints breaking the meta boxes while in admin */
define( ‘KLEO_META_BOX_URL’, apply_filters( ‘cmb_meta_box_url’, preg_replace(‘/http.*\:/’, ”, trailingslashit( str_replace( WP_CONTENT_DIR, WP_CONTENT_URL, dirname( __FILE__ ) ) ) ) ) );May 13, 2015 at 12:52 #58576AbeKeymasterHi there. Thanks for the suggestion. Will definitely check it out and implement it
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.May 13, 2015 at 13:36 #58583AbeKeymasterhere is a better way. Thank you for the suggestion
COPY CODEdefine( 'KLEO_META_BOX_URL', kleo_get_meta_box_url() ); function kleo_get_meta_box_url() { if ( strtoupper( substr( PHP_OS, 0, 3 ) ) === 'WIN' ) { // Windows $content_dir = str_replace( '/', DIRECTORY_SEPARATOR, WP_CONTENT_DIR ); $content_url = str_replace( $content_dir, WP_CONTENT_URL, dirname(__FILE__) ); $cmb_url = str_replace( DIRECTORY_SEPARATOR, '/', $content_url ); } else { $cmb_url = str_replace( array(WP_CONTENT_DIR, WP_PLUGIN_DIR), array(WP_CONTENT_URL, WP_PLUGIN_URL), dirname( __FILE__ ) ); } $cmb_url = set_url_scheme( $cmb_url ); return trailingslashit( apply_filters('cmb_meta_box_url', $cmb_url ) ); }
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer. -
AuthorPosts
The forum ‘General questions’ is closed to new topics and replies.