update_blog_status [ WordPress Function ]
update_blog_status ( $blog_id, $pref, $value, $deprecated = null )
| Parameters: |
|
| Returns: |
|
| Defined at: |
|
Soorgelijke functies: update_blog_details, get_blog_status, update_user_status, update_blog_public, update_blog_option
Update a blog details field.
Source
<?php
function update_blog_status( $blog_id, $pref, $value, $deprecated = null ) {
global $wpdb;
if ( null !== $deprecated )
_deprecated_argument( __FUNCTION__, '3.1' );
if ( !in_array( $pref, array( 'site_id', 'domain', 'path', 'registered', 'last_updated', 'public', 'archived', 'mature', 'spam', 'deleted', 'lang_id') ) )
return $value;
$wpdb->update( $wpdb->blogs, array($pref => $value, 'last_updated' => current_time('mysql', true)), array('blog_id' => $blog_id) );
refresh_blog_details($blog_id);
if ( 'spam' == $pref )
( $value == 1 ) ? do_action( 'make_spam_blog', $blog_id ) : do_action( 'make_ham_blog', $blog_id );
elseif ( 'mature' == $pref )
( $value == 1 ) ? do_action( 'mature_blog', $blog_id ) : do_action( 'unmature_blog', $blog_id );
elseif ( 'archived' == $pref )
( $value == 1 ) ? do_action( 'archive_blog', $blog_id ) : do_action( 'unarchive_blog', $blog_id );
elseif ( 'archived' == $pref )
( $value == 1 ) ? do_action( 'archive_blog', $blog_id ) : do_action( 'unarchive_blog', $blog_id );
return $value;
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- WPMU Functions/update blog status « WordPress Codex
Description. Updates the specified blog's status, allowing you to set the integer lang_id or any of the following to true or false. public; archived; mature; spam ...
codex.wordpress.org - Function Reference/update blog status « WordPress Codex
Description. Update a blog details field. Usage. <?php update_blog_status( $ blog_id, $pref, $value, $refresh ) ?> Parameters. $blog_id: (integer) (required) ...
codex.wordpress.org - #20305 (update_blog_status should also handle delete/undelete ...
function update_blog_status defined in /includes/ms-blog.php fires the following actions: ... if ( 'spam' == $pref ) ( $value == 1 ) ? do_action( 'make_spam_blog', ...
core.trac.wordpress.org - PHPXRef 0.7 : BuddyPress : Detail view of bp-core-wpabstraction.php
update_blog_status() is_subdomain_install() ...
phpxref.ftwr.co.uk