示例#1
0
/**
 * Determines if the path indicated in the Autodownload options
 * is valid or not.
 * 
 * @return True is path exits
 */
function ad_isDownloadRootDirValid()
{
    $path = ad_getDownloadRootDir();
    return ad_isDirectory($path);
}
示例#2
0
	<form method="post" action="options.php">
		<?php 
wp_nonce_field('update-options');
?>
		<table class="form-table">

			<tr valign="top">
				<th scope="row">Download directory</th>
				<td>
					<input type="text" name="ad_rootDir" value="<?php 
echo get_option(OPTION_ROOT_DIR);
?>
" /><br>
					The directory in which you upload your files. The path must be relative to your Wordpress install root. Default is wp-content/.
					<br>Current path is <b><?php 
echo ad_getDownloadRootDir();
?>
</b>
					<?php 
if (!ad_isDownloadRootDirValid()) {
    echo '<br><i><b>WARNING! Directory does not exist!</b></i>';
}
?>
				</td>
			</tr>
		</table>

		<input type="hidden" name="action" value="update" />
		<input type="hidden" name="page_options" value="<?php 
echo OPTION_ROOT_DIR;
?>