Skip to content

Instantly share code, notes, and snippets.

@geraintp
Last active December 28, 2015 05:19
Show Gist options
  • Save geraintp/7449380 to your computer and use it in GitHub Desktop.
Save geraintp/7449380 to your computer and use it in GitHub Desktop.
add the following code to your themes functions.php replace woo launch pad's re: http://woothemes.zendesk.com/entries/22733517-Maintenance-Launch-Pad-not-working-as-supposed-
<?php // only add this line if you need to! i.e. the file is blank.. and doesnt already start with <?php
/**
* print_custom_html_code_head
* @return void
*/
add_action("init", "fix_launch_pad" , 1);
function fix_launch_pad()
{
global $woodojo_launch_pad;
remove_action( 'woodojo_maintenance_mode_head', array( $woodojo_launch_pad, 'print_custom_html_code_head' ) , 10 );
remove_action( 'woodojo_maintenance_mode_end_body', array( $woodojo_launch_pad, 'print_custom_html_body_end'), 10 );
add_action( 'woodojo_maintenance_mode_head', 'fix_launch_pad_print_custom_html_code_head' , 10 );
add_action( 'woodojo_maintenance_mode_end_body', 'fix_launch_pad_print_custom_html_body_end', 10 );
}
/**
* print_custom_html_code_head
* @return void
*/
function fix_launch_pad_print_custom_html_code_head () {
global $woodojo_launch_pad;
$output = $woodojo_launch_pad->settings['custom-html-code-head'];
if ( $output <> "" )
echo html_entity_decode($output, ENT_QUOTES) . "\n";
}
/**
* print_custom_html_body_end
* @return void
*/
function fix_launch_pad_print_custom_html_body_end (){
global $woodojo_launch_pad;
$output = $woodojo_launch_pad->settings['custom-html-code-footer'];
if ( $output <> "" )
echo html_entity_decode($output, ENT_QUOTES) . "\n";
}
// Equally only add this if required to close out the code.
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment