Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter janjarfalk

    (@janjarfalk)

    I solved it by using the hook load-post-new.php

    add_action ('load-post-new.php', 'setContent');
    function setContent(){
    	?>
    	<script type="text/javascript">
    	jQuery(function($){
    		$('#content').html('<?php echo urldecode($_GET['content']); ?>');
    	});
    	</script>
    	<?php
    }

    Sending the admin to new-post.php?content=foo prefills the content textarea with the value foo.

    All for now,
    Jan

Viewing 1 replies (of 1 total)