| 1 |
<?php |
| 2 |
|
| 3 |
use WPCoder\Dashboard\DBManager; |
| 4 |
use WPCoder\Dashboard\Field; |
| 5 |
use WPCoder\Dashboard\Link; |
| 6 |
use WPCoder\WOW_Plugin; |
| 7 |
|
| 8 |
defined( 'ABSPATH' ) || exit; |
| 9 |
|
| 10 |
$default = Field::getDefault(); |
| 11 |
|
| 12 |
$link = ! empty( $default['param']['link'] ) ? $default['param']['link'] : ''; |
| 13 |
|
| 14 |
$shortcode = ''; |
| 15 |
if ( ! empty( $default['id'] ) ) { |
| 16 |
$shortcode = '[' . WOW_Plugin::SHORTCODE . ' id="' . absint( $default['id'] ) . '"]'; |
| 17 |
} |
| 18 |
|
| 19 |
?> |
| 20 |
|
| 21 |
<div class="postbox "> |
| 22 |
<div class="postbox-header"> |
| 23 |
<h2 class="hndle"> |
| 24 |
<?php esc_html_e( 'Publish', 'wpcoder' ); ?> |
| 25 |
</h2> |
| 26 |
</div> |
| 27 |
|
| 28 |
<div class="inside"> |
| 29 |
|
| 30 |
<div class="submitbox wowp-sidebar" id="submitpost"> |
| 31 |
|
| 32 |
<div id="minor-publishing"> |
| 33 |
<div class="misc-pub-section wowp-sidebar-pub-section"> |
| 34 |
|
| 35 |
<div class="wowp-field has-chackbox"> |
| 36 |
<span class="label"><?php esc_html_e( 'Status', 'wpcoder' ); ?></span> |
| 37 |
<?php Field::checkbox( 'status' ); ?> |
| 38 |
<label for="status"><?php esc_html_e( 'Deactivate', 'wpcoder' ); ?></label> |
| 39 |
</div> |
| 40 |
|
| 41 |
<div class="wowp-field has-chackbox"> |
| 42 |
<span class="label"><?php esc_html_e( 'Test mode', 'wpcoder' ); ?></span> |
| 43 |
<?php Field::checkbox( 'mode' ); ?> |
| 44 |
<label for="mode"><?php esc_html_e( 'Activate', 'wpcoder' ); ?></label> |
| 45 |
</div> |
| 46 |
|
| 47 |
<div class="wowp-field has-addon border-default"> |
| 48 |
<label for="tag" class="is-addon"><span class="dashicons dashicons-tag"></span></label> |
| 49 |
<input list="wowp-tags" type="text" name="tag" id="tag" |
| 50 |
value="<?php echo esc_attr( $default['tag'] ); ?>"> |
| 51 |
<datalist id="wowp-tags"> |
| 52 |
<?php DBManager::display_tags(); ?> |
| 53 |
</datalist> |
| 54 |
</div> |
| 55 |
|
| 56 |
<div class="wowp-field has-addon border-default"> |
| 57 |
<label for="link" class="is-addon"> |
| 58 |
<?php if ( ! empty( $link ) ): ?> |
| 59 |
<a href="<?php echo esc_url( $link ); ?>" target="_blank"> |
| 60 |
<span class="dashicons dashicons-admin-links"></span> |
| 61 |
</a> |
| 62 |
<?php else: ?> |
| 63 |
<span class="dashicons dashicons-admin-links"></span> |
| 64 |
<?php endif; ?> |
| 65 |
</label> |
| 66 |
<input type="url" name="param[link]" id="link" |
| 67 |
value="<?php echo esc_url( $link ); ?>"> |
| 68 |
</div> |
| 69 |
|
| 70 |
<?php if ( ! empty( $shortcode ) ) : ?> |
| 71 |
<div class="wowp-field has-addon border-default"> |
| 72 |
<label for="shortcode" class="is-addon"> |
| 73 |
<span class="dashicons dashicons-shortcode"></span> |
| 74 |
</label> |
| 75 |
<input type="text" id="shortcode" readonly value="<?php echo esc_attr( $shortcode ); ?>"> |
| 76 |
</div> |
| 77 |
<?php endif; ?> |
| 78 |
|
| 79 |
</div> |
| 80 |
</div> |
| 81 |
<div class="major-publishing-actions" id="major-publishing-actions"> |
| 82 |
<?php if ( ! empty( $default['id'] ) ): ?> |
| 83 |
<div id="delete-action"> |
| 84 |
<a class="submitdelete deletion" |
| 85 |
href="<?php echo esc_url( Link::remove( $default['id'] ) ); ?>"> |
| 86 |
<?php esc_html_e( 'Delete', 'wpcoder' ); ?> |
| 87 |
</a> |
| 88 |
</div> |
| 89 |
<?php endif; ?> |
| 90 |
|
| 91 |
<div id="publishing-action"> |
| 92 |
<?php submit_button( null, 'primary', 'submit_settings', false ); ?> |
| 93 |
</div> |
| 94 |
<div class="clear"></div> |
| 95 |
|
| 96 |
</div> |
| 97 |
|
| 98 |
</div> |
| 99 |
</div> |
| 100 |
</div> |
| 101 |
|