Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>What <a href="https://stackoverflow.com/users/247353/nikit">Nikit</a> <a href="https://stackoverflow.com/a/3521508/225647">said</a> is correct.<br> I will add there are some hooks that are allowed to define which files need to be loaded. Examples of such hooks are <code>hook_theme()</code>, and <code>hook_menu()</code>.</p> <p>A module should never unconditionally load a file it needs calling <code>module_load_include()</code> from outside a function.</p> <pre><code>function book_menu() { $items['admin/content/book'] = array( 'title' =&gt; 'Books', 'description' =&gt; "Manage your site's book outlines.", 'page callback' =&gt; 'book_admin_overview', 'access arguments' =&gt; array('administer book outlines'), 'file' =&gt; 'book.admin.inc', ); $items['admin/content/book/list'] = array( 'title' =&gt; 'List', 'type' =&gt; MENU_DEFAULT_LOCAL_TASK, ); $items['admin/content/book/settings'] = array( 'title' =&gt; 'Settings', 'page callback' =&gt; 'drupal_get_form', 'page arguments' =&gt; array('book_admin_settings'), 'access arguments' =&gt; array('administer site configuration'), 'type' =&gt; MENU_LOCAL_TASK, 'weight' =&gt; 8, 'file' =&gt; 'book.admin.inc', ); // … } function user_theme() { return array( 'user_picture' =&gt; array( 'arguments' =&gt; array('account' =&gt; NULL), 'template' =&gt; 'user-picture', ), 'user_profile' =&gt; array( 'arguments' =&gt; array('account' =&gt; NULL), 'template' =&gt; 'user-profile', 'file' =&gt; 'user.pages.inc', ), // … 'user_admin_perm' =&gt; array( 'arguments' =&gt; array('form' =&gt; NULL), 'file' =&gt; 'user.admin.inc', ), // … ); } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload