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'] ); ?>

/

isset( $_POST['post_type'] ) ? sanitize_key( wp_unslash( $_POST['post_type'] ) ) : 'post', 'status' => $status, 'category' => isset( $_POST['category'] ) ? absint( $_POST['category'] ) : 0, 'from' => $date( 'from' ), 'to' => $date( 'to' ), 'limit' => isset( $_POST['limit'] ) ? absint( $_POST['limit'] ) : 500, 'extras' => ! empty( $_POST['extras'] ), ) ); $format = ( isset( $_POST['format'] ) && 'csv' === sanitize_key( wp_unslash( $_POST['format'] ) ) ) || $export['too_long'] ? 'csv' : 'xlsx'; SteadyPost_File::send( $export['headers'], $export['rows'], $format, 'steadypost-export-' . gmdate( 'Y-m-d' ), $export['columns'] ); } /* ------------------------------------------------------------- history */ public static function render_history() { // Read-only view selectors; the undo itself is a nonce-checked POST. $run_id = isset( $_GET['run'] ) ? sanitize_text_field( wp_unslash( $_GET['run'] ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification.Recommended $undo = ! empty( $_GET['undo'] ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended $run = '' !== $run_id ? SteadyPost_History::get( $run_id ) : null; ?>

/

__( 'Finished', 'steadypost' ), 'stopped' => __( 'Stopped part-way', 'steadypost' ), 'running' => __( 'Running', 'steadypost' ), 'undone' => __( 'Undone', 'steadypost' ), ); $base = admin_url( 'admin.php?page=steadypost-history' ); ?>

display_name : __( 'Manual', 'steadypost' ) ); } ?>
__( 'created', 'steadypost' ), 'updated' => __( 'updated', 'steadypost' ), 'skipped' => __( 'skipped', 'steadypost' ), 'error' => __( 'failed', 'steadypost' ), ); return isset( $labels[ $status ] ) ? $labels[ $status ] : $status; } protected static function render_run( $run ) { $log = SteadyPost_History::log( $run['id'] ); $base = admin_url( 'admin.php?page=steadypost-history' ); ?>

←

# ' . esc_html( $entry['title'] ) . ''; } else { echo esc_html( $entry['title'] ); } ?>