Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




_upgrade_cron_array [ WordPress Function ]

_upgrade_cron_array ( $cron )
Access:
  • private
Parameters:
  • (array) $cron Cron info array from {@link _get_cron_array()}.
Returns:
  • (array) An upgraded Cron info array.
Defined at:



Upgrade a Cron info array.

This function upgrades the Cron info array to version 2.

Source


<?php
function _upgrade_cron_array($cron) {
    if ( isset(
$cron['version']) && == $cron['version'])
        return 
$cron;

    
$new_cron = array();

    foreach ( (array) 
$cron as $timestamp => $hooks) {
        foreach ( (array) 
$hooks as $hook => $args ) {
            
$key md5(serialize($args['args']));
            
$new_cron[$timestamp][$hook][$key] = $args;
        }
    }

    
$new_cron['version'] = 2;
    
update_option'cron'$new_cron );
    return 
$new_cron;
}
?>

Examples [ wp-snippets.com ]

Google Arama Sonuçlarý

Dahasý ...

Kullanýcý Tartýþmalarý [ wordpress.org ]

- Bulunamadý -

Yeni bir konu yaz ...

0 User Note(s)

Henüz yok. Ýlk sen ol!

Yeni Ekle ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics