0

Error:

Fatal error:Call to undefined function everything_loop()

Is there anyway around this? It gets an error before it even gets called for...

<?php
function EG204_2nd_Edition_to_Menu()
{
    add_menu_page( 'EG-204', 'EG-204 Ver. 2', '7', 'EG', 'EG204_ExoSkel' , '' , '4.2' );
}
function EG204_ExoSkel() { 

everything_loop();

function everything_loop() {

echo 'Everything!';

}

}

add_action('admin_menu', 'EG204_2nd_Edition_to_Menu');
?>
1
  • 1
    Don't define the function inside another function definition. Commented Aug 4, 2011 at 21:37

2 Answers 2

2

Your brackets aren't right:

<?php

function EG204_2nd_Edition_to_Menu()
{
    add_menu_page( 'EG-204', 'EG-204 Ver. 2', '7', 'EG', 'EG204_ExoSkel' , '' , '4.2' );
}


function EG204_ExoSkel() { 

    everything_loop();
}


function everything_loop() {

echo 'Everything!';

}


add_action('admin_menu', 'EG204_2nd_Edition_to_Menu');

?>
Sign up to request clarification or add additional context in comments.

Comments

0

It is inside another function because you have bracket at the wrong place.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.