0 ) { $result = oribi_sync_push_page( $post_id ); set_transient( 'oribi_sync_push_result', $result, 60 ); } wp_redirect( add_query_arg( 'oribi_sync_pushed', '1', admin_url( 'options-general.php?page=oribi-sync' ) ) ); exit; } ); add_action( 'admin_post_oribi_sync_push_all', function () { if ( ! current_user_can( 'manage_options' ) ) wp_die( 'Permission denied.' ); check_admin_referer( 'oribi_sync_push_all' ); $result = oribi_sync_push_all(); set_transient( 'oribi_sync_push_result', $result, 60 ); wp_redirect( add_query_arg( 'oribi_sync_pushed', 'all', admin_url( 'options-general.php?page=oribi-sync' ) ) ); exit; } ); // ─── Settings page renderer ────────────────────────────────────────────────── function oribi_sync_settings_page() { if ( ! current_user_can( 'manage_options' ) ) return; $repo = get_option( 'oribi_sync_repo', '' ); $branch = get_option( 'oribi_sync_branch', 'main' ); $provider = get_option( 'oribi_sync_provider', '' ); $pages_folder = get_option( 'oribi_sync_pages_folder', '' ); $has_pat = ! empty( get_option( 'oribi_sync_pat', '' ) ); $last_run = get_option( 'oribi_sync_last_run', '' ); $log = get_option( 'oribi_sync_log', [] ); // Transient results $sync_result = get_transient( 'oribi_sync_result' ); if ( $sync_result ) delete_transient( 'oribi_sync_result' ); $push_result = get_transient( 'oribi_sync_push_result' ); if ( $push_result ) delete_transient( 'oribi_sync_push_result' ); $saved = $_GET['oribi_sync_saved'] ?? ''; $done = $_GET['oribi_sync_done'] ?? ''; ?>

Oribi Sync

Settings saved.

PAT cleared.

Push results

Conflict — opened pull request for review.


Actions

Sync (Pull & Push) Dry Run Preview Theme Push All

Last sync:

'page', 'post_status' => 'publish', 'meta_key' => '_oribi_sync_checksum', 'posts_per_page' => -1, 'orderby' => 'title', 'order' => 'ASC', ] ); if ( $synced_pages->have_posts() ): ?> have_posts() ): $synced_pages->the_post(); $pid = get_the_ID(); $last_push = get_post_meta( $pid, '_oribi_sync_last_push', true ); $pr_url = get_post_meta( $pid, '_oribi_sync_pr_url', true ); ?>
Page Push
/ PR
pushed

Theme Files Preview


Sync Log ()
Time Created Updated Errors
. */ function oribi_sync_render_result_list( array $r ): void { $items = []; if ( ! empty( $r['created'] ) ) $items[] = 'Created: ' . implode( ', ', $r['created'] ); if ( ! empty( $r['updated'] ) ) $items[] = 'Updated: ' . implode( ', ', $r['updated'] ); if ( ! empty( $r['theme_updated'] ) ) $items[] = 'Theme: ' . implode( ', ', $r['theme_updated'] ); if ( ! empty( $r['trashed'] ) ) $items[] = 'Trashed: ' . implode( ', ', $r['trashed'] ); if ( ! empty( $r['skipped'] ) ) $items[] = 'Skipped: ' . implode( ', ', $r['skipped'] ); if ( ! empty( $r['errors'] ) ) $items[] = 'Errors: ' . implode( '; ', $r['errors'] ); if ( empty( $items ) ) { echo '

No changes.

'; return; } echo ''; }