/** * Return complete path to given theme folder. Enter only the folder name. * Function will check folder existance. * * @param string $theme_folder * @return complete path to folder * @since 2.4.1 */ function FA_theme_path($theme_folder) { $themes_folder = FA_themes_path(); $full_path = $themes_folder . '/' . $theme_folder; // check folder existance if (!is_dir($full_path)) { $full_path = false; } else { if (!is_file($full_path . '/display.php')) { // also check existance for display.php file $full_path = false; } } return $full_path; }
</li> </ol> <form method="post" action=""> <?php wp_nonce_field('update_fa_themes_folder', 'fa_themes_folder_nonce'); ?> <label for="fa_themes_folder" style="font-weight:bold;"><?php _e('Enter only the path from within your current wp_content folder', 'falite'); ?> :</label><br /> <?php echo WP_CONTENT_DIR; ?> /<input type="text" name="fa_themes_folder" id="fa_themes_folder" value="<?php FA_themes_path(false, true); ?> " size="50" /> <?php if (isset($folder_change_result)) { ?> <ul> <?php if (is_wp_error($folder_change_result)) { ?> <?php $codes = $folder_change_result->get_error_codes(); foreach ($codes as $err_code) { ?> <li style="color:red;"><?php