<?php
+/**
+ * Misc WordPress Administration API.
+ *
+ * @package WordPress
+ * @subpackage Administration
+ */
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @return unknown
+ */
function got_mod_rewrite() {
$got_rewrite = apache_mod_loaded('mod_rewrite', true);
return apply_filters('got_rewrite', $got_rewrite);
}
-// Returns an array of strings from a file (.htaccess ) from between BEGIN
-// and END markers.
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $filename
+ * @param unknown_type $marker
+ * @return array An array of strings from a file (.htaccess ) from between BEGIN and END markers.
+ */
function extract_from_markers( $filename, $marker ) {
$result = array ();
return $result;
}
-// Inserts an array of strings into a file (.htaccess ), placing it between
-// BEGIN and END markers. Replaces existing marked info. Retains surrounding
-// data. Creates file if none exists.
-// Returns true on write success, false on failure.
+/**
+ * {@internal Missing Short Description}}
+ *
+ * Inserts an array of strings into a file (.htaccess ), placing it between
+ * BEGIN and END markers. Replaces existing marked info. Retains surrounding
+ * data. Creates file if none exists.
+ *
+ * @since unknown
+ *
+ * @param unknown_type $filename
+ * @param unknown_type $marker
+ * @param unknown_type $insertion
+ * @return bool True on write success, false on failure.
+ */
function insert_with_markers( $filename, $marker, $insertion ) {
if (!file_exists( $filename ) || is_writeable( $filename ) ) {
if (!file_exists( $filename ) ) {
/**
* Updates the htaccess file with the current rules if it is writable.
*
- * Always writes to the file if it exists and is writable to ensure that we blank out old rules.
+ * Always writes to the file if it exists and is writable to ensure that we
+ * blank out old rules.
+ *
+ * @since unknown
*/
-
function save_mod_rewrite_rules() {
global $wp_rewrite;
return false;
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $file
+ */
function update_recently_edited( $file ) {
$oldfiles = (array ) get_option( 'recently_edited' );
if ( $oldfiles ) {
update_option( 'recently_edited', $oldfiles );
}
-// If siteurl or home changed, flush rewrite rules.
+/**
+ * If siteurl or home changed, flush rewrite rules.
+ *
+ * @since unknown
+ *
+ * @param unknown_type $old_value
+ * @param unknown_type $value
+ */
function update_home_siteurl( $old_value, $value ) {
global $wp_rewrite;
add_action( 'update_option_home', 'update_home_siteurl', 10, 2 );
add_action( 'update_option_siteurl', 'update_home_siteurl', 10, 2 );
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $url
+ * @return unknown
+ */
function url_shorten( $url ) {
$short_url = str_replace( 'http://', '', stripslashes( $url ));
$short_url = str_replace( 'www.', '', $short_url );
return $short_url;
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $vars
+ */
function wp_reset_vars( $vars ) {
for ( $i=0; $i<count( $vars ); $i += 1 ) {
$var = $vars[$i];
}
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $message
+ */
+function show_message($message) {
+ if( is_wp_error($message) ){
+ if( $message->get_error_data() )
+ $message = $message->get_error_message() . ': ' . $message->get_error_data();
+ else
+ $message = $message->get_error_message();
+ }
+ echo "<p>$message</p>\n";
+}
+
?>