/** * Chiamata alla funzione generale per la creazione del form generale * le sezioni devono essere passate come un array con nome => titolo * * @return void */ function moduleCallback() { // Controllo se viene specificata una sezione di documentazione // help presente nella directory dei file e se questa risulta esistente if (isset($_GET['help'])) { $LANGUAGE = get_bloginfo('language'); $FILENAM1 = dirname(SZ_PLUGIN_GOOGLE_MAIN) . '/admin/help/' . $LANGUAGE . '/' . trim($_GET['help']); $FILENAM2 = dirname(SZ_PLUGIN_GOOGLE_MAIN) . '/admin/help/' . substr($LANGUAGE, 0, 2) . '/' . trim($_GET['help']); $FILENAM3 = dirname(SZ_PLUGIN_GOOGLE_MAIN) . '/admin/help/en/' . trim($_GET['help']); if (is_readable($FILENAM1)) { @(include $FILENAM1); return; } if (is_readable($FILENAM2)) { @(include $FILENAM2); return; } if (is_readable($FILENAM3)) { @(include $FILENAM3); return; } } // Se non trovo nessun file di documentazione specifico o // semplicemente viene richiamata la pagina principale parent::moduleCallback(); }
/** * Call the general function for the creation of the general form * sections must be passed as an array of name = > title */ function moduleCallback() { // Check if you specify a section of the help documentation // in the directory of the file and if it is existing if (isset($_GET['help'])) { $LANGUAGE = get_bloginfo('language'); $FILENAM1 = dirname(SZ_PLUGIN_GOOGLE_MAIN) . '/admin/help/' . $LANGUAGE . '/' . trim($_GET['help']); $FILENAM2 = dirname(SZ_PLUGIN_GOOGLE_MAIN) . '/admin/help/' . substr($LANGUAGE, 0, 2) . '/' . trim($_GET['help']); $FILENAM3 = dirname(SZ_PLUGIN_GOOGLE_MAIN) . '/admin/help/en/' . trim($_GET['help']); if (is_readable($FILENAM1)) { @(include $FILENAM1); return; } if (is_readable($FILENAM2)) { @(include $FILENAM2); return; } if (is_readable($FILENAM3)) { @(include $FILENAM3); return; } } // If you can not find any specific // documentation files is called the main page parent::moduleCallback(); }