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