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