installed plugin Infinite Uploads
version 2.0.8
This commit is contained in:
@ -0,0 +1,36 @@
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<div class="d-flex align-items-center">
|
||||
<h5 class="m-0 mr-auto p-0"><?php esc_html_e( 'Cloud Storage & CDN Overview', 'infinite-uploads' ); ?></h5>
|
||||
<?php require_once( dirname( __FILE__ ) . '/status-icon.php' ); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body cloud p-md-3">
|
||||
<div class="row align-items-center justify-content-center mb-5">
|
||||
<div class="col-lg col-xs-12 mx-sm-0">
|
||||
<p class="lead mb-0"><?php esc_html_e( "This Site's Cloud Bytes / Files", 'infinite-uploads' ); ?> <span class="dashicons dashicons-info text-muted" data-toggle="tooltip" title="<?php esc_attr_e( 'Recalculated every 24 hours', 'infinite-uploads' ); ?>"></span></p>
|
||||
<span class="h2 text-nowrap"><?php echo $this->size_format_zero( $cloud_size, 2 ); ?><small class="text-muted"> / <?php echo number_format_i18n( $cloud_files ); ?></small></span>
|
||||
|
||||
<div class="container p-0 ml-md-3">
|
||||
<?php foreach ( $this->iup_instance->get_filetypes( false, $api_data->stats->site->types ) as $type ) { ?>
|
||||
<div class="row mt-2">
|
||||
<div class="col-1"><span class="badge badge-pill" style="background-color: <?php echo $type->color; ?>"> </span></div>
|
||||
<div class="col-4 lead text-nowrap"><?php echo $type->label; ?></div>
|
||||
<div class="col-5 text-nowrap"><strong><?php echo size_format( $type->size, 2 ); ?> / <?php echo number_format_i18n( $type->files ); ?></strong></div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg col-xs-12 text-center mt-5 mt-lg-0 iup-pie-wrapper">
|
||||
<p class="h5"><?php printf( esc_html__( '%s / %s', 'infinite-uploads' ), $this->size_format_zero( $cloud_total_size, 2 ), esc_html( $api_data->plan->label ) ); ?></p>
|
||||
<canvas id="iup-cloud-pie"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row justify-content-center mb-1">
|
||||
<div class="col text-center">
|
||||
<p><?php esc_html_e( 'Visit the Infinite Uploads site to view, manage, or change your plan.', 'infinite-uploads' ); ?></p>
|
||||
<a class="btn text-nowrap btn-info btn-lg" href="<?php echo esc_url( $this->api_url( '/account/' ) ); ?>" role="button"><?php esc_html_e( 'Account Management', 'infinite-uploads' ); ?></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -0,0 +1,60 @@
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<div class="d-flex align-items-center">
|
||||
<h5 class="m-0 mr-auto p-0"><?php esc_html_e( 'Local File Overview', 'infinite-uploads' ); ?></h5>
|
||||
<?php require_once( dirname( __FILE__ ) . '/status-icon.php' ); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body cloud p-md-5">
|
||||
<div class="row align-items-center justify-content-center mb-5">
|
||||
<div class="col-lg col-xs-12">
|
||||
<p class="lead mb-0"><?php esc_html_e( "Total Bytes / Files", 'infinite-uploads' ); ?></p>
|
||||
<span class="h2 text-nowrap"><?php echo $stats['local_size']; ?><small class="text-muted"> / <?php echo $stats['local_files']; ?></small></span>
|
||||
|
||||
<div class="container p-0 ml-md-3">
|
||||
<?php foreach ( $this->iup_instance->get_filetypes( false ) as $type ) { ?>
|
||||
<div class="row mt-2">
|
||||
<div class="col-1"><span class="badge badge-pill" style="background-color: <?php echo $type->color; ?>"> </span></div>
|
||||
<div class="col-4 lead text-nowrap"><?php echo $type->label; ?></div>
|
||||
<div class="col-5 text-nowrap"><strong><?php echo size_format( $type->size, 2 ); ?> / <?php echo number_format_i18n( $type->files ); ?></strong></div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div class="row mt-2">
|
||||
<div class="col text-muted"><small><?php printf( esc_html__( 'Scanned %s ago', 'infinite-uploads' ), human_time_diff( $stats['files_finished'] ) ); ?> ‐ <a href="#" class="badge badge-primary" data-toggle="modal" data-target="#scan-modal"><span
|
||||
data-toggle="tooltip"
|
||||
title="<?php esc_attr_e( 'Run a new scan to detect and sync recently uploaded files.', 'infinite-uploads' ); ?>"><?php esc_html_e( 'Refresh', 'infinite-uploads' ); ?></span></a></small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg col-xs-12 mt-5 mt-lg-0 text-center iup-pie-wrapper">
|
||||
<canvas id="iup-local-pie"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row justify-content-center mb-3">
|
||||
<div class="col text-center">
|
||||
<h4><?php esc_html_e( 'Ready to Connect!', 'infinite-uploads' ); ?></h4>
|
||||
<p class="lead"><?php esc_html_e( 'Get smart plan recommendations, create or connect to existing account, and enable video or sync to the cloud.', 'infinite-uploads' ); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row justify-content-center mb-5">
|
||||
<div class="col text-center">
|
||||
<form method="post"
|
||||
action="<?php echo esc_url( $this->api_url( defined( 'BIG_FILE_UPLOADS_VERSION' ) ? '/connect/?utm_source=iup_plugin&utm_medium=plugin&utm_campaign=bfu_plugin&utm_term=connect' : '/connect/?utm_source=iup_plugin&utm_medium=plugin&utm_campaign=iup_plugin&utm_term=connect' ) ); ?>">
|
||||
<input type="hidden" name="action" value="iup_connect">
|
||||
<input type="hidden" name="site_id" value="<?php echo esc_attr( $this->api->get_site_id() ); ?>">
|
||||
<input type="hidden" name="domain" value="<?php echo esc_url( $this->api->network_site_url() ); ?>">
|
||||
<input type="hidden" name="redirect_url" value="<?php echo esc_url( $this->settings_url() ); ?>">
|
||||
<input type="hidden" name="bytes" value="<?php echo esc_attr( $to_sync->size ); ?>">
|
||||
<input type="hidden" name="files" value="<?php echo esc_attr( $to_sync->files ); ?>">
|
||||
<button class="btn text-nowrap btn-primary btn-lg" type="submit"><span class="dashicons dashicons-cloud"></span> <?php esc_html_e( 'Connect', 'infinite-uploads' ); ?></button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row justify-content-center mb-1">
|
||||
<div class="col text-center">
|
||||
<img src="<?php echo esc_url( plugins_url( '/assets/img/progress-bar-2.svg', dirname( __FILE__ ) ) ); ?>" alt="Progress steps bar" height="19" width="110"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
23
wp-content/plugins/infinite-uploads/inc/templates/footer.php
Normal file
23
wp-content/plugins/infinite-uploads/inc/templates/footer.php
Normal file
@ -0,0 +1,23 @@
|
||||
<div id="iup-footer" class="container mt-5">
|
||||
<div class="row">
|
||||
<div class="col-sm text-center text-muted">
|
||||
<strong><?php esc_html_e( "The Cloud by Infinite Uploads", 'infinite-uploads' ); ?></strong>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-3">
|
||||
<div class="col-sm text-center text-muted">
|
||||
<a href="<?php echo esc_url( Infinite_Uploads_Admin::get_instance()->api_url( '/support/?utm_source=iup_plugin&utm_medium=plugin&utm_campaign=iup_plugin&utm_content=footer&utm_term=support' ) ); ?>"
|
||||
class="text-muted text-decoration-none"><?php esc_html_e( "Support", 'infinite-uploads' ); ?></a> |
|
||||
<a href="<?php echo esc_url( Infinite_Uploads_Admin::get_instance()->api_url( '/terms-of-service/?utm_source=iup_plugin&utm_medium=plugin&utm_campaign=iup_plugin&utm_content=footer&utm_term=terms' ) ); ?>"
|
||||
class="text-muted text-decoration-none"><?php esc_html_e( "Terms of Service", 'infinite-uploads' ); ?></a> |
|
||||
<a href="<?php echo esc_url( Infinite_Uploads_Admin::get_instance()->api_url( '/privacy/?utm_source=iup_plugin&utm_medium=plugin&utm_campaign=iup_plugin&utm_content=footer&utm_term=privacy' ) ); ?>"
|
||||
class="text-muted text-decoration-none"><?php esc_html_e( "Privacy Policy", 'infinite-uploads' ); ?></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-3">
|
||||
<div class="col-sm text-center text-muted">
|
||||
<a href="https://twitter.com/infiniteuploads" class="text-muted text-decoration-none" data-toggle="tooltip" title="<?php esc_attr_e( 'Twitter', 'infinite-uploads' ); ?>"><span class="dashicons dashicons-twitter"></span></a>
|
||||
<a href="https://www.facebook.com/infiniteuploads/" class="text-muted text-decoration-none" data-toggle="tooltip" title="<?php esc_attr_e( 'Facebook', 'infinite-uploads' ); ?>"><span class="dashicons dashicons-facebook-alt"></span></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -0,0 +1,21 @@
|
||||
<div class="row mt-2">
|
||||
<div class="col-12 col-lg-6 mb-4">
|
||||
<?php
|
||||
if ( infinite_uploads_enabled() ) {
|
||||
require_once( dirname( __FILE__ ) . '/cloud-overview.php' );
|
||||
} else {
|
||||
require_once( dirname( __FILE__ ) . '/sync.php' );
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 mb-4">
|
||||
<?php
|
||||
if ( $this->video->is_video_active() ) {
|
||||
$video_library_settings = $this->video->get_library_settings();
|
||||
require_once( dirname( __FILE__ ) . '/video-overview.php' );
|
||||
} else {
|
||||
require_once( dirname( __FILE__ ) . '/video-disabled.php' );
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
@ -0,0 +1,15 @@
|
||||
<div class="card">
|
||||
<div class="card-body cloud p-md-5">
|
||||
<div class="row justify-content-center mb-5 mt-3">
|
||||
<div class="col text-center">
|
||||
<h4 class="text-warning"><?php esc_html_e( 'Installation Error', 'infinite-uploads' ); ?></h4>
|
||||
<p class="lead"><?php esc_html_e( "We are so sorry, there appears to have been a problem installing the needed tables for the Infinite Uploads plugin. We want to get this working for you so please contact us and we will help you out!", 'infinite-uploads' ); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row justify-content-center mb-5">
|
||||
<div class="col text-center">
|
||||
<a class="btn text-nowrap btn-info btn-lg" href="<?php echo esc_url( $this->api_url( '/support/?utm_source=iup_plugin&utm_medium=plugin&utm_campaign=iup_plugin&utm_content=error&utm_term=support' ) ); ?>" role="button"><?php esc_html_e( 'Contact Support', 'infinite-uploads' ); ?></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -0,0 +1,36 @@
|
||||
<div class="modal fade" id="delete-modal" tabindex="-1" role="dialog" aria-labelledby="delete-modal-label" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="delete-modal-label"><?php esc_html_e( 'Free Up Local Storage', 'infinite-uploads' ); ?></h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="container-fluid">
|
||||
<div class="row justify-content-center mb-4 mt-3">
|
||||
<div class="col text-center">
|
||||
<h4><?php esc_html_e( 'Delete Local Files', 'infinite-uploads' ); ?></h4>
|
||||
<p class="lead"><?php esc_html_e( "This will delete the duplicate copies of your files stored in your local media library. This saves space and improves server performance but will require downloading these files back to the uploads directory before disconnecting to prevent broken media on your site.", 'infinite-uploads' ); ?></p>
|
||||
<p><?php esc_html_e( 'If your host provides access to WP CLI, you can also execute the command:', 'infinite-uploads' ); ?> <code>wp infinite-uploads delete</code></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row justify-content-center mb-5">
|
||||
<div class="col text-center text-muted">
|
||||
<div id="iup-delete-local-spinner" class="spinner-border spinner-border-sm" role="status" style="display: none;">
|
||||
<span class="sr-only">Deleting...</span>
|
||||
</div>
|
||||
<span class="h5"><?php printf( __( '<span id="iup-delete-size">%s</span> / <span id="iup-delete-files">%s</span> Deletable Files', 'infinite-uploads' ), $stats['deletable_size'], $stats['deletable_files'] ); ?></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row justify-content-center mb-4">
|
||||
<div class="col text-center">
|
||||
<button class="btn text-nowrap btn-info btn-lg" id="iup-delete-local-button"><?php esc_html_e( 'Start Delete', 'infinite-uploads' ); ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -0,0 +1,42 @@
|
||||
<div class="modal fade" id="download-modal" tabindex="-1" role="dialog" aria-labelledby="download-modal-label" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="download-modal-label"><?php esc_html_e( 'Download & Disconnect', 'infinite-uploads' ); ?></h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="container-fluid">
|
||||
<div class="row justify-content-center mb-4 mt-3">
|
||||
<div class="col text-center">
|
||||
<img class="mb-4" src="<?php echo esc_url( plugins_url( '/assets/img/download-from-cloud.svg', dirname( __FILE__ ) ) ); ?>" alt="Download from Cloud" height="76" width="76"/>
|
||||
<h4><?php esc_html_e( 'Downloading Files', 'infinite-uploads' ); ?></h4>
|
||||
<p class="lead"><?php esc_html_e( "This process can take many hours for very large media libraries with a lot of files. Please leave this tab open while the download is being processed. If you close the tab the download will be interrupted and you will have to continue where you left off later.", 'infinite-uploads' ); ?></p>
|
||||
<p><?php esc_html_e( 'If your host provides access to WP CLI, that is the fastest and most efficient way to sync your files. Simply execute the command:', 'infinite-uploads' ); ?> <code>wp infinite-uploads download</code></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row justify-content-center mb-4">
|
||||
<div class="col text-center">
|
||||
<div id="iup-download-errors" class="alert alert-warning text-left" role="alert">
|
||||
<ul class="mb-0 mb-lc-0"></ul>
|
||||
</div>
|
||||
<div class="progress download">
|
||||
<div id="iup-download-progress-bar" class="progress-bar progress-bar-animated progress-bar-striped" role="progressbar" style="width: <?php echo $stats['pcnt_downloaded']; ?>%;" aria-valuenow="<?php echo $stats['pcnt_downloaded']; ?>" aria-valuemin="0"
|
||||
aria-valuemax="100"><?php echo $stats['pcnt_downloaded']; ?>%
|
||||
</div>
|
||||
</div>
|
||||
<div class="col text-center text-muted">
|
||||
<div class=" spinner-border spinner-border-sm" role="status">
|
||||
<span class="sr-only">Downloading...</span>
|
||||
</div>
|
||||
<span class="h6" id="iup-download-progress"><?php printf( __( '<span id="iup-download-size">%s</span> / <span id="iup-download-files">%s</span> File(s) Remaining', 'infinite-uploads' ), $stats['deleted_size'], $stats['deleted_files'] ); ?></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -0,0 +1,64 @@
|
||||
<div class="modal fade" id="enable-modal" tabindex="-1" role="dialog" aria-labelledby="enable-modal-label" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="enable-modal-label"><?php esc_html_e( 'Enable Infinite Uploads', 'infinite-uploads' ); ?></h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="container-fluid">
|
||||
<div class="row justify-content-center mb-4 mt-3">
|
||||
<div class="col text-center">
|
||||
<h4><?php esc_html_e( 'Enable the Infinite Uploads Cloud', 'infinite-uploads' ); ?></h4>
|
||||
<p class="lead"><?php esc_html_e( 'Your media library has finished syncing to the Infinite Uploads cloud. Enable now to serve all media from the cloud and global CDN. All new media uploaded will skip the local filesystem and be synced directly to the Infinite Uploads cloud.', 'infinite-uploads' ); ?></p>
|
||||
<?php $error_count = $wpdb->get_var( "SELECT count(*) FROM `{$wpdb->base_prefix}infinite_uploads_files` WHERE synced = 0 AND errors >= 3" ); ?>
|
||||
<div id="iup-enable-errors" class="alert alert-warning text-left iup-enable-errors" role="alert" <?php echo ( $error_count ) ? '' : 'style="display:none;"'; ?>>
|
||||
<?php printf( __( '<span>%s</span> file(s) errored while syncing to the cloud.', 'infinite-uploads' ), number_format_i18n( $error_count ) ); ?>
|
||||
<a class="alert-link" data-toggle="collapse" href="#iup-collapse-errors" role="button" aria-expanded="false" aria-controls="iup-collapse-errors" title="<?php esc_attr_e( 'Show errors', 'infinite-uploads' ); ?>">
|
||||
<span class="dashicons dashicons-arrow-down-alt2"></span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="collapse" id="iup-collapse-errors">
|
||||
<div class="card card-body">
|
||||
<ul class="list-group list-group-flush text-left">
|
||||
<?php
|
||||
$error_list = $wpdb->get_results( "SELECT file, size FROM `{$wpdb->base_prefix}infinite_uploads_files` WHERE synced = 0 AND errors >= 3" );
|
||||
if ( count( $error_list ) ) {
|
||||
foreach ( $error_list as $error ) { ?>
|
||||
<li class="list-group-item list-group-item-warning"><?php echo esc_html( $error->file ); ?> - <?php echo size_format( $error->size, 2 ); ?></li>
|
||||
<?php
|
||||
}
|
||||
} else { ?>
|
||||
<li class="list-group-item list-group-item-warning">
|
||||
<div class="spinner-grow spinner-grow-sm" role="status">
|
||||
<span class="sr-only">Loading...</span>
|
||||
</div>
|
||||
</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<p class="text-warning iup-enable-errors" <?php echo ( $error_count ) ? '' : 'style="display:none;"'; ?>><?php esc_html_e( 'Note: If any of these files are referenced in posts or pages they might show as missing after enabling. You can retry syncing them, or ignore and enable anyway.', 'infinite-uploads' ); ?>
|
||||
<a href="<?php echo esc_url( $this->api_url( '/support/' ) ); ?>"><?php esc_html_e( 'Need help?', 'infinite-uploads' ); ?></a></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row justify-content-center mb-4">
|
||||
<div class="col text-center">
|
||||
<button class="btn text-nowrap btn-primary btn-lg mr-2 iup-enable-errors" id="iup-resync-button" data-toggle="modal" <?php echo ( $error_count ) ? '' : 'style="display:none;"'; ?>><span
|
||||
class="dashicons dashicons-cloud"></span> <?php esc_html_e( 'Retry Sync', 'infinite-uploads' ); ?></button>
|
||||
<button class="btn text-nowrap btn-info btn-lg" id="iup-enable-button"><span class="dashicons dashicons-cloud-saved"></span><?php esc_html_e( 'Enable', 'infinite-uploads' ); ?></button>
|
||||
<div class="spinner-grow text-muted text-hide d-block mx-auto" id="iup-enable-spinner" role="status"><span class="sr-only"><?php esc_html_e( 'Enabling...', 'iup' ); ?></span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row justify-content-center mb-4">
|
||||
<div class="col text-center">
|
||||
<img src="<?php echo esc_url( plugins_url( '/assets/img/progress-bar-5.svg', dirname( __FILE__ ) ) ); ?>" alt="Progress steps bar" height="19" width="110"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -0,0 +1,38 @@
|
||||
<div class="modal fade" id="scan-remote-modal" tabindex="-1" role="dialog" aria-labelledby="scan-remote-modal-label" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="scan-modal-label"><?php esc_html_e( 'Scanning Cloud', 'infinite-uploads' ); ?></h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="container-fluid">
|
||||
<div class="row justify-content-center mb-4 mt-3">
|
||||
<div class="col text-center">
|
||||
<div class="mb-4 mx-auto" style="width: 76px; height: 76px;">
|
||||
<?php include( dirname( dirname( __FILE__ ) ) . '/assets/img/spinner-svg-2.html' ); ?>
|
||||
</div>
|
||||
<h4><?php esc_html_e( 'Comparing to Cloud', 'infinite-uploads' ); ?></h4>
|
||||
<p class="lead"><?php esc_html_e( "Checking for files already existing in the cloud. Please leave this tab open while we complete your scan.", 'infinite-uploads' ); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row justify-content-center mb-4">
|
||||
<div class="col text-center text-muted">
|
||||
<span
|
||||
class="h5" <?php echo ! $stats['cloud_files'] ? 'id="iup-scan-remote-progress"' : ''; ?>><?php printf( __( '<span id="iup-scan-remote-storage">%s</span> / <span id="iup-scan-remote-files">%s</span> Files Synced', 'infinite-uploads' ), $stats['cloud_size'], $stats['cloud_files'] ); ?></span>
|
||||
</div>
|
||||
</div>
|
||||
<?php if ( ! infinite_uploads_enabled() ) { ?>
|
||||
<div class="row justify-content-center mb-4">
|
||||
<div class="col text-center">
|
||||
<img src="<?php echo esc_url( plugins_url( '/assets/img/progress-bar-3.svg', dirname( __FILE__ ) ) ); ?>" alt="Progress steps bar" height="19" width="110"/>
|
||||
</div>
|
||||
</div>
|
||||
<?php } //end not enabled ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -0,0 +1,45 @@
|
||||
<div class="modal fade" id="scan-modal" tabindex="-1" role="dialog" aria-labelledby="scan-modal-label" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="scan-modal-label"><?php esc_html_e( 'Scanning Files', 'infinite-uploads' ); ?></h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="container-fluid">
|
||||
<div class="row justify-content-center mb-4 mt-3">
|
||||
<div class="col text-center">
|
||||
<div class="mb-4 mx-auto" style="width: 76px; height: 76px;">
|
||||
<?php include( dirname( dirname( __FILE__ ) ) . '/assets/img/spinner-svg.html' ); ?>
|
||||
</div>
|
||||
<h4><?php esc_html_e( 'Scanning Local Filesystem', 'infinite-uploads' ); ?></h4>
|
||||
<p class="lead"><?php esc_html_e( "This usually only takes a minute or two but can take longer for very large media libraries with a lot of files. Please leave this tab open while we complete your scan.", 'infinite-uploads' ); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row justify-content-center mb-4">
|
||||
<div class="col text-center text-muted">
|
||||
<span class="h5" id="iup-scan-progress">
|
||||
<?php
|
||||
printf(
|
||||
// translators: %1$s is the opening a tag for storage
|
||||
// translators: %2$s is the closing a tag for storage
|
||||
// translators: %3$s is the opening a tag for files
|
||||
// translators: %4$s is the closing a tag for files
|
||||
esc_html__( 'Found %1$s0 MB%2$s / %3$s0%4$s Files...', 'infinite-uploads' ),
|
||||
'<span id="iup-scan-storage">', '</span>', '<span id="iup-scan-files">', '</span>' );
|
||||
?>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row justify-content-center mb-4">
|
||||
<div class="col text-center">
|
||||
<img src="<?php echo esc_url( plugins_url( '/assets/img/progress-bar-1.svg', dirname( __FILE__ ) ) ); ?>" alt="Progress steps bar" height="19" width="110"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -0,0 +1,47 @@
|
||||
<div class="modal fade" id="upload-modal" tabindex="-1" role="dialog" aria-labelledby="upload-modal-label" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="upload-modal-label"><?php esc_html_e( 'Upload to Cloud', 'infinite-uploads' ); ?></h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="container-fluid">
|
||||
<div class="row justify-content-center mb-4 mt-3">
|
||||
<div class="col text-center">
|
||||
<img class="mb-4" src="<?php echo esc_url( plugins_url( '/assets/img/push-to-cloud.svg', dirname( __FILE__ ) ) ); ?>" alt="Push to Cloud" height="76" width="76"/>
|
||||
<h4><?php esc_html_e( 'Sync in Progress', 'infinite-uploads' ); ?></h4>
|
||||
<p class="lead"><?php esc_html_e( "This process can take many hours for very large media libraries with a lot of files. Please leave this tab open while the sync is being processed. If you close the tab the sync will be interrupted and you will have to continue where you left off later.", 'infinite-uploads' ); ?></p>
|
||||
<p><?php esc_html_e( 'If your host provides access to WP CLI, that is the fastest and most efficient way to sync your files. Simply execute the command:', 'infinite-uploads' ); ?> <code>wp infinite-uploads sync</code></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row justify-content-center mb-4">
|
||||
<div class="col text-center">
|
||||
<div id="iup-sync-errors" class="alert alert-warning text-left" role="alert">
|
||||
<ul class="mb-0 mb-lc-0"></ul>
|
||||
</div>
|
||||
<div class="progress">
|
||||
<div id="iup-sync-progress-bar" class="progress-bar progress-bar-animated progress-bar-striped" role="progressbar" style="width: <?php echo $stats['pcnt_complete']; ?>%;" aria-valuenow="<?php echo $stats['pcnt_complete']; ?>" aria-valuemin="0"
|
||||
aria-valuemax="100"><?php echo $stats['pcnt_complete']; ?>%
|
||||
</div>
|
||||
</div>
|
||||
<div class="col text-center text-muted">
|
||||
<div class="spinner-border spinner-border-sm" role="status">
|
||||
<span class="sr-only">Uploading...</span>
|
||||
</div>
|
||||
<span class="h6" id="iup-upload-progress"><?php printf( __( '<span id="iup-progress-size">%s</span> / <span id="iup-progress-files">%s</span> File(s) Remaining', 'infinite-uploads' ), $stats['remaining_size'], $stats['remaining_files'] ); ?></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row justify-content-center mb-4">
|
||||
<div class="col text-center">
|
||||
<img src="<?php echo esc_url( plugins_url( '/assets/img/progress-bar-4.svg', dirname( __FILE__ ) ) ); ?>" alt="Progress steps bar" height="19" width="110"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
124
wp-content/plugins/infinite-uploads/inc/templates/settings.php
Normal file
124
wp-content/plugins/infinite-uploads/inc/templates/settings.php
Normal file
@ -0,0 +1,124 @@
|
||||
<div class="card mt-0">
|
||||
<div class="card-header h5">
|
||||
<div class="d-flex align-items-center">
|
||||
<h5 class="m-0 mr-auto p-0"><?php esc_html_e( 'Account & Settings', 'infinite-uploads' ); ?> <span class="dashicons dashicons-info text-muted" data-toggle="tooltip" title="<?php esc_attr_e( 'Includes usage data for all connected sites', 'infinite-uploads' ); ?>"></span></h5>
|
||||
<span class="m-0 p-0 text-muted iup-refresh-icon">
|
||||
<div class="spinner-grow spinner-grow-sm text-secondary text-hide" role="status">
|
||||
<span class="sr-only">Refreshing...</span>
|
||||
</div>
|
||||
<span class="dashicons dashicons-update-alt mr-1" role="button" data-target="<?php echo esc_url( $this->settings_url( [ 'refresh' => 1 ] ) ); ?>" data-toggle="tooltip" title="<?php esc_attr_e( 'Refresh account data', 'infinite-uploads' ); ?>"></span>
|
||||
<small><?php printf( esc_html__( 'Updated %s ago', 'infinite-uploads' ), human_time_diff( $api_data->refreshed ) ); ?></small>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body p-md-5">
|
||||
<div class="row justify-content-center mb-5">
|
||||
<div class="col-md-6 col-sm-12">
|
||||
<h5><?php esc_html_e( 'Infinite Uploads Plan', 'infinite-uploads' ); ?></h5>
|
||||
<p class="lead"><?php esc_html_e( 'Your current Infinite Uploads plan and storage.', 'infinite-uploads' ); ?></p>
|
||||
</div>
|
||||
<div class="col-md-6 col-sm-12">
|
||||
<div class="row">
|
||||
<div class="col"><?php esc_html_e( 'Used / Available', 'infinite-uploads' ); ?> <span class="dashicons dashicons-info text-muted" data-toggle="tooltip" title="<?php esc_attr_e( 'Recalculated every 24 hours', 'infinite-uploads' ); ?>"></span></div>
|
||||
<div class="col text-right"><?php esc_html_e( 'Need more?', 'infinite-uploads' ); ?> <a href="<?php echo esc_url( $this->api_url( '/account/billing/' ) ); ?>" class="text-warning"><?php esc_html_e( 'Switch to a new plan.', 'infinite-uploads' ); ?></a></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col badge badge-pill badge-light text-left p-3">
|
||||
<p class="h5 ml-2 mb-0 d-none d-md-block"><?php printf( esc_html__( '%s / %s', 'infinite-uploads' ), $this->size_format_zero( $cloud_total_size, 2 ), esc_html( $api_data->plan->label ) ); ?></p>
|
||||
<p class="h6 ml-2 mb-0 d-md-none"><?php printf( esc_html__( '%s / %s', 'infinite-uploads' ), $this->size_format_zero( $cloud_total_size, 2 ), esc_html( $api_data->plan->label ) ); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row justify-content-center mb-5">
|
||||
<div class="col-md-6 col-sm-12">
|
||||
<h5><?php esc_html_e( 'CDN Bandwidth', 'infinite-uploads' ); ?></h5>
|
||||
<p class="lead"><?php esc_html_e( 'Infinite Uploads includes allotted bandwidth for CDN delivery of your files.', 'infinite-uploads' ); ?></p>
|
||||
</div>
|
||||
<div class="col-md-6 col-sm-12">
|
||||
<div class="row">
|
||||
<div class="col"><?php esc_html_e( 'Used / Available', 'infinite-uploads' ); ?> <span class="dashicons dashicons-info text-muted" data-toggle="tooltip" title="<?php esc_attr_e( 'Recalculated every 24 hours', 'infinite-uploads' ); ?>"></span></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col badge badge-pill badge-light text-left p-3">
|
||||
<p class="h5 ml-2 mb-0"><?php printf( esc_html__( '%s / %s', 'infinite-uploads' ), $this->size_format_zero( $api_data->stats->cloud->bandwidth, 2 ), $this->size_format_zero( $api_data->plan->bandwidth_limit ) ); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row justify-content-center mb-5">
|
||||
<div class="col-md-6 col-sm-12">
|
||||
<h5><?php esc_html_e( 'CDN URL', 'infinite-uploads' ); ?></h5>
|
||||
<p class="lead"><?php esc_html_e( 'Your uploads are served from this CDN url via 45+ edge locations around the world.', 'infinite-uploads' ); ?></p>
|
||||
</div>
|
||||
<div class="col-md-6 col-sm-12">
|
||||
<div class="row">
|
||||
<div class="col"><?php esc_html_e( 'Current CDN URL', 'infinite-uploads' ); ?></div>
|
||||
<?php if ( $api_data->site->cname == $api_data->site->cdn_url ) { ?>
|
||||
<div class="col text-right"><a href="<?php echo esc_url( $this->api_url( '/account/sites/?site=' . $this->api->get_site_id() ) ); ?>#custom-cdn-domain" class="text-warning"><?php esc_html_e( 'Use your own custom domain!', 'infinite-uploads' ); ?></a></div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col badge badge-pill badge-light text-left p-3">
|
||||
<p class="h5 ml-2 mb-0 d-none d-md-block"><?php echo esc_html( $api_data->site->cdn_url ); ?></p>
|
||||
<p class="h6 ml-2 mb-0 d-md-none"><?php echo esc_html( $api_data->site->cdn_url ); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row justify-content-center mb-5">
|
||||
<div class="col-md-6 col-sm-12">
|
||||
<h5><?php esc_html_e( 'Storage Region', 'infinite-uploads' ); ?></h5>
|
||||
<p class="lead"><?php esc_html_e( 'The location of our servers storing your uploads.', 'infinite-uploads' ); ?></p>
|
||||
</div>
|
||||
<div class="col-md-6 col-sm-12">
|
||||
<div class="row">
|
||||
<div class="col"><?php esc_html_e( 'Region', 'infinite-uploads' ); ?> <span class="dashicons dashicons-info text-muted" data-toggle="tooltip" title="<?php esc_attr_e( 'Region can only be selected when first connecting your site.', 'infinite-uploads' ); ?>"></span></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col badge badge-pill badge-light text-left p-3">
|
||||
<p class="h5 ml-2 mb-0"><?php echo esc_html( $region_labels[ $api_data->site->region ] ); ?></p></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php if ( infinite_uploads_enabled() && (bool) $stats['deletable_files'] ) { ?>
|
||||
<div class="row justify-content-center iup-settings-row-delete">
|
||||
<div class="col-md-6 col-sm-12">
|
||||
<h5><?php esc_html_e( 'Free Up Local Storage', 'infinite-uploads' ); ?></h5>
|
||||
<p class="lead"><?php esc_html_e( 'There are unused local copies of files already synced to the cloud. You can optionally delete these to free up local storage space.', 'infinite-uploads' ); ?></p>
|
||||
</div>
|
||||
<div class="col-md-6 col-sm-12 mt-4">
|
||||
<div class="row text-center mb-3">
|
||||
<div class="col"><?php esc_html_e( 'This saves space and improves server performance.', 'infinite-uploads' ); ?></div>
|
||||
</div>
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-xl-5 col-lg-6 col-md-7 text-center">
|
||||
<button class="btn text-nowrap btn-info btn-lg btn-block" data-toggle="modal" data-target="#delete-modal"><?php esc_html_e( 'Delete', 'infinite-uploads' ); ?></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row justify-content-center">
|
||||
<div class="col text-center">
|
||||
<p><strong><?php printf( esc_html__( '%s / %s deletable files', 'infinite-uploads' ), $stats['deletable_size'], $stats['deletable_files'] ); ?></strong></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div class="row justify-content-center" id="iup-disconnect">
|
||||
<div class="col-md-6 col-sm-12">
|
||||
<h5><?php esc_html_e( 'Download & Disconnect', 'infinite-uploads' ); ?></h5>
|
||||
<p class="lead"><?php printf( __( 'Download your media files and disconnect from our cloud. To cancel or manage your storage plan please visit <a href="%s" class="text-warning">account management</a>.', 'infinite-uploads' ), esc_url( $this->api_url( '/account/billing/' ) ) ); ?></p>
|
||||
</div>
|
||||
<div class="col-md-6 col-sm-12 mt-4">
|
||||
<div class="row text-center mb-3">
|
||||
<div class="col"><?php esc_html_e( 'We will download your files back to the uploads directory before disconnecting to prevent broken media on your site.', 'infinite-uploads' ); ?></div>
|
||||
</div>
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-xl-5 col-lg-6 col-md-7 text-center">
|
||||
<button class="btn text-nowrap btn-info btn-lg btn-block" data-toggle="modal" data-target="#scan-remote-modal" data-next="download"><?php esc_html_e( 'Disconnect', 'infinite-uploads' ); ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -0,0 +1,12 @@
|
||||
<span class="m-0 p-0 text-muted iup-enabled-status">
|
||||
<?php esc_html_e( 'Status', 'infinite-uploads' ); ?>
|
||||
<?php if ( isset( $api_data->site ) && ! $api_data->site->upload_writeable ) { ?>
|
||||
<span class="dashicons dashicons-cloud text-warning" data-toggle="tooltip" title="<?php esc_attr_e( 'There is a problem with your Infinite Uploads account', 'infinite-uploads' ); ?>"></span>
|
||||
<?php } elseif ( infinite_uploads_enabled() ) { ?>
|
||||
<span class="dashicons dashicons-cloud-saved" data-toggle="tooltip" title="<?php esc_attr_e( 'Enabled - new uploads are moved to the cloud', 'infinite-uploads' ); ?>"></span>
|
||||
<?php } elseif ( $this->api->has_token() ) { ?>
|
||||
<span class="dashicons dashicons-cloud-upload text-muted" data-toggle="tooltip" title="<?php esc_attr_e( 'Disabled - waiting to sync media to the cloud', 'infinite-uploads' ); ?>"></span>
|
||||
<?php } else { ?>
|
||||
<span class="dashicons dashicons-cloud text-muted" data-toggle="tooltip" title="<?php esc_attr_e( 'Disabled - waiting to connect', 'infinite-uploads' ); ?>"></span>
|
||||
<?php } ?>
|
||||
</span>
|
70
wp-content/plugins/infinite-uploads/inc/templates/sync.php
Normal file
70
wp-content/plugins/infinite-uploads/inc/templates/sync.php
Normal file
@ -0,0 +1,70 @@
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<div class="d-flex align-items-center">
|
||||
<h5 class="m-0 mr-auto p-0"><?php esc_html_e( 'Cloud Storage & CDN', 'infinite-uploads' ); ?></h5>
|
||||
<?php require_once( dirname( __FILE__ ) . '/status-icon.php' ); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body cloud p-md-3">
|
||||
<div class="row align-items-center justify-content-center mb-5">
|
||||
<div class="col-lg col-xs-12">
|
||||
<p class="lead mb-0"><?php esc_html_e( "Total Local Bytes / Files", 'infinite-uploads' ); ?></p>
|
||||
<span class="h2 text-nowrap"><?php echo $stats['local_size']; ?><small class="text-muted"> / <?php echo $stats['local_files']; ?></small></span>
|
||||
|
||||
<div class="container p-0 ml-md-3">
|
||||
<?php foreach ( $this->iup_instance->get_filetypes( false ) as $type ) { ?>
|
||||
<div class="row mt-2">
|
||||
<div class="col-1"><span class="badge badge-pill" style="background-color: <?php echo $type->color; ?>"> </span></div>
|
||||
<div class="col-4 lead text-nowrap"><?php echo $type->label; ?></div>
|
||||
<div class="col-5 text-nowrap"><strong><?php echo size_format( $type->size, 2 ); ?> / <?php echo number_format_i18n( $type->files ); ?></strong></div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div class="row mt-2">
|
||||
<div class="col text-muted"><small><?php printf( esc_html__( 'Scanned %s ago', 'infinite-uploads' ), human_time_diff( $stats['files_finished'] ) ); ?> ‐ <a href="#" class="badge badge-primary" data-toggle="modal" data-target="#scan-modal"><span
|
||||
data-toggle="tooltip"
|
||||
title="<?php esc_attr_e( 'Run a new scan to detect and sync recently uploaded files.', 'infinite-uploads' ); ?>"><?php esc_html_e( 'Refresh', 'infinite-uploads' ); ?></span></a></small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg col-xs-12">
|
||||
<?php if ( isset( $api_data->site ) && ! $api_data->site->upload_writeable ) { ?>
|
||||
<div class="row justify-content-center mb-3 mt-4 mt-lg-0">
|
||||
<div class="col text-center">
|
||||
<p class="lead text-warning"><?php esc_html_e( 'Please fix the billing issue with your account to sync your files to the cloud and enable Infinite Uploads.', 'infinite-uploads' ); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row justify-content-center">
|
||||
<div class="col text-center">
|
||||
<a class="btn text-nowrap btn-info btn-lg" href="<?php echo esc_url( $this->api_url( '/account/billing/' ) ); ?>" role="button"><?php esc_html_e( 'Account Management', 'infinite-uploads' ); ?></a>
|
||||
</div>
|
||||
</div>
|
||||
<?php } else { ?>
|
||||
<div class="row justify-content-center mb-3 mt-4 mt-lg-0">
|
||||
<div class="col text-center">
|
||||
<img class="mb-4" src="<?php echo esc_url( plugins_url( '/assets/img/iu-logo-blue.svg', dirname( __FILE__ ) ) ); ?>" alt="Push to Cloud" height="76" width="76"/>
|
||||
<p class="lead"><?php printf( esc_html__( 'You have %s of premium storage available!', 'infinite-uploads' ), $this->size_format_zero( ( $api_data->plan->storage_limit * GB_IN_BYTES ) - $api_data->stats->cloud->storage, 2 ) ); ?></p>
|
||||
<p class="lead"><?php esc_html_e( 'Optionally move your media library to the Infinite Uploads cloud and serve via our CDN.', 'infinite-uploads' ); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row justify-content-center">
|
||||
<div class="col text-center">
|
||||
<?php if ( ! empty( $stats['sync_finished'] ) ) { //if sync is finished show enable button ?>
|
||||
<button class="btn text-nowrap btn-primary btn-lg" data-toggle="modal" data-target="#enable-modal"><span class="dashicons dashicons-cloud"></span> <?php esc_html_e( 'Sync Now', 'infinite-uploads' ); ?></button>
|
||||
<?php } elseif ( ! empty( $stats['compare_finished'] ) ) { ?>
|
||||
<button class="btn text-nowrap btn-primary btn-l" data-toggle="modal" data-target="#upload-modal"><span class="dashicons dashicons-cloud"></span> <?php esc_html_e( 'Sync Now', 'infinite-uploads' ); ?></button>
|
||||
<?php } else { ?>
|
||||
<button class="btn text-nowrap btn-primary btn-lg" id="iup-sync-button" data-toggle="modal" data-target="#scan-remote-modal" data-next="upload"><span class="dashicons dashicons-cloud"></span> <?php esc_html_e( 'Sync Now', 'infinite-uploads' ); ?></button>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row justify-content-center mb-1">
|
||||
<div class="col text-center">
|
||||
<img src="<?php echo esc_url( plugins_url( '/assets/img/progress-bar-3.svg', dirname( __FILE__ ) ) ); ?>" alt="Progress steps bar" height="19" width="110"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -0,0 +1,27 @@
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<div class="d-flex align-items-center">
|
||||
<h5 class="m-0 mr-auto p-0"><?php esc_html_e( 'Video Cloud', 'infinite-uploads' ); ?></h5>
|
||||
<?php require_once( dirname( __FILE__ ) . '/video-status-icon.php' ); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body cloud p-md-3">
|
||||
<div class="row align-items-center justify-content-center mb-3">
|
||||
<div class="col-lg col-xs-12">
|
||||
<div class="row justify-content-center mb-3 mt-2 mt-lg-2">
|
||||
<div class="col text-center">
|
||||
<img class="mb-4" src="<?php echo esc_url( plugins_url( '/assets/img/video-player.jpg', dirname( __FILE__ ) ) ); ?>" alt="Video player example" height="180" width="320"/>
|
||||
<p class="lead"><?php esc_html_e( "Easily upload videos of any size directly to the cloud and have them automatically transcoded into multiple resolutions for optimal playback on any device. Plus, our customizable unbranded embedded video player allows you to stream your videos from our global CDN, ensuring smooth and seamless playback for your audience. With Infinite Uploads, you'll have everything you need to host and share your videos with the world. All right inside the WordPress dashboard!", 'infinite-uploads' ); ?></p>
|
||||
<p class="lead font-weight-bold"><?php esc_html_e( 'Included FREE with your Infinite Uploads storage plan!', 'infinite-uploads' ); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row justify-content-center">
|
||||
<div class="col text-center">
|
||||
<button class="btn text-nowrap btn-primary btn-lg" id="iup-enable-video-button"><span class="dashicons dashicons-video-alt3"></span> <?php esc_html_e( 'Enable Video Cloud', 'infinite-uploads' ); ?></button>
|
||||
<div class="spinner-grow text-muted d-none mx-auto" id="iup-enable-video-spinner" role="status"><span class="sr-only"><?php esc_html_e( 'Enabling...', 'iup' ); ?></span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -0,0 +1,46 @@
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<div class="d-flex align-items-center">
|
||||
<h5 class="m-0 mr-auto p-0"><?php esc_html_e( 'Video Cloud Overview', 'infinite-uploads' ); ?></h5>
|
||||
<?php require_once( dirname( __FILE__ ) . '/video-status-icon.php' ); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body cloud p-md-4">
|
||||
<div class="row align-items-center justify-content-between mb-1">
|
||||
<div class="col">
|
||||
<h6>
|
||||
<?php esc_html_e( 'Site stats:', 'infinite-uploads' ); ?> <span class="dashicons dashicons-info text-muted" data-toggle="tooltip" title="<?php esc_attr_e( 'Recalculated every 24 hours', 'infinite-uploads' ); ?>"></span>
|
||||
</h6>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row align-items-center justify-content-between mb-5">
|
||||
<div class="col-lg col-xs-12 mx-sm-0">
|
||||
<p class="lead mb-0"><?php esc_html_e( "Video Count", 'infinite-uploads' ); ?></p>
|
||||
<span class="h2 text-nowrap"><?php echo number_format_i18n( $video_library_settings->VideoCount ?? 0 ); ?></span>
|
||||
</div>
|
||||
<div class="col-lg col-xs-12 mx-sm-0">
|
||||
<p class="lead mb-0"><?php esc_html_e( "Video Storage", 'infinite-uploads' ); ?></p>
|
||||
<span class="h2 text-nowrap"><?php echo $this->size_format_zero( $video_library_settings->StorageUsage ?? 0, 2 ); ?></span>
|
||||
</div>
|
||||
<div class="col-lg col-xs-12 mx-sm-0">
|
||||
<p class="lead mb-0"><?php esc_html_e( "Video Bandwidth", 'infinite-uploads' ); ?> <span class="dashicons dashicons-info text-muted" data-toggle="tooltip" title="<?php esc_attr_e( 'This calendar month.', 'infinite-uploads' ); ?>"></span></p>
|
||||
<span class="h2 text-nowrap"><?php echo $this->size_format_zero( $video_library_settings->TrafficUsage ?? 0, 2 ); ?></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-4">
|
||||
<div class="col text-center">
|
||||
<p class="lead"><?php esc_html_e( "Upload, transcode, and embed videos of any size via our Gutenberg Block, shortcode, or video library. Included FREE with your Infinite Uploads storage & CDN plan.", 'infinite-uploads' ); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row justify-content-center mb-1">
|
||||
<div class="col text-center">
|
||||
<p><?php esc_html_e( 'View and manage your cloud video library.', 'infinite-uploads' ); ?></p>
|
||||
<a class="btn text-nowrap btn-primary btn-lg" href="<?php echo esc_url( $this->video->library_url() ); ?>" role="button"><span class="dashicons dashicons-embed-video"></span> <?php esc_html_e( 'Video Library', 'infinite-uploads' ); ?></a>
|
||||
</div>
|
||||
<div class="col text-center">
|
||||
<p><?php esc_html_e( 'Manage cloud video library settings.', 'infinite-uploads' ); ?></p>
|
||||
<a class="btn text-nowrap btn-info btn-lg" href="<?php echo esc_url( $this->video->settings_url() ); ?>" role="button"><span class="dashicons dashicons-admin-generic"></span> <?php esc_html_e( 'Settings', 'infinite-uploads' ); ?></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -0,0 +1,12 @@
|
||||
<span class="m-0 p-0 text-muted iup-enabled-status">
|
||||
<?php esc_html_e( 'Status', 'infinite-uploads' ); ?>
|
||||
<?php if ( $this->video->is_video_active() && ! $this->video->is_video_enabled() ) { ?>
|
||||
<span class="dashicons dashicons-video-alt3 text-warning" data-toggle="tooltip" title="<?php esc_attr_e( 'There is a problem with your Infinite Uploads account', 'infinite-uploads' ); ?>"></span>
|
||||
<?php } elseif ( $this->video->is_video_active() ) { ?>
|
||||
<span class="dashicons dashicons-video-alt3 " data-toggle="tooltip" title="<?php esc_attr_e( 'Enabled', 'infinite-uploads' ); ?>"></span>
|
||||
<?php } elseif ( $this->api->has_token() ) { ?>
|
||||
<span class="dashicons dashicons-video-alt3 text-muted" data-toggle="tooltip" title="<?php esc_attr_e( 'Disabled', 'infinite-uploads' ); ?>"></span>
|
||||
<?php } else { ?>
|
||||
<span class="dashicons dashicons-video-alt3 text-muted" data-toggle="tooltip" title="<?php esc_attr_e( 'Disabled - waiting to connect', 'infinite-uploads' ); ?>"></span>
|
||||
<?php } ?>
|
||||
</span>
|
@ -0,0 +1,21 @@
|
||||
<div class="card">
|
||||
<div class="card-body cloud p-md-5">
|
||||
<div class="row justify-content-center mb-5 mt-3">
|
||||
<div class="col text-center">
|
||||
<img class="mb-4" src="<?php echo esc_url( plugins_url( '/assets/img/iu-logo-blue.svg', dirname( __FILE__ ) ) ); ?>" alt="Push to Cloud" height="76" width="76"/>
|
||||
<h4><?php esc_html_e( 'Infinite Uploads Setup', 'infinite-uploads' ); ?></h4>
|
||||
<p class="lead"><?php esc_html_e( "Welcome to Infinite Uploads, scalable cloud storage, encoding, and delivery for your uploads and videos made easy! Get started with a scan of your existing Media Library. Then our smart recommendations will help you chose the best plan, create or connect your account, and voilà – you're ready to push to the cloud.", 'infinite-uploads' ); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row justify-content-center mb-5">
|
||||
<div class="col text-center">
|
||||
<button class="btn text-nowrap btn-primary btn-lg" data-toggle="modal" data-target="#scan-modal"><?php esc_html_e( 'Run Scan', 'infinite-uploads' ); ?></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row justify-content-center mb-1">
|
||||
<div class="col text-center">
|
||||
<img src="<?php echo esc_url( plugins_url( '/assets/img/progress-bar-0.svg', dirname( __FILE__ ) ) ); ?>" alt="Progress steps bar" height="19" width="110"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
Reference in New Issue
Block a user