function file_upload_instruction($d) { wp_enqueue_script('jquery'); $help_key = 'explain_file_upload'; $help = return_help($help_key); echo "<script type='text/javascript'>\n\t\t\t\tjQuery(document).ready(function(){ if(jQuery('.media-title').html()=='Add media files from your computer') jQuery('.media-title').append(\"" . $help . "\"); });\n\t\t </script>"; }
function meta_box_instruction($d) { //adds help bubble to meta-boxes in new post pages global $post; foreach (get_object_taxonomies($post->post_type) as $tax) { switch ($tax) { case 'rats_outcomes': $help_key = 'rats_outcomes'; $help = str_replace("\n", "\\\n", return_help($help_key)); echo "<script type='text/javascript'>\n\t\t\t\t jQuery(document).ready(function(){\n\t\t\t\t\t jQuery('#rats_outcomes-tabs').append(\"" . $help . "\");\n\t\t\t\t });</script>"; break; case 'courses': $help_key = 'mark_courses'; $help = str_replace("\n", "\\\n", return_help($help_key)); echo "<script type='text/javascript'>\n\t\t\t\t jQuery(document).ready(function(){\n\t\t\t\t\t jQuery('#courses-tabs').append(\"" . $help . "\");\n\t\t\t\t });</script>"; break; } } }