98 * @return array The action results |
98 * @return array The action results |
99 */ |
99 */ |
100 public function save_options() { |
100 public function save_options() { |
101 |
101 |
102 $this->options["custom_image_row_count"] = intval( $_POST['prtfl_custom_image_row_count'] ); |
102 $this->options["custom_image_row_count"] = intval( $_POST['prtfl_custom_image_row_count'] ); |
|
103 $this->options["custom_portfolio_row_count"] = intval( $_POST['prtfl_portfolio_custom_row_count'] ); |
103 if ( 1 > $this->options["custom_image_row_count"] ) |
104 if ( 1 > $this->options["custom_image_row_count"] ) |
104 $this->options["custom_image_row_count"] = 1; |
105 $this->options["custom_image_row_count"] = 1; |
|
106 if ( 1 > $this->options["custom_portfolio_row_count"] ) |
|
107 $this->options["custom_portfolio_row_count"] = 1; |
105 |
108 |
106 $new_image_size_photo = esc_attr( $_POST['prtfl_image_size_photo'] ); |
109 $new_image_size_photo = esc_attr( $_POST['prtfl_image_size_photo'] ); |
107 $custom_image_size_w_photo = intval( $_POST['prtfl_custom_image_size_w_photo'] ); |
110 $custom_image_size_w_photo = intval( $_POST['prtfl_custom_image_size_w_photo'] ); |
108 $custom_image_size_h_photo = intval( $_POST['prtfl_custom_image_size_h_photo'] ); |
111 $custom_image_size_h_photo = intval( $_POST['prtfl_custom_image_size_h_photo'] ); |
109 $custom_size_px_photo = array( $custom_image_size_w_photo, $custom_image_size_h_photo ); |
112 $custom_size_px_photo = array( $custom_image_size_w_photo, $custom_image_size_h_photo ); |
254 <hr> |
257 <hr> |
255 <table class="form-table"> |
258 <table class="form-table"> |
256 <tr valign="top"> |
259 <tr valign="top"> |
257 <th scope="row"><?php _e( 'Number of Columns', 'portfolio' ); ?> </th> |
260 <th scope="row"><?php _e( 'Number of Columns', 'portfolio' ); ?> </th> |
258 <td> |
261 <td> |
|
262 <input<?php echo $this->change_permission_attr; ?> type="number" name="prtfl_portfolio_custom_row_count" min="1" max="10000" value="<?php echo $this->options["custom_portfolio_row_count"]; ?>" /> <?php _e( 'columns', 'portfolio' ); ?> |
|
263 <div class="bws_info"><?php printf( __( 'Number of portfolio columns (default is %s).', 'portfolio' ), '1' ); ?></div> |
|
264 </td> |
|
265 </tr> |
|
266 <tr valign="top"> |
|
267 <th scope="row"><?php _e( 'Number of image Columns', 'portfolio' ); ?> </th> |
|
268 <td> |
259 <input type="number" name="prtfl_custom_image_row_count" min="1" max="10000" value="<?php echo $this->options["custom_image_row_count"]; ?>" /> <?php _e( 'columns', 'portfolio' ); ?> |
269 <input type="number" name="prtfl_custom_image_row_count" min="1" max="10000" value="<?php echo $this->options["custom_image_row_count"]; ?>" /> <?php _e( 'columns', 'portfolio' ); ?> |
260 <div class="bws_info"><?php printf( __( 'Number of image columns (default is %s).', 'portfolio' ), '3' ); ?></div> |
270 <div class="bws_info"><?php printf( __( 'Number of image columns (default is %s).', 'portfolio' ), '3' ); ?></div> |
261 </td> |
271 </td> |
262 </tr> |
272 </tr> |
263 <tr valign="top"> |
273 <tr valign="top"> |
300 <option value="portfolio-thumb" <?php selected( 'portfolio-thumb', $this->options['image_size_album'] ); ?> class="bws_option_affect" data-affect-show=".prtfl_for_custom_image_size_album"><?php _e( 'Custom', 'portfolio' ); ?></option> |
310 <option value="portfolio-thumb" <?php selected( 'portfolio-thumb', $this->options['image_size_album'] ); ?> class="bws_option_affect" data-affect-show=".prtfl_for_custom_image_size_album"><?php _e( 'Custom', 'portfolio' ); ?></option> |
301 </select> |
311 </select> |
302 <div class="bws_info"><?php _e( 'Maximum cover image size. Custom uses the Image Dimensions values.', 'portfolio' ); ?></div> |
312 <div class="bws_info"><?php _e( 'Maximum cover image size. Custom uses the Image Dimensions values.', 'portfolio' ); ?></div> |
303 </td> |
313 </td> |
304 </tr> |
314 </tr> |
|
315 </table> |
|
316 <?php if ( ! $this->hide_pro_tabs ) { ?> |
|
317 <div class="bws_pro_version_bloc"> |
|
318 <div class="bws_pro_version_table_bloc"> |
|
319 <button type="submit" name="bws_hide_premium_options" class="notice-dismiss bws_hide_premium_options" title="<?php _e( 'Close', 'portfolio' ); ?>"></button> |
|
320 <div class="bws_table_bg"></div> |
|
321 <table class="form-table bws_pro_version"> |
|
322 <tr valign="top"> |
|
323 <th scope="row"><?php _e( 'Slider Image Size', 'portfolio' ); ?> </th> |
|
324 <td> |
|
325 <select name="prtfl_image_size_slider"> |
|
326 <option value="large">Large (1024 × 1024)</option> |
|
327 </select> |
|
328 <div class="bws_info"><?php _e( 'Maximum slider image size. Custom uses the Image Dimensions values.', 'portfolio-pro' ); ?></div> |
|
329 </td> |
|
330 </tr> |
|
331 </table> |
|
332 </div> |
|
333 <?php $this->bws_pro_block_links(); ?> |
|
334 </div> |
|
335 <?php } ?> |
|
336 <table class="form-table"> |
305 <tr valign="top" class="prtfl_for_custom_image_size_album"> |
337 <tr valign="top" class="prtfl_for_custom_image_size_album"> |
306 <th scope="row"><?php _e( 'Custom Cover Image Size', 'portfolio' ); ?> </th> |
338 <th scope="row"><?php _e( 'Custom Cover Image Size', 'portfolio' ); ?> </th> |
307 <td> |
339 <td> |
308 <input type="number" name="prtfl_custom_image_size_w_album" min="1" max="10000" value="<?php echo $this->options['custom_size_px']['portfolio-thumb'][0]; ?>" /> x <input type="number" name="prtfl_custom_image_size_h_album" min="1" max="10000" value="<?php echo $this->options['custom_size_px']['portfolio-thumb'][1]; ?>" /> px |
340 <input type="number" name="prtfl_custom_image_size_w_album" min="1" max="10000" value="<?php echo $this->options['custom_size_px']['portfolio-thumb'][0]; ?>" /> x <input type="number" name="prtfl_custom_image_size_h_album" min="1" max="10000" value="<?php echo $this->options['custom_size_px']['portfolio-thumb'][1]; ?>" /> px |
309 </td> |
341 </td> |