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'] ?? ''; ?>
Settings saved.
PAT cleared.
Push results
Conflict — opened pull request for review.
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() ): ?>| Page | Push |
|---|---|
|
/
PR
pushed |
| Time | Created | Updated | Errors |
|---|---|---|---|
No changes.
'; return; } echo '