| 1 |
<?php |
| 2 |
/** |
| 3 |
* Display banners on settings page |
| 4 |
* @package PDF & Print |
| 5 |
* @since 1.8.5 |
| 6 |
*/ |
| 7 |
|
| 8 |
/** |
| 9 |
* Show ads for PRO |
| 10 |
* @param string $func function to call |
| 11 |
* @return void |
| 12 |
*/ |
| 13 |
if ( ! function_exists( 'pdfprnt_pro_block' ) ) { |
| 14 |
function pdfprnt_pro_block( $func, $show_cross = true ) { |
| 15 |
global $pdfprnt_plugin_info, $wp_version, $pdfprnt_options_array; |
| 16 |
if ( ! bws_hide_premium_options_check( $pdfprnt_options_array ) || ! $show_cross ) { ?> |
| 17 |
<div class="bws_pro_version_bloc pdfprnt_pro_block <?php echo $func;?>" title="<?php _e( 'This options is available in Pro version of plugin', 'pdf-print' ); ?>"> |
| 18 |
<div class="bws_pro_version_table_bloc"> |
| 19 |
<?php if ( $show_cross ) { ?> |
| 20 |
<button type="submit" name="bws_hide_premium_options" class="notice-dismiss bws_hide_premium_options" title="<?php _e( 'Close', 'pdf-print' ); ?>"></button> |
| 21 |
<?php } ?> |
| 22 |
<div class="bws_table_bg"></div> |
| 23 |
<?php call_user_func( $func ); ?> |
| 24 |
</div> |
| 25 |
<div class="bws_pro_version_tooltip"> |
| 26 |
<div class="bws_info"><?php _e( 'Unlock premium options by upgrading to Pro version', 'pdf-print' ); ?></div> |
| 27 |
<a class="bws_button" href="http://bestwebsoft.com/products/pdf-print/?k=d9da7c9c2046bed8dfa38d005d4bffdb&pn=101&v=<?php echo $pdfprnt_plugin_info["Version"]; ?>&wp_v=<?php echo $wp_version; ?>" target="_blank" title="PDF & Print Pro Plugin"><?php _e( 'Learn More', 'pdf-print' ); ?></a> |
| 28 |
</div> |
| 29 |
</div> |
| 30 |
<?php } |
| 31 |
} |
| 32 |
} |
| 33 |
|
| 34 |
if ( ! function_exists( 'pdfprnt_image_block' ) ) { |
| 35 |
function pdfprnt_image_block() { ?> |
| 36 |
<table class="form-table bws_pro_version"> |
| 37 |
<tr class="pdfprnt_table_head"> |
| 38 |
<th scope="row"></th> |
| 39 |
<th><?php _e( 'Posts and pages', 'pdf-print' ); ?></th> |
| 40 |
<th><?php _e( 'Search and archive pages', 'pdf-print' ); ?></th> |
| 41 |
</tr> |
| 42 |
<tr class="pdfprnt_layout"> |
| 43 |
<th scope="row"><?php _e( 'Layout', 'pdf-print' ); ?></th> |
| 44 |
<td> |
| 45 |
<fieldset> |
| 46 |
<label><input disabled="disabled" type="radio" value="portrait" checked="checked" /> <?php _e( "Portrait", 'pdf-print' ); ?></label><br/> |
| 47 |
<label><input disabled="disabled" type="radio" value="landscape" /> <?php _e( "Landscape", 'pdf-print' ); ?></label> |
| 48 |
</fieldset> |
| 49 |
</td> |
| 50 |
<td> |
| 51 |
<fieldset> |
| 52 |
<label><input disabled="disabled" type="radio" value="portrait" checked="checked" /> <?php _e( "Portrait", 'pdf-print' ); ?></label><br/> |
| 53 |
<label><input disabled="disabled" type="radio" value="landscape" /> <?php _e( "Landscape", 'pdf-print' ); ?></label> |
| 54 |
</fieldset> |
| 55 |
</td> |
| 56 |
</tr> |
| 57 |
<?php $buttons = array( |
| 58 |
array( 'title' => __( 'PDF button image', 'pdf-print' ), 'image' => 'pdf.png' ), |
| 59 |
array( 'title' => __( 'Print button image', 'pdf-print' ), 'image' => 'print.gif' ) |
| 60 |
); |
| 61 |
foreach ( $buttons as $button ) { ?> |
| 62 |
<tr> |
| 63 |
<th scope="row"><?php echo $button['title']; ?></th> |
| 64 |
<td> |
| 65 |
<select disabled="disabled" style="min-width: 120px;"> |
| 66 |
<option value="1"><?php _e( 'Custom', 'pdf-print' ); ?></option> |
| 67 |
</select> |
| 68 |
</td> |
| 69 |
</tr> |
| 70 |
<tr> |
| 71 |
<th scope="row"></th> |
| 72 |
<td><input type="file" disabled="disabled" /></td> |
| 73 |
</tr> |
| 74 |
<tr> |
| 75 |
<th scope="row"></th> |
| 76 |
<td> |
| 77 |
<span><?php _e( 'Current image', 'pdf-print' ); ?>:</span> |
| 78 |
<img alt="Default Image" src="<?php echo plugins_url( "images/" . $button['image'], dirname( __FILE__ ) ); ?>" /> |
| 79 |
</td> |
| 80 |
</tr> |
| 81 |
<?php } ?> |
| 82 |
<tr> |
| 83 |
<th scope="row"><?php _e( 'PDF files name', 'pdf-print' ); ?></th> |
| 84 |
<td> |
| 85 |
<fieldset> |
| 86 |
<label><input disabled="disabled" type="radio" /> <?php _e( 'Use post or page slug', 'pdf-print' ); ?></label><br /> |
| 87 |
<input type="radio" disabled="disabled" /><input disabled="disabled" type="text" value="mpdf" /><br /> |
| 88 |
<span class="bws_info"> |
| 89 |
<?php _e( 'File name cannot contain more than 195 symbols. The file name can include Latin letters, numbers and symbols "-" , "_" only.', 'pdf-print' ) ?> |
| 90 |
</span> |
| 91 |
</fieldset> |
| 92 |
</td> |
| 93 |
</tr> |
| 94 |
<tr> |
| 95 |
<th scope="row"><?php _e( 'Do not index pdf and print pages', 'pdf-print' ); ?></th> |
| 96 |
<td> |
| 97 |
<input type="checkbox" disabled="disabled" /> |
| 98 |
</td> |
| 99 |
</tr> |
| 100 |
<tr> |
| 101 |
<th scope="row" colspan="2"> |
| 102 |
* <?php _e( 'If you upgrade to Pro version, all your settings will be saved.', 'pdf-print' ); ?> |
| 103 |
</th> |
| 104 |
</tr> |
| 105 |
</table> |
| 106 |
<?php } |
| 107 |
} |
| 108 |
|
| 109 |
if ( ! function_exists( 'pdfprnt_woocommerce_block' ) ) { |
| 110 |
function pdfprnt_woocommerce_block () { ?> |
| 111 |
<table class="form-table bws_pro_version"> |
| 112 |
<tr class="pdfprnt_watermark_row"><th scope="row"><?php _e( 'Watermark', 'pdf-print' ); ?></th> |
| 113 |
<td> |
| 114 |
<input disabled="disabled" type="radio"> |
| 115 |
<label for="pdfprnt_no_watermark"> |
| 116 |
<?php _e( 'None', 'pdf-print' ); ?> |
| 117 |
</label> |
| 118 |
</td> |
| 119 |
</tr> |
| 120 |
<tr class="pdfprnt_watermark_row"><th scope="row"></th> |
| 121 |
<td> |
| 122 |
<input disabled="disabled" type="radio" checked="checked"> |
| 123 |
<label> |
| 124 |
<?php _e( 'Text', 'pdf-print' ); ?> |
| 125 |
</label> |
| 126 |
</td> |
| 127 |
</tr> |
| 128 |
<tr class="pdfprnt_watermark_row"><th scope="row"></th> |
| 129 |
<td> |
| 130 |
<textarea disabled="disabled" rows="3" cols="45"></textarea> |
| 131 |
</td> |
| 132 |
</tr> |
| 133 |
<tr class="pdfprnt_watermark_row"><th scope="row"></th> |
| 134 |
<td> |
| 135 |
<input disabled="disabled" type="radio"> |
| 136 |
<label for="pdfprnt_image_watermark"> |
| 137 |
<?php _e( 'Image', 'pdf-print' ); ?> |
| 138 |
</label> |
| 139 |
</td> |
| 140 |
</tr> |
| 141 |
<tr> |
| 142 |
<th scope="row"><?php _e( 'Compatibility with Woocommerce', 'pdf-print' ); ?></th> |
| 143 |
<td><label><input type="checkbox" disabled="disabled"></label></td> |
| 144 |
</tr> |
| 145 |
<tr> |
| 146 |
<th scope="row"><?php _e( 'Display product data', 'pdf-print' ); ?></th> |
| 147 |
<td> |
| 148 |
<fieldset> |
| 149 |
<label><input type="checkbox" disabled="disabled"><?php _e( 'Rating', 'pdf-print' ); ?></label><br> |
| 150 |
<label><input type="checkbox" disabled="disabled"><?php _e( 'Price', 'pdf-print' ); ?></label><br> |
| 151 |
<label><input type="checkbox" disabled="disabled"><?php _e( 'Stock', 'pdf-print' ); ?></label><br> |
| 152 |
<label><input type="checkbox" disabled="disabled"><?php _e( 'SKU', 'pdf-print' ); ?></label><br> |
| 153 |
<label><input type="checkbox" disabled="disabled"><?php _e( 'Categories', 'pdf-print' ); ?></label><br> |
| 154 |
<label><input type="checkbox" disabled="disabled"><?php _e( 'Tags', 'pdf-print' ); ?></label><br> |
| 155 |
<label><input type="checkbox" disabled="disabled"><?php _e( 'Product Variations', 'pdf-print' ); ?></label><br> |
| 156 |
<label><input type="checkbox" disabled="disabled"><?php _e( 'Product Short Description', 'pdf-print' ); ?></label><br> |
| 157 |
<label><input type="checkbox" disabled="disabled"><?php _e( 'Additional Information', 'pdf-print' ); ?></label><br> |
| 158 |
<label><input type="checkbox" disabled="disabled"><?php _e( 'Product Gallery', 'pdf-print' ); ?></label> |
| 159 |
</fieldset> |
| 160 |
</td> |
| 161 |
</tr> |
| 162 |
</table> |
| 163 |
<?php } |
| 164 |
} |
| 165 |
|
| 166 |
if ( ! function_exists( 'pdfprnt_extra_block' ) ) { |
| 167 |
function pdfprnt_extra_block() { ?> |
| 168 |
<div class="bws_pro_version"> |
| 169 |
<p><?php _e( 'Please choose the necessary post types (or single pages), where PDF & Print buttons should be displayed:', 'pdf-print' ); ?></p> |
| 170 |
<p> <label> |
| 171 |
<input disabled="disabled" checked="checked" type="checkbox"/> |
| 172 |
<?php _e( "Show URL for pages", 'pdf-print' );?> |
| 173 |
</label> |
| 174 |
</p> |
| 175 |
<img src="<?php echo plugins_url( 'images/pro_screen_1.png', dirname( __FILE__ ) ); ?>" alt="<?php _e( "Example of site pages' tree", 'pdf-print' ); ?>" title="<?php _e( "Example of site pages' tree", 'pdf-print' ); ?>" /> |
| 176 |
<p class="submit"> |
| 177 |
<input disabled="disabled" type="submit" class="button-primary" value="<?php _e( 'Save Changes', 'pdf-print' ); ?>" /> |
| 178 |
</p> |
| 179 |
<p><strong>* <?php _e( 'If you upgrade to Pro version all your settings will be saved.', 'pdf-print' ); ?></strong></p> |
| 180 |
</div> |
| 181 |
<?php } |
| 182 |
} |
| 183 |
|
| 184 |
if ( ! function_exists( 'pdfprnt_templates_new_block' ) ) { |
| 185 |
function pdfprnt_templates_new_block() { ?> |
| 186 |
<h2><?php _e( 'Add New template', 'pdf-print' ); ?></h2> |
| 187 |
<p class="hide-if-no-js desription"><i><?php _e( 'For more info click "Help" tab at the top of the page.', 'pdf-print' ); ?></i></p> |
| 188 |
<div> |
| 189 |
<div id="titlediv"><div id="titlewrap"><input disabled type="text" size="30" value="" id="title" placeholder="<?php _e( 'Enter Template Title', 'pdf-print' ); ?>" /></div></div> |
| 190 |
<h3><span><?php _e( 'Top running title', 'pdf-print' ); ?></span></h3> |
| 191 |
<div class="postarea wp-editor-expand"> |
| 192 |
<div class="wp-core-ui wp-editor-wrap tmce-active"> |
| 193 |
<div class="wp-editor-tools hide-if-no-js"> |
| 194 |
<div class="wp-media-buttons"> |
| 195 |
<link rel='stylesheet' id='editor-buttons-css' href='#' type='text/css' media='all' /> |
| 196 |
<a disabled href="#" id="insert-media-button" class="button insert-media add_media" data-editor="pdfprnt_top" title="<?php _e( 'Add Media', 'pdf-print' ); ?>"><span class="wp-media-buttons-icon"></span> <?php _e( 'Add Media', 'pdf-print' ); ?></a> |
| 197 |
</div> |
| 198 |
</div> |
| 199 |
<div class="wp-editor-container"><textarea disabled style="width: 100%;" class="wp-editor-area" rows="5" autocomplete="off"></textarea></div> |
| 200 |
</div> |
| 201 |
</div> |
| 202 |
<h3><span><?php _e( 'Bottom running title', 'pdf-print' ); ?></span></h3> |
| 203 |
<div class="postarea wp-editor-expand"> |
| 204 |
<div class="wp-core-ui wp-editor-wrap tmce-active"> |
| 205 |
<div class="wp-editor-tools hide-if-no-js"> |
| 206 |
<div class="wp-media-buttons"><a disabled href="#" class="button insert-media add_media" data-editor="pdfprnt_bottom" title="<?php _e( 'Add Media', 'pdf-print' ); ?>"><span class="wp-media-buttons-icon"></span> <?php _e( 'Add Media', 'pdf-print' ); ?></a></div> |
| 207 |
</div> |
| 208 |
<div class="wp-editor-container"><textarea disabled style="width: 100%;" class="wp-editor-area" rows="5" autocomplete="off"></textarea></div> |
| 209 |
</div> |
| 210 |
</div> |
| 211 |
</div> |
| 212 |
<p><input disabled type="submit" class="button-primary" value="<?php _e( 'Save template', 'pdf-print' ); ?>" /></p> |
| 213 |
<?php } |
| 214 |
} |
| 215 |
|
| 216 |
if ( ! function_exists( 'pdfprnt_templates_block' ) ) { |
| 217 |
function pdfprnt_templates_block() { ?> |
| 218 |
<ul class='subsubsub'> |
| 219 |
<li class='all'><a class="current" href="#"><?php _e( 'All', 'pdf-print' ); ?><span class="count"> ( 2 )</span></a> |</li> |
| 220 |
<li class='trash'><a href="#"><?php _e( 'Trash', 'pdf-print' ); ?><span class="count"> ( 0 )</span></a></li> |
| 221 |
</ul> |
| 222 |
<p class="search-box"> |
| 223 |
<input disabled="disabled" type="search" name="s" /> |
| 224 |
<input disabled="disabled" type="submit" id="search-submit" class="button" value="<?php _e( 'search', 'pdf-print' ); ?>" /> |
| 225 |
</p> |
| 226 |
<div class="tablenav top"> |
| 227 |
<div class="alignleft actions bulkactions"> |
| 228 |
<select disabled="disabled"> |
| 229 |
<option value='-1' selected='selected'><?php _e( 'Bulk Actions', 'pdf-print' ); ?></option> |
| 230 |
</select> |
| 231 |
<input disabled="disabled" type="submit" id="doaction" class="button action" value="<?php _e( 'Apply', 'pdf-print' ); ?>" /> |
| 232 |
</div> |
| 233 |
<div class='tablenav-pages one-page'> |
| 234 |
<span class="displaying-num">2 <?php _e( 'items', 'pdf-print' ); ?></span> |
| 235 |
</div> |
| 236 |
<br class="clear" /> |
| 237 |
</div> |
| 238 |
<table class="wp-list-table widefat striped templates"> |
| 239 |
<thead> |
| 240 |
<tr> |
| 241 |
<th scope='col' id='cb' class='manage-column column-cb'><input disabled="disabled" id="cb-select-all-1" type="checkbox" /></th> |
| 242 |
<th scope='col' id='title' class='manage-column column-title column-primary' style=""><a href="#"><span><?php _e( 'Title', 'pdf-print' ); ?></span></a></th> |
| 243 |
<th scope='col' id='pdf' class='manage-column column-pdf'>PDF</th> |
| 244 |
<th scope='col' id='print' class='manage-column column-print'>Print</th> |
| 245 |
<th scope='col' id='date' class='manage-column column-date sortable desc'><a href="#"><span><?php _e( 'Date', 'pdf-print' ); ?></span></th> |
| 246 |
</tr> |
| 247 |
</thead> |
| 248 |
<tbody id="the-list" data-wp-lists='list:template'> |
| 249 |
<tr> |
| 250 |
<th scope="row" class="check-column"><input disabled="disabled" type="checkbox" /></th> |
| 251 |
<td class='title column-title column-primary'><strong><a href="#">Custom template</a></strong> </td> |
| 252 |
<td class='pdf column-pdf'><input disabled="disabled" type="radio" /></td> |
| 253 |
<td class='print column-print'><input disabled="disabled" type="radio" /></td> |
| 254 |
<td class='date column-date'>June 26, 2015</td> |
| 255 |
</tr> |
| 256 |
<tr> |
| 257 |
<th scope="row" class="check-column"><input disabled="disabled" type="checkbox" /></th> |
| 258 |
<td class='title column-title column-primary'> <strong><a href="#">New template</a></strong></td> |
| 259 |
<td class='pdf column-pdf'><input disabled="disabled" type="radio" /></td> |
| 260 |
<td class='print column-print'><input disabled="disabled" type="radio" /></td> |
| 261 |
<td class='date column-date'>June 25, 2015</td> |
| 262 |
</tr> |
| 263 |
</tbody> |
| 264 |
<tfoot> |
| 265 |
<tr> |
| 266 |
<th scope='col' class='manage-column column-cb'><input disabled id="cb-select-all-2" type="checkbox" /></th> |
| 267 |
<th scope='col' class='manage-column column-title column-primary' style=""><a href="#"><span><?php _e( 'Title', 'pdf-print' ); ?></span></a></th> |
| 268 |
<th scope='col' class='manage-column column-pdf'>PDF</th> |
| 269 |
<th scope='col' class='manage-column column-print'>Print</th> |
| 270 |
<th scope='col' class='manage-column column-date sortable desc'><a href="#"><span><?php _e( 'Date', 'pdf-print' ); ?></span></th> |
| 271 |
</tr> |
| 272 |
</tfoot> |
| 273 |
</table> |
| 274 |
<div class="tablenav bottom"> |
| 275 |
<div class="alignleft actions bulkactions"> |
| 276 |
<select disabled="disabled"> |
| 277 |
<option value='-1' selected='selected'><?php _e( 'Bulk Actions', 'pdf-print' ); ?></option> |
| 278 |
</select> |
| 279 |
<input disabled="disabled" type="submit" id="doaction" class="button action" value="<?php _e( 'Apply', 'pdf-print' ); ?>" /> |
| 280 |
</div> |
| 281 |
<div class='tablenav-pages one-page'> |
| 282 |
<span class="displaying-num">2 <?php _e( 'items', 'pdf-print' ); ?></span> |
| 283 |
</div> |
| 284 |
<br class="clear" /> |
| 285 |
</div> |
| 286 |
<?php } |
| 287 |
} |