Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: import_done

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
455
456                     $this->blogs[$importing_blog]['comments_start_index'] = (int) $q['start-index'];
457                     $this->save_vars();
458                } while ( !empty( $query ) && $this->have_time() );
459           }
460           $this->blogs[$importing_blog]['mode'] = 'authors';
461           $this->save_vars();
462           if ( !$this->blogs[$importing_blog]['posts_done'] && !$this->blogs[$importing_blog]['comments_done'] )
463                die('nothing');
464           do_action('import_done', 'blogger');
465           die('done');
466      }
467
468      function convert_date( $date ) {
469          preg_match('#([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:\.[0-9]+)?(Z|[\+|\-][0-9]{2,4}){0,1}#', $date, $date_bits);
470          $offset = iso8601_timezone_to_offset( $date_bits[7] );
471           $timestamp = gmmktime($date_bits[4], $date_bits[5], $date_bits[6], $date_bits[2], $date_bits[3], $date_bits[1]);
472           $timestamp -= $offset; // Convert from Blogger local time to GMT
473           $timestamp += get_option('gmt_offset') * 3600; // Convert from GMT to WP local time