| 1 |
<?php |
| 2 |
/** |
| 3 |
* Banners on plugin settings page |
| 4 |
* |
| 5 |
* @package PDF & Print by BestWebSoft |
| 6 |
* @since 1.8.5 |
| 7 |
*/ |
| 8 |
|
| 9 |
if ( ! defined( 'ABSPATH' ) ) { |
| 10 |
exit; |
| 11 |
} |
| 12 |
|
| 13 |
if ( ! function_exists( 'pdfprnt_pro_block' ) ) { |
| 14 |
/** |
| 15 |
* Wrapper. Show ads for PRO on plugin settings page |
| 16 |
* |
| 17 |
* @param string $func Function to call. |
| 18 |
* @param boolean $show_cross When it is 'false' ad will be displayed regardless of if other blocks are closed. |
| 19 |
* @return void |
| 20 |
*/ |
| 21 |
function pdfprnt_pro_block( $func, $show_cross = true ) { |
| 22 |
global $pdfprnt_plugin_info, $wp_version, $pdfprnt_options; |
| 23 |
if ( ! bws_hide_premium_options_check( $pdfprnt_options ) || ! $show_cross ) { ?> |
| 24 |
<div class="bws_pro_version_bloc pdfprnt_pro_block <?php echo esc_attr( $func ); ?>" title="<?php esc_html_e( 'This options is available in Pro version of the plugin', 'pdf-print' ); ?>"> |
| 25 |
<div class="bws_pro_version_table_bloc"> |
| 26 |
<?php if ( $show_cross ) { ?> |
| 27 |
<button type="submit" name="bws_hide_premium_options" class="notice-dismiss bws_hide_premium_options" title="<?php esc_html_e( 'Close', 'pdf-print' ); ?>"></button> |
| 28 |
<?php } ?> |
| 29 |
<div class="bws_table_bg"></div> |
| 30 |
<?php call_user_func( $func ); ?> |
| 31 |
</div> |
| 32 |
<div class="bws_pro_version_tooltip"> |
| 33 |
<a class="bws_button" href="https://bestwebsoft.com/products/wordpress/plugins/pdf-print/?k=d9da7c9c2046bed8dfa38d005d4bffdb&pn=101&v=<?php echo esc_attr( $pdfprnt_plugin_info['Version'] ); ?>&wp_v=<?php echo esc_attr( $wp_version ); ?>" target="_blank" title="PDF & Print Pro Plugin"><?php esc_html_e( 'Upgrade to Pro', 'pdf-print' ); ?></a> |
| 34 |
</div> |
| 35 |
</div> |
| 36 |
<?php |
| 37 |
} |
| 38 |
} |
| 39 |
} |
| 40 |
|
| 41 |
if ( ! function_exists( 'pdfprnt_button_image_block' ) ) { |
| 42 |
/** |
| 43 |
* The content of ad block on the "Settings" tab |
| 44 |
* |
| 45 |
* @param array $buttons Buttons. |
| 46 |
*/ |
| 47 |
function pdfprnt_button_image_block( $buttons ) { |
| 48 |
?> |
| 49 |
<fieldset> |
| 50 |
<?php foreach ( $buttons as $button ) { ?> |
| 51 |
<div class="pdfprnt-col pdfprnt-col-2"> |
| 52 |
<label><input disabled="disabled" type="radio" /><?php esc_html_e( 'Custom', 'pdf-print' ); ?></label><br /> |
| 53 |
<input disabled="disabled" type="file" /> |
| 54 |
</div> |
| 55 |
<?php } ?> |
| 56 |
<div class="clear"></div> |
| 57 |
</fieldset> |
| 58 |
<?php |
| 59 |
} |
| 60 |
} |
| 61 |
|
| 62 |
if ( ! function_exists( 'pdfprnt_noindex_block' ) ) { |
| 63 |
/** |
| 64 |
* The content of ad block on the "Settings" tab |
| 65 |
*/ |
| 66 |
function pdfprnt_noindex_block() { |
| 67 |
?> |
| 68 |
<table class="form-table pdfprnt-table-settings pdfprnt-table-search-engine"> |
| 69 |
<tr> |
| 70 |
<th><?php esc_html_e( 'Search Engine Visibility', 'pdf-print' ); ?></th> |
| 71 |
<td> |
| 72 |
<input type="checkbox" disabled="disabled" /> |
| 73 |
<span class="bws_info"><?php esc_html_e( 'Enable to disallow search engines from indexing PDF & Print pages.', 'pdf-print' ); ?></span> |
| 74 |
</td> |
| 75 |
</tr> |
| 76 |
</table> |
| 77 |
<?php |
| 78 |
} |
| 79 |
} |
| 80 |
|
| 81 |
if ( ! function_exists( 'pdfprnt_filename_orientation_block' ) ) { |
| 82 |
/** |
| 83 |
* The content of ad block on the "Output" tab |
| 84 |
* |
| 85 |
* @param array $orientation_post_types Orientation for post types. |
| 86 |
*/ |
| 87 |
function pdfprnt_filename_orientation_block( $orientation_post_types = false ) { |
| 88 |
?> |
| 89 |
<table class="form-table pdfprnt-table-settings"> |
| 90 |
<tr> |
| 91 |
<th><?php esc_html_e( 'Default PDF File Name', 'pdf-print' ); ?></th> |
| 92 |
<td> |
| 93 |
<fieldset> |
| 94 |
<label><input disabled="disabled" type="radio" checked="checked" /> <?php esc_html_e( 'Post/page slug', 'pdf-print' ); ?></label><br> |
| 95 |
<label><input disabled="disabled" type="radio" /> <?php esc_html_e( 'Custom', 'pdf-print' ); ?></label> |
| 96 |
<div id="pdfprnt-file-name-wrap"> |
| 97 |
<input disabled="disabled" class="widefat" id="pdfprnt-file-name" type="text" name="pdfprnt_file_name" value="" maxlength="195" placeholder="{Publish_month} {Publish_date}, {Publish_year} - {Post_title} - {Site_title}" /> |
| 98 |
<div class="bws_info"><?php esc_html_e( 'File name cannot contain more than 195 symbols. The file name can include Latin letters, numbers and symbols.', 'pdf-print' ); ?></div> |
| 99 |
<div class="bws_info"> |
| 100 |
<span><?php esc_html_e( 'Available shortcodes', 'pdf-print' ); ?>:</span><br /> |
| 101 |
<span> |
| 102 |
<strong>{Publish_full_date}</strong> - <?php esc_html_e( 'The full date when the post was created', 'pdf-print' ); ?>. |
| 103 |
</span><br /> |
| 104 |
<span> |
| 105 |
<strong>{Post_title}</strong> - <?php esc_html_e( 'Title of the post.', 'pdf-print' ); ?> |
| 106 |
</span><br /> |
| 107 |
<span> |
| 108 |
<strong>{Site_title}</strong> - <?php esc_html_e( 'Title of the site.', 'pdf-print' ); ?> |
| 109 |
</span><br /> |
| 110 |
<span> |
| 111 |
<strong>{Author_display_name}</strong> - <?php esc_html_e( 'Author of the post.', 'pdf-print' ); ?> |
| 112 |
</span><br /> |
| 113 |
<span> |
| 114 |
<strong>{Publish_year}</strong> - <?php esc_html_e( 'The year when the post was created.', 'pdf-print' ); ?> |
| 115 |
</span><br /> |
| 116 |
<span> |
| 117 |
<strong>{Publish_month}</strong> - <?php esc_html_e( 'The month when the post was created.', 'pdf-print' ); ?> |
| 118 |
</span><br /> |
| 119 |
<span> |
| 120 |
<strong>{Publish_date}</strong> - <?php esc_html_e( 'The day when the post was created.', 'pdf-print' ); ?> |
| 121 |
</span><br /> |
| 122 |
</div> |
| 123 |
</fieldset> |
| 124 |
</td> |
| 125 |
</tr> |
| 126 |
<tr> |
| 127 |
<th><?php esc_html_e( 'Layout', 'pdf-print' ); ?></th> |
| 128 |
<td> |
| 129 |
<?php if ( $orientation_post_types ) { ?> |
| 130 |
<div class="pdfprnt-col"> |
| 131 |
<p><br /></p> |
| 132 |
<br /> |
| 133 |
<fieldset> |
| 134 |
<?php |
| 135 |
foreach ( $orientation_post_types as $value ) { |
| 136 |
echo '<label>' . esc_attr( $value->label ) . '</label><br />'; |
| 137 |
} |
| 138 |
?> |
| 139 |
</fieldset> |
| 140 |
</div> |
| 141 |
<?php |
| 142 |
foreach ( array( |
| 143 |
'portrait' => esc_html__( 'Portrait', 'pdf-print' ), |
| 144 |
'landscape' => esc_html__( 'Landscape', 'pdf-print' ), |
| 145 |
) as $orientation => $orientation_name ) { |
| 146 |
?> |
| 147 |
<div class="pdfprnt-col pdfprnt-col-center"> |
| 148 |
<p><strong><?php echo esc_attr( $orientation_name ); ?></strong></p> |
| 149 |
<br> |
| 150 |
<fieldset> |
| 151 |
<?php |
| 152 |
foreach ( $orientation_post_types as $key => $value ) { |
| 153 |
if ( 'attachment' !== $key ) { |
| 154 |
?> |
| 155 |
<label><input disabled="disabled" type="radio" <?php checked( 'portrait', $orientation ); ?> /></label> |
| 156 |
<br> |
| 157 |
<?php |
| 158 |
} |
| 159 |
} |
| 160 |
?> |
| 161 |
</fieldset> |
| 162 |
</div> |
| 163 |
<?php } ?> |
| 164 |
<div class="clear"></div> |
| 165 |
<?php } ?> |
| 166 |
</td> |
| 167 |
</tr> |
| 168 |
</table> |
| 169 |
<?php |
| 170 |
} |
| 171 |
} |
| 172 |
|
| 173 |
if ( ! function_exists( 'pdfprnt_woocommerce_watermark_block' ) ) { |
| 174 |
/** |
| 175 |
* The content of ad block on the "Output" tab |
| 176 |
*/ |
| 177 |
function pdfprnt_woocommerce_watermark_block() { |
| 178 |
?> |
| 179 |
<table class="form-table pdfprnt-table-settings"> |
| 180 |
<tr valign="top"> |
| 181 |
<th><?php esc_html_e( 'Single page in the PDF (Full Page Capture)', 'pdf-print' ); ?></th> |
| 182 |
<td> |
| 183 |
<label> |
| 184 |
<input type="checkbox" disabled="disabled" /> <span class="bws_info"><?php esc_html_e( 'Content will be placed on a single page if its height does not exceed 10000 px.', 'pdf-print' ); ?></span> |
| 185 |
</label> |
| 186 |
</td> |
| 187 |
</tr> |
| 188 |
<tr id="pdfprnt_remove_written" valign="top"> |
| 189 |
<th><?php esc_html_e( '"Written by" Text', 'pdf-print' ); ?></th> |
| 190 |
<td> |
| 191 |
<label> |
| 192 |
<input type="checkbox" disabled="disabled" /> |
| 193 |
<span class="bws_info"><?php esc_html_e( 'Enable to add "Written by" text before an author\'s name.', 'pdf-print' ); ?></span> |
| 194 |
</label> |
| 195 |
</td> |
| 196 |
</tr> |
| 197 |
<tr> |
| 198 |
<th><?php esc_html_e( 'WooCommerce Product Details', 'pdf-print' ); ?></th> |
| 199 |
<td> |
| 200 |
<fieldset> |
| 201 |
<label><input disabled="disabled" type="checkbox" /> <?php esc_html_e( 'Short Description', 'pdf-print' ); ?></label><br> |
| 202 |
<label><input disabled="disabled" type="checkbox" /> <?php esc_html_e( 'Price', 'pdf-print' ); ?></label><br> |
| 203 |
<label><input disabled="disabled" type="checkbox" /> <?php esc_html_e( 'SKU', 'pdf-print' ); ?></label><br> |
| 204 |
<label><input disabled="disabled" type="checkbox" /> <?php esc_html_e( 'Gallery', 'pdf-print' ); ?></label><br> |
| 205 |
<label><input disabled="disabled" type="checkbox" /> <?php esc_html_e( 'Rating', 'pdf-print' ); ?></label><br> |
| 206 |
<label><input disabled="disabled" type="checkbox" /> <?php esc_html_e( 'Stock', 'pdf-print' ); ?></label><br> |
| 207 |
<label><input disabled="disabled" type="checkbox" /> <?php esc_html_e( 'Variations', 'pdf-print' ); ?></label><br> |
| 208 |
<label><input disabled="disabled" type="checkbox" /> <?php esc_html_e( 'Categories', 'pdf-print' ); ?></label><br> |
| 209 |
<label><input disabled="disabled" type="checkbox" /> <?php esc_html_e( 'Tags', 'pdf-print' ); ?></label><br> |
| 210 |
<label><input disabled="disabled" type="checkbox" /> <?php esc_html_e( 'Additional information', 'pdf-print' ); ?></label> |
| 211 |
</fieldset> |
| 212 |
</td> |
| 213 |
</tr> |
| 214 |
<tr> |
| 215 |
<th><?php esc_html_e( 'Watermark Protection', 'pdf-print' ); ?></th> |
| 216 |
<td> |
| 217 |
<fieldset> |
| 218 |
<label><input disabled="disabled" type="radio" /> <?php esc_html_e( 'None', 'pdf-print' ); ?></label><br> |
| 219 |
<label><input disabled="disabled" type="radio" checked="checked" /> <?php esc_html_e( 'Text', 'pdf-print' ); ?></label><br> |
| 220 |
<div id="pdfprnt-watermark-text-wrap"> |
| 221 |
<textarea disabled="disabled" maxlength="100" rows="3" cols="45"></textarea> |
| 222 |
</div> |
| 223 |
<label><input disabled="disabled" type="radio" /> <?php esc_html_e( 'Image', 'pdf-print' ); ?></label> |
| 224 |
</fieldset> |
| 225 |
</td> |
| 226 |
</tr> |
| 227 |
<tr> |
| 228 |
<th><?php esc_html_e( 'Watermark Opacity', 'pdf-print' ); ?></th> |
| 229 |
<td> |
| 230 |
<fieldset> |
| 231 |
<input id="pdfprnt-watermark-opacity" disabled="disabled" type="number" /> |
| 232 |
<div id="pdfprnt_watermark_opacity_wrap"> |
| 233 |
<span id="pdfprnt_watermark_opacity_value"></span> |
| 234 |
<div id="pdfprnt_watermark_opacity_slider"></div> |
| 235 |
</div> |
| 236 |
</fieldset> |
| 237 |
</td> |
| 238 |
</tr> |
| 239 |
<tr> |
| 240 |
<th><?php esc_html_e( 'Prevent Copying', 'pdf-print' ); ?></th> |
| 241 |
<td> |
| 242 |
<label> |
| 243 |
<input type="checkbox" disabled="disabled" /> |
| 244 |
<span class="bws_info"><?php esc_html_e( 'Enable to prevent PDF files from being copied.', 'pdf-print' ); ?></span> |
| 245 |
</label> |
| 246 |
</td> |
| 247 |
</tr> |
| 248 |
<tr> |
| 249 |
<th><?php esc_html_e( 'Show Advanced Custom Fields', 'pdf-print' ); ?></th> |
| 250 |
<td> |
| 251 |
<label> |
| 252 |
<input type="checkbox" disabled="disabled" /> |
| 253 |
<span class="bws_info"><?php esc_html_e( 'Enable to show all Advanced Custom Fields.', 'pdf-print' ); ?></span> |
| 254 |
</label> |
| 255 |
</td> |
| 256 |
</tr> |
| 257 |
</table> |
| 258 |
<?php |
| 259 |
} |
| 260 |
} |
| 261 |
|
| 262 |
if ( ! function_exists( 'pdfprnt_fancytree_block' ) ) { |
| 263 |
/** |
| 264 |
* Fancytree block on settings page |
| 265 |
*/ |
| 266 |
function pdfprnt_fancytree_block() { |
| 267 |
?> |
| 268 |
<p><?php esc_html_e( 'Choose the necessary post types (or single pages) where PDF & Print buttons will be displayed', 'pdf-print' ); ?>:</p> |
| 269 |
<p class="bws_jstree_url_wrap"> |
| 270 |
<label> |
| 271 |
<input disabled="disabled" type="checkbox" checked="checked" /> |
| 272 |
<?php esc_html_e( 'Show URL', 'pdf-print' ); ?> |
| 273 |
</label> |
| 274 |
</p> |
| 275 |
<img src="<?php echo esc_url( plugins_url( 'images/pro_screen_1.png', dirname( __FILE__ ) ) ); ?>"> |
| 276 |
<?php |
| 277 |
} |
| 278 |
} |
| 279 |
|
| 280 |
if ( ! function_exists( 'pdfprnt_custom_fields_block' ) ) { |
| 281 |
/** |
| 282 |
* Custom fileds block on settings page |
| 283 |
*/ |
| 284 |
function pdfprnt_custom_fields_block() { |
| 285 |
?> |
| 286 |
<div class="pdfprnt-custom-fields-tab-title"> |
| 287 |
<?php esc_html_e( 'Available Registered Post Types:', 'pdf-print' ); ?> |
| 288 |
</div> |
| 289 |
<div class="pdfprnt-custom-fields-tab-desc"> |
| 290 |
<?php esc_html_e( "Add custom fields and custom data before/after PDF & Print document's content", 'pdf-print' ); ?> |
| 291 |
</div> |
| 292 |
<div class="pdfprnt-custom-accordion"> |
| 293 |
<h3><?php esc_html_e( 'Posts', 'pdf-print' ); ?></h3> |
| 294 |
<div> |
| 295 |
<div> |
| 296 |
<div class="pdfprnt-before-after-title"> |
| 297 |
<?php esc_html_e( 'Data Before Content', 'pdf-print' ); ?> |
| 298 |
</div> |
| 299 |
<div class="pdfprnt-content-before-title"> |
| 300 |
<label><input type="checkbox" disabled="disabled"/> <?php esc_html_e( 'Enable to show data before page title', 'pdf-print' ); ?></label>. |
| 301 |
<br /> |
| 302 |
<br /> |
| 303 |
</div> |
| 304 |
<img class="pdfprnt_banner_accordion" src="<?php echo esc_url( plugins_url( 'images/pro_screen_2.png', dirname( __FILE__ ) ) ); ?>"> |
| 305 |
<div class="pdfprnt-before-after-title"> |
| 306 |
<?php esc_html_e( 'Data After Content', 'pdf-print' ); ?> |
| 307 |
</div> |
| 308 |
<img class="pdfprnt_banner_accordion" src="<?php echo esc_url( plugins_url( 'images/pro_screen_2.png', dirname( __FILE__ ) ) ); ?>"> |
| 309 |
<table class="form-table"> |
| 310 |
<tr> |
| 311 |
<th scope="row"><?php esc_html_e( 'Custom Fields Displaying', 'pdf-print' ); ?></th> |
| 312 |
<td> |
| 313 |
<fieldset> |
| 314 |
<label> |
| 315 |
<input disabled="disabled" type="radio" > <?php esc_html_e( 'Default', 'pdf-print' ); ?> |
| 316 |
<br /> |
| 317 |
<span class="pdfprnt-custom-fields-commentary"> |
| 318 |
<?php esc_html_e( 'Custom fields are shown by default. You can hide them using "Do not show PDF & Print Custom fields" option.', 'pdf-print' ); ?> |
| 319 |
</span> |
| 320 |
</label> |
| 321 |
<br> |
| 322 |
<label> |
| 323 |
<input disabled="disabled" type="radio"> <?php esc_html_e( 'Force Hide', 'pdf-print' ); ?> |
| 324 |
<br /> |
| 325 |
<span class="pdfprnt-custom-fields-commentary"> |
| 326 |
<?php esc_html_e( 'Custom fields are hidden even if the "Show PDF & Print Custom Fields" option is enabled.', 'pdf-print' ); ?> |
| 327 |
</span> |
| 328 |
</label> |
| 329 |
<br> |
| 330 |
<label> |
| 331 |
<input disabled="disabled" type="radio" > <?php esc_html_e( 'Force Show', 'pdf-print' ); ?> |
| 332 |
<br /> |
| 333 |
<span class="pdfprnt-custom-fields-commentary"> |
| 334 |
<?php esc_html_e( 'Custom fields are visible even if the "Show PDF & Print Custom Fields" option is disabled.', 'pdf-print' ); ?> |
| 335 |
</span> |
| 336 |
</label> |
| 337 |
</fieldset> |
| 338 |
</td> |
| 339 |
</tr> |
| 340 |
<tr> |
| 341 |
<th scope="row"><?php esc_html_e( 'Disable the "Show PDF & Print Custom Fields" option', 'pdf-print' ); ?></th> |
| 342 |
<td> |
| 343 |
<button name="pdfprnt_clean_custom_fields_for_all" class="button"> |
| 344 |
<?php esc_html_e( 'Disable Now', 'pdf-print' ); ?> |
| 345 |
</button> |
| 346 |
<div class="bws_info"><?php esc_html_e( 'Disable the "Show PDF & Print Custom Fields" option for all Posts.', 'pdf-print' ); ?></div> |
| 347 |
</td> |
| 348 |
</tr> |
| 349 |
</table> |
| 350 |
</div> |
| 351 |
</div> |
| 352 |
<h3><?php esc_html_e( 'Pages', 'pdf-print' ); ?></h3> |
| 353 |
<h3><?php esc_html_e( 'Products', 'pdf-print' ); ?></h3> |
| 354 |
</div> |
| 355 |
<?php |
| 356 |
} |
| 357 |
} |
| 358 |
|
| 359 |
if ( ! function_exists( 'pdfprnt_headers_footers_list_block' ) ) { |
| 360 |
/** |
| 361 |
* The content of ad block on the Headers & Footers page |
| 362 |
* |
| 363 |
* @param string $date_format Date format. |
| 364 |
*/ |
| 365 |
function pdfprnt_headers_footers_list_block( $date_format ) { |
| 366 |
global $wp_version; |
| 367 |
$old_wp_version = ( version_compare( $wp_version, '4.3', '<' ) ); |
| 368 |
?> |
| 369 |
<ul class="subsubsub"> |
| 370 |
<li class="all"><a class="current" href="#"><?php esc_html_e( 'All', 'pdf-print' ); ?><span class="count"> ( 3 )</span></a> |</li> |
| 371 |
<li class="trash"><a href="#"><?php esc_html_e( 'Trash', 'pdf-print' ); ?><span class="count"> ( 0 )</span></a></li> |
| 372 |
</ul> |
| 373 |
<p class="search-box"> |
| 374 |
<label class="screen-reader-text" for="pdfprnt-search-input"><?php esc_html_e( 'search', 'pdf-print' ); ?>:</label> |
| 375 |
<input disabled="disabled" type="search" name="s" id="pdfprnt-search-input" /> |
| 376 |
<input disabled="disabled" type="submit" id="search-submit" class="button" value="<?php esc_html_e( 'search', 'pdf-print' ); ?>" /> |
| 377 |
</p> |
| 378 |
<div class="tablenav top"> |
| 379 |
<div class="alignleft actions bulkactions"> |
| 380 |
<select disabled="disabled" name="action" id="bulk-action-selector-top"> |
| 381 |
<option value="-1"><?php esc_html_e( 'Bulk Actions', 'pdf-print' ); ?></option> |
| 382 |
<option value="trash"><?php esc_html_e( 'Trash', 'pdf-print' ); ?></option> |
| 383 |
</select> |
| 384 |
<input disabled="disabled" type="submit" id="doaction" class="button action" value="<?php esc_html_e( 'Apply', 'pdf-print' ); ?>" /> |
| 385 |
</div> |
| 386 |
<div class="tablenav-pages one-page"> |
| 387 |
<span class="displaying-num">3 <?php esc_html_e( 'items', 'pdf-print' ); ?></span> |
| 388 |
</div> |
| 389 |
<br class="clear"> |
| 390 |
</div> |
| 391 |
<table class="wp-list-table widefat fixed striped headersfooters |
| 392 |
<?php |
| 393 |
if ( $old_wp_version ) { |
| 394 |
echo ' pdfprnt_old_wp';} |
| 395 |
?> |
| 396 |
"> |
| 397 |
<thead> |
| 398 |
<tr> |
| 399 |
<?php printf( '<%s id="cb" class="manage-column column-cb check-column">', ( $old_wp_version ? 'th' : 'td' ) ); ?> |
| 400 |
<label class="screen-reader-text" for="cb-select-all-1"><?php esc_html_e( 'Select All', 'pdf-print' ); ?></label> |
| 401 |
<input disabled="disabled" id="cb-select-all-1" type="checkbox" /> |
| 402 |
<?php printf( '</%s>', ( $old_wp_version ? 'th' : 'td' ) ); ?> |
| 403 |
<th scope="col" id="title" class="manage-column column-title column-primary sortable desc"> |
| 404 |
<a href="#"><span><?php esc_html_e( 'Title', 'pdf-print' ); ?></span><span class="sorting-indicator"></span></a> |
| 405 |
</th> |
| 406 |
<th scope="col" id="pdf" class="manage-column column-pdf">PDF</th> |
| 407 |
<th scope="col" id="print" class="manage-column column-print">Print</th> |
| 408 |
<th scope="col" id="date" class="manage-column column-date sortable desc"> |
| 409 |
<a href="#"> |
| 410 |
<span><?php esc_html_e( 'Date Added', 'pdf-print' ); ?></span> |
| 411 |
<span class="sorting-indicator"></span> |
| 412 |
</a> |
| 413 |
</th> |
| 414 |
</tr> |
| 415 |
</thead> |
| 416 |
<tbody id="the-list" data-wp-lists="list:headerfooter"> |
| 417 |
<tr> |
| 418 |
<th scope="row" class="check-column"> |
| 419 |
<input disabled="disabled" id="cb_19" type="checkbox" /> |
| 420 |
</th> |
| 421 |
<td class="title column-title has-row-actions column-primary" data-colname="Title"> |
| 422 |
<strong><a href="#">Template for PDF</a></strong> |
| 423 |
<div class="row-actions"> |
| 424 |
<span class="edit"><a href="#"><?php esc_html_e( 'Edit', 'pdf-print' ); ?></a> | </span> |
| 425 |
<span class="trash"><a class="submitdelete" href="#"><?php esc_html_e( 'Trash', 'pdf-print' ); ?></a></span> |
| 426 |
</div> |
| 427 |
<?php if ( ! $old_wp_version ) { ?> |
| 428 |
<button type="button" class="toggle-row"></button> |
| 429 |
<button type="button" class="toggle-row"></button> |
| 430 |
<?php } ?> |
| 431 |
</td> |
| 432 |
<td class="pdf column-pdf" data-colname="PDF"> |
| 433 |
<input disabled="disabled" type="radio" /> |
| 434 |
</td> |
| 435 |
<td class="print column-print" data-colname="Print"> |
| 436 |
<input disabled="disabled" type="radio" /> |
| 437 |
</td> |
| 438 |
<td class="date column-date" data-colname="<?php esc_html_e( 'Date Added', 'pdf-print' ); ?>"><?php echo esc_html( date_i18n( $date_format, strtotime( 'May 3, 2017' ) ) ); ?></td> |
| 439 |
</tr> |
| 440 |
<tr> |
| 441 |
<th scope="row" class="check-column"> |
| 442 |
<input disabled="disabled" id="cb_18" type="checkbox" /> |
| 443 |
</th> |
| 444 |
<td class="title column-title has-row-actions column-primary" data-colname="Title"> |
| 445 |
<strong><a href="#">New template</a></strong> |
| 446 |
<div class="row-actions"> |
| 447 |
<span class="edit"><a href="#"><?php esc_html_e( 'Edit', 'pdf-print' ); ?></a> | </span> |
| 448 |
<span class="trash"><a class="submitdelete" href="#"><?php esc_html_e( 'Trash', 'pdf-print' ); ?></a></span> |
| 449 |
</div> |
| 450 |
<?php if ( ! $old_wp_version ) { ?> |
| 451 |
<button type="button" class="toggle-row"></button> |
| 452 |
<button type="button" class="toggle-row"></button> |
| 453 |
<?php } ?> |
| 454 |
</td> |
| 455 |
<td class="pdf column-pdf" data-colname="PDF"> |
| 456 |
<input disabled="disabled" type="radio" /> |
| 457 |
</td> |
| 458 |
<td class="print column-print" data-colname="Print"> |
| 459 |
<input disabled="disabled" type="radio" /> |
| 460 |
</td> |
| 461 |
<td class="date column-date" data-colname="<?php esc_html_e( 'Date Added', 'pdf-print' ); ?>"><?php echo esc_html( date_i18n( $date_format, strtotime( 'April 25, 2017' ) ) ); ?></td> |
| 462 |
</tr> |
| 463 |
<tr> |
| 464 |
<th scope="row" class="check-column"> |
| 465 |
<input disabled="disabled" id="cb_1" type="checkbox" /> |
| 466 |
</th> |
| 467 |
<td class="title column-title has-row-actions column-primary" data-colname="Title"> |
| 468 |
<strong><a href="#">Custom template</a></strong> |
| 469 |
<div class="row-actions"> |
| 470 |
<span class="edit"><a href="#"><?php esc_html_e( 'Edit', 'pdf-print' ); ?></a> | </span> |
| 471 |
<span class="trash"><a class="submitdelete" href="#"><?php esc_html_e( 'Trash', 'pdf-print' ); ?></a></span> |
| 472 |
</div> |
| 473 |
<?php if ( ! $old_wp_version ) { ?> |
| 474 |
<button type="button" class="toggle-row"></button> |
| 475 |
<button type="button" class="toggle-row"></button> |
| 476 |
<?php } ?> |
| 477 |
</td> |
| 478 |
<td class="pdf column-pdf" data-colname="PDF"> |
| 479 |
<input disabled="disabled" type="radio" /> |
| 480 |
</td> |
| 481 |
<td class="print column-print" data-colname="Print"> |
| 482 |
<input disabled="disabled" type="radio" /> |
| 483 |
</td> |
| 484 |
<td class="date column-date" data-colname="<?php esc_html_e( 'Date Added', 'pdf-print' ); ?>"><?php echo esc_html( date_i18n( $date_format, strtotime( 'April 25, 2017' ) ) ); ?></td> |
| 485 |
</tr> |
| 486 |
</tbody> |
| 487 |
<tfoot> |
| 488 |
<tr> |
| 489 |
<?php printf( '<%s class="manage-column column-cb check-column">', ( $old_wp_version ? 'th' : 'td' ) ); ?> |
| 490 |
<input disabled="disabled" id="cb-select-all-2" type="checkbox" /> |
| 491 |
<?php printf( '</%s>', ( $old_wp_version ? 'th' : 'td' ) ); ?> |
| 492 |
<th scope="col" class="manage-column column-title column-primary sortable desc"> |
| 493 |
<a href="#"> |
| 494 |
<span><?php esc_html_e( 'Title', 'pdf-print' ); ?></span> |
| 495 |
<span class="sorting-indicator"></span> |
| 496 |
</a> |
| 497 |
</th> |
| 498 |
<th scope="col" class="manage-column column-pdf">PDF</th> |
| 499 |
<th scope="col" class="manage-column column-print">Print</th> |
| 500 |
<th scope="col" class="manage-column column-date sortable desc"> |
| 501 |
<a href="#"> |
| 502 |
<span><?php esc_html_e( 'Date Added', 'pdf-print' ); ?></span> |
| 503 |
<span class="sorting-indicator"></span> |
| 504 |
</a> |
| 505 |
</th> |
| 506 |
</tr> |
| 507 |
</tfoot> |
| 508 |
</table> |
| 509 |
<div class="tablenav bottom"> |
| 510 |
<div class="alignleft actions bulkactions"> |
| 511 |
<select disabled="disabled" name="action2" id="bulk-action-selector-bottom"> |
| 512 |
<option value="-1"><?php esc_html_e( 'Bulk Actions', 'pdf-print' ); ?></option> |
| 513 |
<option value="trash"><?php esc_html_e( 'Trash', 'pdf-print' ); ?></option> |
| 514 |
</select> |
| 515 |
<input disabled="disabled" type="submit" id="doaction2" class="button action" value="<?php esc_html_e( 'Apply', 'pdf-print' ); ?>" /> |
| 516 |
</div> |
| 517 |
<div class="tablenav-pages one-page"> |
| 518 |
<span class="displaying-num">3 <?php esc_html_e( 'items', 'pdf-print' ); ?></span> |
| 519 |
</div> |
| 520 |
<br class="clear"> |
| 521 |
</div> |
| 522 |
<?php |
| 523 |
} |
| 524 |
} |
| 525 |
|
| 526 |
if ( ! function_exists( 'pdfprnt_headers_footers_editor_block' ) ) { |
| 527 |
/** |
| 528 |
* The content of ad block on the Headers & Footers page |
| 529 |
*/ |
| 530 |
function pdfprnt_headers_footers_editor_block() { |
| 531 |
?> |
| 532 |
<div id="poststuff"> |
| 533 |
<div id="post-body" class="metabox-holder columns-2"> |
| 534 |
<div id="post-body-content" style="position: relative;"> |
| 535 |
<div id="pdfprnt_template_page"> |
| 536 |
<div id="titlediv"> |
| 537 |
<div id="titlewrap"> |
| 538 |
<input disabled="disabled" type="text" disabled="disabled" id="title" placeholder="<?php esc_html_e( 'Enter Title', 'pdf-print' ); ?>" /> |
| 539 |
</div> |
| 540 |
</div> |
| 541 |
<div class="pdfprnt-template-editor"> |
| 542 |
<h3 class="pdfprnt-template-editor-title"><span><?php esc_html_e( 'Header', 'pdf-print' ); ?></span></h3> |
| 543 |
<div class="clear"></div> |
| 544 |
<div class="postarea wp-editor-expand"> |
| 545 |
<?php |
| 546 |
if ( function_exists( 'wp_editor' ) ) { |
| 547 |
$settings = array( |
| 548 |
'wpautop' => 1, |
| 549 |
'media_buttons' => 1, |
| 550 |
'textarea_name' => 'pdfprnt_top', |
| 551 |
'textarea_rows' => 5, |
| 552 |
'tabindex' => null, |
| 553 |
'editor_css' => '<style>.mce-content-body { width: 100%; max-width: 100%; background: red;}</style>', |
| 554 |
'editor_class' => 'pdfprnt_top', |
| 555 |
'teeny' => 0, |
| 556 |
'dfw' => 0, |
| 557 |
'tinymce' => 1, |
| 558 |
'quicktags' => 1, |
| 559 |
); |
| 560 |
wp_editor( '', 'pdfprnt_top', $settings ); |
| 561 |
} else { |
| 562 |
?> |
| 563 |
<textarea disabled="disabled" class="pdfprnt_top_area" rows="5" autocomplete="off" cols="40" name="pdfprnt_top" id="pdfprnt_top"></textarea> |
| 564 |
<?php } ?> |
| 565 |
</div> |
| 566 |
<div class="pdfprnt-template-editor-shortcodes"> |
| 567 |
<span><?php esc_html_e( 'Available shortcodes', 'pdf-print' ); ?>:</span><br /> |
| 568 |
<span> |
| 569 |
<strong>{PAGENO}</strong> - <?php esc_html_e( 'Current page number (for PDF only)', 'pdf-print' ); ?>. |
| 570 |
</span><br /> |
| 571 |
<span> |
| 572 |
<strong>{TITLE}</strong> - <?php esc_html_e( 'Title of the post (for single posts or pages only)', 'pdf-print' ); ?>. |
| 573 |
</span><br /> |
| 574 |
<span> |
| 575 |
<strong>{PAGETOTAL}</strong> - <?php esc_html_e( 'Number of all pages in the document (for PDF only)', 'pdf-print' ); ?>. |
| 576 |
</span><br /> |
| 577 |
<span> |
| 578 |
<strong>{PAGEURL}</strong> - <?php esc_html_e( 'Link to the page where the document was generated', 'pdf-print' ); ?>. |
| 579 |
</span><br /> |
| 580 |
<span> |
| 581 |
<strong>{DATE}</strong> - <?php esc_html_e( 'Current date', 'pdf-print' ); ?>. |
| 582 |
</span><br /> |
| 583 |
<span> |
| 584 |
<strong>{POSTDATE}</strong> - <?php esc_html_e( 'The date when the post was created', 'pdf-print' ); ?> (<?php esc_html_e( 'this shortcode will be replaced to the current date on search or archive pages', 'pdf-print' ); ?>). |
| 585 |
</span> |
| 586 |
<span> |
| 587 |
<?php esc_html_e( 'You can specify your own DateTime format for {DATE} and {POSTDATE} shortcodes. For example', 'pdf-print' ); ?>: |
| 588 |
</span> |
| 589 |
<code>{DATE l, F j, Y g:i a}</code> <?php esc_html_e( 'or', 'pdf-print' ); ?> <code>{POSTDATE l, F j, Y g:i a}</code> |
| 590 |
<a target="_blank" href="https://codex.wordpress.org/Formatting_Date_and_Time"><?php esc_html_e( 'Learn More', 'pdf-print' ); ?></a><br /> |
| 591 |
<span> |
| 592 |
<strong>{POSTAUTHOR}</strong> - <?php echo esc_html__( 'Author of the post', 'pdf-print' ) . ' (' . esc_html__( 'for single posts or pages only', 'pdf-print' ); ?>). |
| 593 |
</span> |
| 594 |
</div><!-- .pdfprnt-template-editor-shortcodes --> |
| 595 |
</div> |
| 596 |
<div class="pdfprnt-template-editor"> |
| 597 |
<h3 class="pdfprnt-template-editor-title"><span><?php esc_html_e( 'Footer', 'pdf-print' ); ?></span></h3> |
| 598 |
<div class="clear"></div> |
| 599 |
<div class="postarea wp-editor-expand"> |
| 600 |
<?php |
| 601 |
if ( function_exists( 'wp_editor' ) ) { |
| 602 |
$settings = array( |
| 603 |
'wpautop' => 1, |
| 604 |
'media_buttons' => 1, |
| 605 |
'textarea_name' => 'pdfprnt_bottom', |
| 606 |
'textarea_rows' => 5, |
| 607 |
'tabindex' => null, |
| 608 |
'editor_css' => '', |
| 609 |
'editor_class' => 'pdfprnt_bottom', |
| 610 |
'teeny' => 0, |
| 611 |
'dfw' => 0, |
| 612 |
'tinymce' => 1, |
| 613 |
'quicktags' => 1, |
| 614 |
); |
| 615 |
wp_editor( '', 'pdfprnt_bottom', $settings ); |
| 616 |
} else { |
| 617 |
?> |
| 618 |
<textarea disabled="disabled" class="pdfprnt_bottom_area" rows="5" autocomplete="off" cols="40" name="pdfprnt_bottom" id="pdfprnt_bottom"></textarea> |
| 619 |
<?php } ?> |
| 620 |
</div> |
| 621 |
<div class="pdfprnt-template-editor-shortcodes"> |
| 622 |
<span><?php esc_html_e( 'Available shortcodes', 'pdf-print' ); ?>:</span><br /> |
| 623 |
<span> |
| 624 |
<strong>{PAGENO}</strong> - <?php esc_html_e( 'Current page number (for PDF only)', 'pdf-print' ); ?>. |
| 625 |
</span><br /> |
| 626 |
<span> |
| 627 |
<strong>{TITLE}</strong> - <?php esc_html_e( 'Title of the post (for single posts or pages only)', 'pdf-print' ); ?>. |
| 628 |
</span><br /> |
| 629 |
<span> |
| 630 |
<strong>{PAGETOTAL}</strong> - <?php esc_html_e( 'Number of all pages in the document (for PDF only)', 'pdf-print' ); ?>. |
| 631 |
</span><br /> |
| 632 |
<span> |
| 633 |
<strong>{PAGEURL}</strong> - <?php esc_html_e( 'Link to the page where the document was generated', 'pdf-print' ); ?>. |
| 634 |
</span><br /> |
| 635 |
<span> |
| 636 |
<strong>{DATE}</strong> - <?php esc_html_e( 'Current date', 'pdf-print' ); ?>. |
| 637 |
</span><br /> |
| 638 |
<span> |
| 639 |
<strong>{POSTDATE}</strong> - <?php esc_html_e( 'The date when the post was created', 'pdf-print' ); ?> (<?php esc_html_e( 'this shortcode will be replaced to the current date on search or archive pages', 'pdf-print' ); ?>). |
| 640 |
</span> |
| 641 |
<span> |
| 642 |
<?php esc_html_e( 'You can specify your own DateTime format for {DATE} and {POSTDATE} shortcodes. For example', 'pdf-print' ); ?>: |
| 643 |
</span> |
| 644 |
<code>{DATE l, F j, Y g:i a}</code> <?php esc_html_e( 'or', 'pdf-print' ); ?> <code>{POSTDATE l, F j, Y g:i a}</code> |
| 645 |
<a target="_blank" href="https://codex.wordpress.org/Formatting_Date_and_Time"><?php esc_html_e( 'Learn More', 'pdf-print' ); ?></a><br /> |
| 646 |
<span> |
| 647 |
<strong>{POSTAUTHOR}</strong> - <?php echo esc_html__( 'Author of the post', 'pdf-print' ) . ' (' . esc_html__( 'for single posts or pages only', 'pdf-print' ); ?>). |
| 648 |
</span> |
| 649 |
</div><!-- .pdfprnt-template-editor-shortcodes --> |
| 650 |
</div> |
| 651 |
</div> |
| 652 |
</div> |
| 653 |
<div id="postbox-container-1" class="postbox-container"> |
| 654 |
<div id="side-sortables"> |
| 655 |
<div id="submitdiv" class="postbox "> |
| 656 |
<h3 class="hndle" style="cursor: default !important;"> |
| 657 |
<span><?php esc_html_e( 'Publish', 'pdf-print' ); ?></span> |
| 658 |
</h3> |
| 659 |
<div class="inside"> |
| 660 |
<div class="submitbox" id="submitpost"> |
| 661 |
<div id="minor-publishing"> |
| 662 |
<div id="misc-publishing-actions"> |
| 663 |
<div class="misc-pub-section misc-pub-post-status"> |
| 664 |
<label for="post_status"><?php esc_html_e( 'Status', 'pdf-print' ); ?>:</label> <span id="post-status-display"><?php esc_html_e( 'New', 'pdf-print' ); ?></span> |
| 665 |
</div> |
| 666 |
<div class="misc-pub-section curtime misc-pub-curtime"> |
| 667 |
<span id="timestamp"> |
| 668 |
<?php printf( ' %s <b>%s</b>', esc_html__( 'Publish', 'pdf-print' ), esc_html__( 'immediately', 'pdf-print' ) ); ?> |
| 669 |
</span> |
| 670 |
</div> |
| 671 |
</div> |
| 672 |
</div> |
| 673 |
<div id="major-publishing-actions"> |
| 674 |
<div id="delete-action"></div> |
| 675 |
<div id="publishing-action"> |
| 676 |
<input disabled="disabled" name="pdfprnt_template_submit" type="submit" class="button-primary" value="<?php esc_html_e( 'Save Changes', 'pdf-print' ); ?>" /> |
| 677 |
</div> |
| 678 |
<div class="clear"></div> |
| 679 |
</div> |
| 680 |
</div> |
| 681 |
</div> |
| 682 |
</div> |
| 683 |
</div> |
| 684 |
</div> |
| 685 |
<div class="clear"></div> |
| 686 |
</div> |
| 687 |
</div> |
| 688 |
<?php |
| 689 |
} |
| 690 |
} |
| 691 |
|