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
501
502                     $this->blogs[$importing_blog]['comments_start_index'] = (int) $q['start-index'];
503                     $this->save_vars();
504                } while ( !empty( $query ) && $this->have_time() );
505           }
506           $this->blogs[$importing_blog]['mode'] = 'authors';
507           $this->save_vars();
508           if ( !$this->blogs[$importing_blog]['posts_done'] && !$this->blogs[$importing_blog]['comments_done'] )
509                die('nothing');
510           do_action('import_done', 'blogger');
511           die('done');
512      }
513
514      function convert_date( $date ) {
515          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);
516          $offset = iso8601_timezone_to_offset( $date_bits[7] );
517           $timestamp = gmmktime($date_bits[4], $date_bits[5], $date_bits[6], $date_bits[2], $date_bits[3], $date_bits[1]);
518           $timestamp -= $offset; // Convert from Blogger local time to GMT
519           $timestamp += get_option('gmt_offset') * 3600; // Convert from GMT to WP local time