Files
Testing/tbs/wp-content/plugins/age-gate/admin/partials/parts/publish-options.php
sean 0e8a8b3028
Some checks failed
deploy-testing / deploy (push) Has been cancelled
Initial testing snapshot
2026-11-17 16:15:01 -05:00

39 lines
1.4 KiB
PHP

<?php wp_nonce_field( 'ag_save_post', 'ag_settings[ag_nonce]' ); ?>
<?php include AGE_GATE_PATH . 'admin/partials/parts/custom-age.php'; ?>
<?php if($this->settings['restrictions']['restriction_type'] !== 'selected'): ?>
<?php if(current_user_can(AGE_GATE_CAP_SET_BYPASS)): ?>
<div class="misc-pub-section verify-restrict">
<label class="selectit">
<?php echo form_checkbox(
array(
'name' => "ag_settings[bypass]",
'id' => "age-bypass"
),
1, // value
checked( 1, get_post_meta( get_the_ID(), '_age_gate-bypass', true ), false ),
array('class' => 'age-gate-toggle', 'data-type' => 'bypass') // checked
); ?> <?php esc_html_e( 'Do not age restrict this content', 'age-gate' ); ?>
</label>
</div>
<?php endif; ?>
<?php else: ?>
<?php if(current_user_can(AGE_GATE_CAP_SET_CONTENT)): ?>
<div class="misc-pub-section verify-restrict">
<label class="selectit">
<?php echo form_checkbox(
array(
'name' => "ag_settings[restrict]",
'id' => "age-restricted"
),
1, // value
checked( 1, get_post_meta( get_the_ID(), '_age_gate-restrict', true ), false ),
array('class' => 'age-gate-toggle', 'data-type' => 'restrict') // checked
); ?> <?php _e('Age Gate this content', 'age-gate'); ?>
</label>
</div>
<?php endif; ?>
<?php endif; ?>