0, 'updated' => 0, ); foreach ( $runs as $run ) { if ( $run['started'] > time() - 30 * DAY_IN_SECONDS && empty( $run['undone'] ) ) { $month['created'] += (int) $run['counts']['created']; $month['updated'] += (int) $run['counts']['updated']; } } $next = SteadyPost_Sync::next_run(); ?>
'any', 'post_status' => array( 'publish', 'draft', 'pending', 'private', 'future' ), 'posts_per_page' => 1, 'fields' => 'ids', 'meta_key' => SteadyPost_Importer::REF_META, // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_key -- one count on an admin screen. ) ); return (int) $query->found_posts; } protected static function counts_line( $run ) { return sprintf( /* translators: 1: created, 2: updated, 3: skipped, 4: errors */ __( '%1$d created · %2$d updated · %3$d skipped · %4$d failed', 'steadypost' ), $run['counts']['created'], $run['counts']['updated'], $run['counts']['skipped'], $run['counts']['error'] ); } /* -------------------------------------------------------------- export */ public static function render_export() { $settings = SteadyPost_Settings::all(); $types = get_post_types( array( 'public' => true ), 'objects' ); unset( $types['attachment'] ); ?>