Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/wp-conte.../plugins/portfoli.../includes
File: class-prtfl-settings.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* Displays the content on the plugin settings page
[2] Fix | Delete
*/
[3] Fix | Delete
[4] Fix | Delete
if ( ! defined( 'ABSPATH' ) ) {
[5] Fix | Delete
die();
[6] Fix | Delete
}
[7] Fix | Delete
[8] Fix | Delete
if ( ! class_exists( 'Prtfl_Settings_Tabs' ) ) {
[9] Fix | Delete
/**
[10] Fix | Delete
* Class for display Settings Tabs
[11] Fix | Delete
*/
[12] Fix | Delete
class Prtfl_Settings_Tabs extends Bws_Settings_Tabs {
[13] Fix | Delete
[14] Fix | Delete
/**
[15] Fix | Delete
* Image sizes array
[16] Fix | Delete
*
[17] Fix | Delete
* @var array
[18] Fix | Delete
*/
[19] Fix | Delete
public $wp_image_sizes = array();
[20] Fix | Delete
[21] Fix | Delete
/**
[22] Fix | Delete
* Options for Custom Search plugin
[23] Fix | Delete
*
[24] Fix | Delete
* @var array
[25] Fix | Delete
*/
[26] Fix | Delete
public $cstmsrch_options;
[27] Fix | Delete
[28] Fix | Delete
/**
[29] Fix | Delete
* Fields for portfolio
[30] Fix | Delete
*
[31] Fix | Delete
* @var array
[32] Fix | Delete
*/
[33] Fix | Delete
public $fields;
[34] Fix | Delete
[35] Fix | Delete
/**
[36] Fix | Delete
* Constructor.
[37] Fix | Delete
*
[38] Fix | Delete
* @access public
[39] Fix | Delete
*
[40] Fix | Delete
* @see Bws_Settings_Tabs::__construct() for more information on default arguments.
[41] Fix | Delete
*
[42] Fix | Delete
* @param string $plugin_basename Plugin basename.
[43] Fix | Delete
*/
[44] Fix | Delete
public function __construct( $plugin_basename ) {
[45] Fix | Delete
global $prtfl_options, $prtfl_plugin_info, $prtfl_bws_demo_data;
[46] Fix | Delete
[47] Fix | Delete
$tabs = array(
[48] Fix | Delete
'settings' => array( 'label' => __( 'Settings', 'portfolio' ) ),
[49] Fix | Delete
'project' => array( 'label' => __( 'Project', 'portfolio' ) ),
[50] Fix | Delete
'misc' => array( 'label' => __( 'Misc', 'portfolio' ) ),
[51] Fix | Delete
'custom_code' => array( 'label' => __( 'Custom Code', 'portfolio' ) ),
[52] Fix | Delete
'import-export' => array( 'label' => __( 'Import / Export', 'portfolio' ) ),
[53] Fix | Delete
'license' => array( 'label' => __( 'License Key', 'portfolio' ) ),
[54] Fix | Delete
);
[55] Fix | Delete
[56] Fix | Delete
parent::__construct(
[57] Fix | Delete
array(
[58] Fix | Delete
'plugin_basename' => $plugin_basename,
[59] Fix | Delete
'plugins_info' => $prtfl_plugin_info,
[60] Fix | Delete
'prefix' => 'prtfl',
[61] Fix | Delete
'default_options' => prtfl_get_options_default(),
[62] Fix | Delete
'options' => $prtfl_options,
[63] Fix | Delete
'tabs' => $tabs,
[64] Fix | Delete
'wp_slug' => 'portfolio',
[65] Fix | Delete
'demo_data' => $prtfl_bws_demo_data,
[66] Fix | Delete
'link_key' => 'f047e20c92c972c398187a4f70240285',
[67] Fix | Delete
'link_pn' => '74',
[68] Fix | Delete
'doc_link' => 'https://bestwebsoft.com/documentation/portfolio/portfolio-user-guide/',
[69] Fix | Delete
)
[70] Fix | Delete
);
[71] Fix | Delete
[72] Fix | Delete
$this->all_plugins = get_plugins();
[73] Fix | Delete
[74] Fix | Delete
$wp_sizes = get_intermediate_image_sizes();
[75] Fix | Delete
[76] Fix | Delete
foreach ( (array) $wp_sizes as $size ) {
[77] Fix | Delete
if ( ! array_key_exists( $size, $prtfl_options['custom_size_px'] ) ) {
[78] Fix | Delete
if ( isset( $_wp_additional_image_sizes[ $size ] ) ) {
[79] Fix | Delete
$width = absint( $_wp_additional_image_sizes[ $size ]['width'] );
[80] Fix | Delete
$height = absint( $_wp_additional_image_sizes[ $size ]['height'] );
[81] Fix | Delete
} else {
[82] Fix | Delete
$width = absint( get_option( $size . '_size_w' ) );
[83] Fix | Delete
$height = absint( get_option( $size . '_size_h' ) );
[84] Fix | Delete
}
[85] Fix | Delete
[86] Fix | Delete
if ( ! $width && ! $height ) {
[87] Fix | Delete
$this->wp_image_sizes[] = array(
[88] Fix | Delete
'value' => $size,
[89] Fix | Delete
'name' => ucwords( str_replace( array( '-', '_' ), ' ', $size ) ),
[90] Fix | Delete
);
[91] Fix | Delete
} else {
[92] Fix | Delete
$this->wp_image_sizes[] = array(
[93] Fix | Delete
'value' => $size,
[94] Fix | Delete
'name' => ucwords( str_replace( array( '-', '_' ), ' ', $size ) ) . ' (' . $width . ' &#215; ' . $height . ')',
[95] Fix | Delete
'width' => $width,
[96] Fix | Delete
'height' => $height,
[97] Fix | Delete
);
[98] Fix | Delete
}
[99] Fix | Delete
}
[100] Fix | Delete
}
[101] Fix | Delete
[102] Fix | Delete
$this->cstmsrch_options = get_option( 'cstmsrch_options' );
[103] Fix | Delete
[104] Fix | Delete
$this->fields = array(
[105] Fix | Delete
'executor' => __( 'Executors', 'portfolio' ),
[106] Fix | Delete
'technologies' => __( 'Technologies', 'portfolio' ),
[107] Fix | Delete
'date' => __( 'Date of completion', 'portfolio' ),
[108] Fix | Delete
'link' => __( 'Link', 'portfolio' ),
[109] Fix | Delete
'shrdescription' => __( 'Short Description', 'portfolio' ),
[110] Fix | Delete
'description' => __( 'Description', 'portfolio' ),
[111] Fix | Delete
[112] Fix | Delete
);
[113] Fix | Delete
[114] Fix | Delete
add_action( get_parent_class( $this ) . '_display_custom_messages', array( $this, 'display_custom_messages' ) );
[115] Fix | Delete
add_action( get_parent_class( $this ) . '_additional_misc_options_affected', array( $this, 'additional_misc_options_affected' ) );
[116] Fix | Delete
add_action( get_parent_class( $this ) . '_additional_import_export_options', array( $this, 'additional_import_export_options' ) );
[117] Fix | Delete
add_action( get_parent_class( $this ) . '_display_metabox', array( $this, 'display_metabox' ) );
[118] Fix | Delete
}
[119] Fix | Delete
[120] Fix | Delete
/**
[121] Fix | Delete
* Save plugin options to the database
[122] Fix | Delete
*
[123] Fix | Delete
* @access public
[124] Fix | Delete
* @return array The action results
[125] Fix | Delete
*/
[126] Fix | Delete
public function save_options() {
[127] Fix | Delete
[128] Fix | Delete
$message = '';
[129] Fix | Delete
$notice = '';
[130] Fix | Delete
$error = '';
[131] Fix | Delete
[132] Fix | Delete
if ( isset( $_POST['prtfl_settings_nonce'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['prtfl_settings_nonce'] ) ), 'prtfl_settings' ) ) {
[133] Fix | Delete
[134] Fix | Delete
$this->options['custom_image_row_count'] = isset( $_POST['prtfl_custom_image_row_count'] ) ? absint( $_POST['prtfl_custom_image_row_count'] ) : 3;
[135] Fix | Delete
$this->options['custom_portfolio_row_count'] = isset( $_POST['prtfl_portfolio_custom_row_count'] ) ? absint( $_POST['prtfl_portfolio_custom_row_count'] ) : 1;
[136] Fix | Delete
[137] Fix | Delete
$new_image_size_photo = isset( $_POST['prtfl_image_size_photo'] ) ? sanitize_text_field( wp_unslash( $_POST['prtfl_image_size_photo'] ) ) : 'thumbnail';
[138] Fix | Delete
$custom_image_size_w_photo = isset( $_POST['prtfl_custom_image_size_w_photo'] ) ? absint( $_POST['prtfl_custom_image_size_w_photo'] ) : 240;
[139] Fix | Delete
$custom_image_size_h_photo = isset( $_POST['prtfl_custom_image_size_h_photo'] ) ? absint( $_POST['prtfl_custom_image_size_h_photo'] ) : 260;
[140] Fix | Delete
$custom_size_px_photo = array( $custom_image_size_w_photo, $custom_image_size_h_photo );
[141] Fix | Delete
if ( 'portfolio-photo-thumb' === $new_image_size_photo ) {
[142] Fix | Delete
if ( $new_image_size_photo !== $this->options['image_size_photo'] ) {
[143] Fix | Delete
$need_image_update = true;
[144] Fix | Delete
} else {
[145] Fix | Delete
foreach ( $custom_size_px_photo as $key => $value ) {
[146] Fix | Delete
if ( absint( $value ) !== absint( $this->options['custom_size_px']['portfolio-photo-thumb'][ $key ] ) ) {
[147] Fix | Delete
$need_image_update = true;
[148] Fix | Delete
break;
[149] Fix | Delete
}
[150] Fix | Delete
}
[151] Fix | Delete
}
[152] Fix | Delete
}
[153] Fix | Delete
$this->options['custom_size_px']['portfolio-photo-thumb'] = $custom_size_px_photo;
[154] Fix | Delete
$this->options['image_size_photo'] = $new_image_size_photo;
[155] Fix | Delete
[156] Fix | Delete
$new_image_size_album = isset( $_POST['prtfl_image_size_album'] ) ? sanitize_text_field( wp_unslash( $_POST['prtfl_image_size_album'] ) ) : 'medium';
[157] Fix | Delete
$custom_image_size_w_album = isset( $_POST['prtfl_custom_image_size_w_album'] ) ? absint( $_POST['prtfl_custom_image_size_w_album'] ) : 280;
[158] Fix | Delete
$custom_image_size_h_album = isset( $_POST['prtfl_custom_image_size_h_album'] ) ? absint( $_POST['prtfl_custom_image_size_h_album'] ) : 300;
[159] Fix | Delete
$custom_size_px_album = array( $custom_image_size_w_album, $custom_image_size_h_album );
[160] Fix | Delete
if ( 'portfolio-thumb' === $new_image_size_album ) {
[161] Fix | Delete
if ( $new_image_size_album !== $this->options['image_size_album'] ) {
[162] Fix | Delete
$need_image_update = true;
[163] Fix | Delete
} else {
[164] Fix | Delete
foreach ( $custom_size_px_album as $key => $value ) {
[165] Fix | Delete
if ( absint( $value ) !== absint( $this->options['custom_size_px']['portfolio-thumb'][ $key ] ) ) {
[166] Fix | Delete
$need_image_update = true;
[167] Fix | Delete
break;
[168] Fix | Delete
}
[169] Fix | Delete
}
[170] Fix | Delete
}
[171] Fix | Delete
}
[172] Fix | Delete
[173] Fix | Delete
$this->options['custom_size_px']['portfolio-thumb'] = $custom_size_px_album;
[174] Fix | Delete
$this->options['image_size_album'] = $new_image_size_album;
[175] Fix | Delete
[176] Fix | Delete
if ( ! empty( $_POST['prtfl_page_id_portfolio_template'] ) && absint( $this->options['page_id_portfolio_template'] ) !== absint( $_POST['prtfl_page_id_portfolio_template'] ) ) {
[177] Fix | Delete
/* for rewrite */
[178] Fix | Delete
$this->options['flush_rewrite_rules'] = 1;
[179] Fix | Delete
$this->options['page_id_portfolio_template'] = absint( $_POST['prtfl_page_id_portfolio_template'] );
[180] Fix | Delete
}
[181] Fix | Delete
[182] Fix | Delete
$this->options['order_by'] = isset( $_POST['prtfl_order_by'] ) ? sanitize_text_field( wp_unslash( $_POST['prtfl_order_by'] ) ) : 'date';
[183] Fix | Delete
$this->options['order'] = isset( $_POST['prtfl_order'] ) ? sanitize_text_field( wp_unslash( $_POST['prtfl_order'] ) ) : 'DESC';
[184] Fix | Delete
[185] Fix | Delete
if ( ! empty( $need_image_update ) ) {
[186] Fix | Delete
$this->options['need_image_update'] = __( 'Custom image size was changed. You need to update project images.', 'portfolio' );
[187] Fix | Delete
}
[188] Fix | Delete
[189] Fix | Delete
$this->options['link_additional_field_for_non_registered'] = isset( $_POST['prtfl_link_additional_field_for_non_registered'] ) ? 1 : 0;
[190] Fix | Delete
$this->options['svn_text_field'] = isset( $_POST['prtfl_svn_text_field'] ) ? sanitize_text_field( wp_unslash( $_POST['prtfl_svn_text_field'] ) ) : '';
[191] Fix | Delete
$this->options['svn_additional_field_for_non_logged'] = isset( $_POST['prtfl_svn_additional_field_for_non_logged'] ) ? 1 : 0;
[192] Fix | Delete
$this->options['svn_additional_field'] = isset( $_POST['prtfl_svn_additional_field'] ) ? 1 : 0;
[193] Fix | Delete
[194] Fix | Delete
foreach ( $this->fields as $field_key => $field_title ) {
[195] Fix | Delete
$this->options[ $field_key . '_additional_field' ] = isset( $_POST[ 'prtfl_' . $field_key . '_additional_field' ] ) ? 1 : 0;
[196] Fix | Delete
$this->options[ $field_key . '_text_field' ] = isset( $_POST[ 'prtfl_' . $field_key . '_text_field' ] ) ? sanitize_text_field( wp_unslash( $_POST[ 'prtfl_' . $field_key . '_text_field' ] ) ) : '';
[197] Fix | Delete
[198] Fix | Delete
}
[199] Fix | Delete
[200] Fix | Delete
$this->options['screenshot_text_field'] = isset( $_POST['prtfl_screenshot_text_field'] ) ? sanitize_text_field( wp_unslash( $_POST['prtfl_screenshot_text_field'] ) ) : '';
[201] Fix | Delete
[202] Fix | Delete
if ( isset( $_POST['prtfl_slug'] ) && sanitize_text_field( wp_unslash( $_POST['prtfl_slug'] ) ) !== $this->options['slug'] ) {
[203] Fix | Delete
$this->options['flush_rewrite_rules'] = 1;
[204] Fix | Delete
}
[205] Fix | Delete
$this->options['slug'] = sanitize_text_field( wp_unslash( $_POST['prtfl_slug'] ) );
[206] Fix | Delete
[207] Fix | Delete
if ( is_plugin_active( 'sender-pro/sender-pro.php' ) ) {
[208] Fix | Delete
$sndr_options = get_option( 'sndr_options' );
[209] Fix | Delete
/* mailout when publishing quote */
[210] Fix | Delete
if ( ! empty( $_POST['sndr_distribution_select'] ) && ! empty( $_POST['sndr_templates_select'] ) && ! empty( $_POST['sndr_priority'] ) ) {
[211] Fix | Delete
if ( isset( $_POST['prtfl_sndr_mailout'] ) ) {
[212] Fix | Delete
$key = array_search( 'bws-portfolio', $sndr_options['automailout_new_post'] );
[213] Fix | Delete
if ( false === $key ) {
[214] Fix | Delete
$sndr_options['automailout_new_post'][] = 'bws-portfolio';
[215] Fix | Delete
$sndr_options['group_for_post']['bws-portfolio'] = isset( $_POST['sndr_distribution_select']['bws-portfolio'] ) ? absint( $_POST['sndr_distribution_select']['bws-portfolio'] ) : 0;
[216] Fix | Delete
$sndr_options['letter_for_post']['bws-portfolio'] = isset( $_POST['sndr_templates_select']['bws-portfolio'] ) ? absint( $_POST['sndr_templates_select']['bws-portfolio'] ) : 0;
[217] Fix | Delete
$sndr_options['priority_for_post_letters']['bws-portfolio'] = isset( $_POST['sndr_priority']['bws-portfolio'] ) ? absint( $_POST['sndr_priority']['bws-portfolio'] ) : 0;
[218] Fix | Delete
}
[219] Fix | Delete
} else {
[220] Fix | Delete
$key = array_search( 'bws-portfolio', $sndr_options['automailout_new_post'] );
[221] Fix | Delete
if ( false !== $key ) {
[222] Fix | Delete
unset( $sndr_options['automailout_new_post'][ $key ] );
[223] Fix | Delete
unset( $sndr_options['priority_for_post_letters']['bws-portfolio'] );
[224] Fix | Delete
unset( $sndr_options['letter_for_post']['bws-portfolio'] );
[225] Fix | Delete
unset( $sndr_options['group_for_post']['bws-portfolio'] );
[226] Fix | Delete
}
[227] Fix | Delete
}
[228] Fix | Delete
}
[229] Fix | Delete
update_option( 'sndr_options', $sndr_options );
[230] Fix | Delete
}
[231] Fix | Delete
[232] Fix | Delete
/**
[233] Fix | Delete
* Rewriting post types name with unique one from default options
[234] Fix | Delete
*/
[235] Fix | Delete
if ( ! empty( $_POST['prtfl_rename_post_type'] ) ) {
[236] Fix | Delete
global $wpdb;
[237] Fix | Delete
$wpdb->update(
[238] Fix | Delete
$wpdb->prefix . 'posts',
[239] Fix | Delete
array( 'post_type' => $this->default_options['post_type_name'] ),
[240] Fix | Delete
array( 'post_type' => $this->options['post_type_name'] )
[241] Fix | Delete
);
[242] Fix | Delete
$this->options['post_type_name'] = $this->default_options['post_type_name'];
[243] Fix | Delete
}
[244] Fix | Delete
[245] Fix | Delete
if ( ! empty( $this->cstmsrch_options ) ) {
[246] Fix | Delete
if ( isset( $this->cstmsrch_options['output_order'] ) ) {
[247] Fix | Delete
$is_enabled = isset( $_POST['prtfl_add_to_search'] ) ? 1 : 0;
[248] Fix | Delete
$post_type_exist = false;
[249] Fix | Delete
foreach ( $this->cstmsrch_options['output_order'] as $key => $item ) {
[250] Fix | Delete
if ( $item['name'] === $this->options['post_type_name'] && 'post_type' === $item['type'] ) {
[251] Fix | Delete
$post_type_exist = true;
[252] Fix | Delete
if ( absint( $item['enabled'] ) !== absint( $is_enabled ) ) {
[253] Fix | Delete
$this->cstmsrch_options['output_order'][ $key ]['enabled'] = $is_enabled;
[254] Fix | Delete
$cstmsrch_options_update = true;
[255] Fix | Delete
}
[256] Fix | Delete
break;
[257] Fix | Delete
}
[258] Fix | Delete
}
[259] Fix | Delete
if ( ! $post_type_exist ) {
[260] Fix | Delete
$this->cstmsrch_options['output_order'][] = array(
[261] Fix | Delete
'name' => $this->options['post_type_name'],
[262] Fix | Delete
'type' => 'post_type',
[263] Fix | Delete
'enabled' => $is_enabled,
[264] Fix | Delete
);
[265] Fix | Delete
$cstmsrch_options_update = true;
[266] Fix | Delete
}
[267] Fix | Delete
} elseif ( isset( $this->cstmsrch_options['post_types'] ) ) {
[268] Fix | Delete
if ( isset( $_POST['prtfl_add_to_search'] ) && ! in_array( $this->options['post_type_name'], $this->cstmsrch_options['post_types'] ) ) {
[269] Fix | Delete
array_push( $this->cstmsrch_options['post_types'], $this->options['post_type_name'] );
[270] Fix | Delete
$cstmsrch_options_update = true;
[271] Fix | Delete
} elseif ( ! isset( $_POST['prtfl_add_to_search'] ) && in_array( $this->options['post_type_name'], $this->cstmsrch_options['post_types'] ) ) {
[272] Fix | Delete
unset( $this->cstmsrch_options['post_types'][ array_search( $this->options['post_type_name'], $this->cstmsrch_options['post_types'] ) ] );
[273] Fix | Delete
$cstmsrch_options_update = true;
[274] Fix | Delete
}
[275] Fix | Delete
}
[276] Fix | Delete
if ( isset( $cstmsrch_options_update ) ) {
[277] Fix | Delete
update_option( 'cstmsrch_options', $this->cstmsrch_options );
[278] Fix | Delete
}
[279] Fix | Delete
}
[280] Fix | Delete
[281] Fix | Delete
update_option( 'prtfl_options', $this->options );
[282] Fix | Delete
$message = __( 'Settings saved.', 'portfolio' );
[283] Fix | Delete
}
[284] Fix | Delete
[285] Fix | Delete
return compact( 'message', 'notice', 'error' );
[286] Fix | Delete
}
[287] Fix | Delete
[288] Fix | Delete
/**
[289] Fix | Delete
* Display custom error\message\notice
[290] Fix | Delete
*
[291] Fix | Delete
* @access public
[292] Fix | Delete
* @param array $save_results Array with error\message\notice.
[293] Fix | Delete
*/
[294] Fix | Delete
public function display_custom_messages( $save_results ) { ?>
[295] Fix | Delete
<noscript><div class="error below-h2"><p><strong><?php esc_html_e( 'Please enable JavaScript in Your browser.', 'portfolio' ); ?></strong></p></div></noscript>
[296] Fix | Delete
<?php if ( ! empty( $this->options['need_image_update'] ) ) { ?>
[297] Fix | Delete
<div class="updated bws-notice inline prtfl_image_update_message">
[298] Fix | Delete
<p>
[299] Fix | Delete
<?php echo esc_html( $this->options['need_image_update'] ); ?>
[300] Fix | Delete
<input type="button" value="<?php esc_html_e( 'Update Images', 'portfolio' ); ?>" id="prtfl_ajax_update_images" name="ajax_update_images" class="button" />
[301] Fix | Delete
</p>
[302] Fix | Delete
</div>
[303] Fix | Delete
<?php
[304] Fix | Delete
}
[305] Fix | Delete
}
[306] Fix | Delete
[307] Fix | Delete
/**
[308] Fix | Delete
* Display 'Settings'
[309] Fix | Delete
*/
[310] Fix | Delete
public function tab_settings() {
[311] Fix | Delete
if ( is_plugin_active( 'sender-pro/sender-pro.php' ) ) {
[312] Fix | Delete
$sndr_options = get_option( 'sndr_options' );
[313] Fix | Delete
}
[314] Fix | Delete
?>
[315] Fix | Delete
<h3 class="bws_tab_label"><?php esc_html_e( 'Portfolio Settings', 'portfolio' ); ?></h3>
[316] Fix | Delete
<?php $this->help_phrase(); ?>
[317] Fix | Delete
<hr>
[318] Fix | Delete
<table class="form-table">
[319] Fix | Delete
<tr valign="top">
[320] Fix | Delete
<th scope="row"><?php esc_html_e( 'Portfolio Page', 'portfolio' ); ?></th>
[321] Fix | Delete
<td>
[322] Fix | Delete
<?php
[323] Fix | Delete
wp_dropdown_pages(
[324] Fix | Delete
array(
[325] Fix | Delete
'depth' => 0,
[326] Fix | Delete
'selected' => esc_attr( $this->options['page_id_portfolio_template'] ),
[327] Fix | Delete
'name' => 'prtfl_page_id_portfolio_template',
[328] Fix | Delete
'show_option_none' => '...',
[329] Fix | Delete
)
[330] Fix | Delete
);
[331] Fix | Delete
?>
[332] Fix | Delete
<div class="bws_info"><?php esc_html_e( 'Base page where all existing projects will be displayed.', 'portfolio' ); ?></div>
[333] Fix | Delete
</td>
[334] Fix | Delete
</tr>
[335] Fix | Delete
<tr valign="top">
[336] Fix | Delete
<th scope="row"><?php esc_html_e( 'Number of Columns', 'portfolio' ); ?> </th>
[337] Fix | Delete
<td>
[338] Fix | Delete
<input<?php echo esc_html( $this->change_permission_attr ); ?> type="number" name="prtfl_portfolio_custom_row_count" min="1" max="10000" value="<?php echo esc_attr( $this->options['custom_portfolio_row_count'] ); ?>" /> <?php esc_html_e( 'columns', 'portfolio' ); ?>
[339] Fix | Delete
<div class="bws_info"><?php printf( esc_html__( 'Number of portfolio columns (default is %s).', 'portfolio' ), '1' ); ?></div>
[340] Fix | Delete
</td>
[341] Fix | Delete
</tr>
[342] Fix | Delete
<tr valign="top">
[343] Fix | Delete
<th scope="row"><?php esc_html_e( 'Number of Image Columns', 'portfolio' ); ?> </th>
[344] Fix | Delete
<td>
[345] Fix | Delete
<input type="number" name="prtfl_custom_image_row_count" min="1" max="10000" value="<?php echo esc_attr( $this->options['custom_image_row_count'] ); ?>" /> <?php esc_html_e( 'columns', 'portfolio' ); ?>
[346] Fix | Delete
<div class="bws_info"><?php printf( esc_html__( 'Number of image columns (default is %s).', 'portfolio' ), '3' ); ?></div>
[347] Fix | Delete
</td>
[348] Fix | Delete
</tr>
[349] Fix | Delete
<tr valign="top">
[350] Fix | Delete
<th scope="row"><?php esc_html_e( 'Image Size', 'portfolio' ); ?></th>
[351] Fix | Delete
<td>
[352] Fix | Delete
<select name="prtfl_image_size_photo">
[353] Fix | Delete
<?php foreach ( $this->wp_image_sizes as $data ) { ?>
[354] Fix | Delete
<option value="<?php echo esc_attr( $data['value'] ); ?>" <?php selected( $data['value'], $this->options['image_size_photo'] ); ?>><?php echo esc_html( $data['name'] ); ?></option>
[355] Fix | Delete
<?php } ?>
[356] Fix | Delete
<option value="portfolio-photo-thumb" <?php selected( 'portfolio-photo-thumb', $this->options['image_size_photo'] ); ?> class="bws_option_affect" data-affect-show=".prtfl_for_custom_image_size"><?php esc_html_e( 'Custom', 'portfolio' ); ?></option>
[357] Fix | Delete
</select>
[358] Fix | Delete
<div class="bws_info"><?php esc_html_e( 'Maximum portfolio image size. "Custom" uses the Image Dimensions values.', 'portfolio' ); ?></div>
[359] Fix | Delete
</td>
[360] Fix | Delete
</tr>
[361] Fix | Delete
<tr valign="top" class="prtfl_for_custom_image_size">
[362] Fix | Delete
<th scope="row"><?php esc_html_e( 'Custom Image Size', 'portfolio' ); ?> </th>
[363] Fix | Delete
<td>
[364] Fix | Delete
<input type="number" name="prtfl_custom_image_size_w_photo" min="1" max="10000" value="<?php echo esc_attr( $this->options['custom_size_px']['portfolio-photo-thumb'][0] ); ?>" /> x <input type="number" name="prtfl_custom_image_size_h_photo" min="1" max="10000" value="<?php echo esc_attr( $this->options['custom_size_px']['portfolio-photo-thumb'][1] ); ?>" /> px <div class="bws_info"><?php esc_html_e( "Adjust these values based on the number of columns in your project. This won't affect the full size of your images in the lightbox.", 'portfolio' ); ?></div>
[365] Fix | Delete
</td>
[366] Fix | Delete
</tr>
[367] Fix | Delete
<tr valign="top">
[368] Fix | Delete
<th scope="row"><?php esc_html_e( 'Cover Image Size', 'portfolio' ); ?> </th>
[369] Fix | Delete
<td>
[370] Fix | Delete
<select name="prtfl_image_size_album">
[371] Fix | Delete
<?php foreach ( $this->wp_image_sizes as $data ) { ?>
[372] Fix | Delete
<option value="<?php echo esc_attr( $data['value'] ); ?>" <?php selected( $data['value'], $this->options['image_size_album'] ); ?>><?php echo esc_html( $data['name'] ); ?></option>
[373] Fix | Delete
<?php } ?>
[374] Fix | Delete
<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 esc_html_e( 'Custom', 'portfolio' ); ?></option>
[375] Fix | Delete
</select>
[376] Fix | Delete
<div class="bws_info"><?php esc_html_e( 'Maximum cover image size. "Custom" uses the Image Dimensions values.', 'portfolio' ); ?></div>
[377] Fix | Delete
</td>
[378] Fix | Delete
</tr>
[379] Fix | Delete
<tr valign="top" class="prtfl_for_custom_image_size_album">
[380] Fix | Delete
<th scope="row"><?php esc_html_e( 'Custom Cover Image Size', 'portfolio' ); ?> </th>
[381] Fix | Delete
<td>
[382] Fix | Delete
<input type="number" name="prtfl_custom_image_size_w_album" min="1" max="10000" value="<?php echo esc_attr( $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 esc_attr( $this->options['custom_size_px']['portfolio-thumb'][1] ); ?>" /> px
[383] Fix | Delete
</td>
[384] Fix | Delete
</tr>
[385] Fix | Delete
</table>
[386] Fix | Delete
<?php if ( ! $this->hide_pro_tabs ) { ?>
[387] Fix | Delete
<div class="bws_pro_version_bloc">
[388] Fix | Delete
<div class="bws_pro_version_table_bloc">
[389] Fix | Delete
<button type="submit" name="bws_hide_premium_options" class="notice-dismiss bws_hide_premium_options" title="<?php esc_html_e( 'Close', 'portfolio' ); ?>"></button>
[390] Fix | Delete
<div class="bws_table_bg"></div>
[391] Fix | Delete
<table class="form-table bws_pro_version">
[392] Fix | Delete
<tr valign="top">
[393] Fix | Delete
<th scope="row"><?php esc_html_e( 'Slider Image Size', 'portfolio' ); ?> </th>
[394] Fix | Delete
<td>
[395] Fix | Delete
<select disabled="disabled" name="prtfl_image_size_slider">
[396] Fix | Delete
<option value="large">Large (1024 × 1024)</option>
[397] Fix | Delete
</select>
[398] Fix | Delete
<div class="bws_info"><?php esc_html_e( 'Maximum slider image size. "Custom" uses the Image Dimensions values.', 'portfolio' ); ?></div>
[399] Fix | Delete
</td>
[400] Fix | Delete
</tr>
[401] Fix | Delete
<tr valign="top">
[402] Fix | Delete
<th scope="row"><?php esc_html_e( 'Sort Projects Option', 'portfolio' ); ?></th>
[403] Fix | Delete
<td>
[404] Fix | Delete
<label>
[405] Fix | Delete
<input type="checkbox" name="prtfl_sorting_selectbox" value="1" disabled="disabled" /> <span class="bws_info"><?php esc_html_e( 'Enable to display sort projects manually by date or title.', 'portfolio' ); ?></span>
[406] Fix | Delete
</label>
[407] Fix | Delete
</td>
[408] Fix | Delete
</tr>
[409] Fix | Delete
</table>
[410] Fix | Delete
</div>
[411] Fix | Delete
<?php $this->bws_pro_block_links(); ?>
[412] Fix | Delete
</div>
[413] Fix | Delete
<?php } ?>
[414] Fix | Delete
<table class="form-table">
[415] Fix | Delete
<tr valign="top">
[416] Fix | Delete
<th scope="row"><?php esc_html_e( 'Sort Projects by', 'portfolio' ); ?></th>
[417] Fix | Delete
<td>
[418] Fix | Delete
<select name="prtfl_order_by">
[419] Fix | Delete
<option value="ID" <?php selected( 'ID', $this->options['order_by'] ); ?>><?php esc_html_e( 'Project ID', 'portfolio' ); ?></option>
[420] Fix | Delete
<option value="title" <?php selected( 'title', $this->options['order_by'] ); ?>><?php esc_html_e( 'Title', 'portfolio' ); ?></option>
[421] Fix | Delete
<option value="date" <?php selected( 'date', $this->options['order_by'] ); ?>><?php esc_html_e( 'Date', 'portfolio' ); ?></option>
[422] Fix | Delete
<option value="modified" <?php selected( 'modified', $this->options['order_by'] ); ?>><?php esc_html_e( 'Last modified date', 'portfolio' ); ?></option>
[423] Fix | Delete
<option value="comment_count" <?php selected( 'comment_count', $this->options['order_by'] ); ?>><?php esc_html_e( 'Comment count', 'portfolio' ); ?></option>
[424] Fix | Delete
<option value="menu_order" <?php selected( 'menu_order', $this->options['order_by'] ); ?>><?php esc_html_e( 'Sorting order (the input field for sorting order)', 'portfolio' ); ?></option>
[425] Fix | Delete
<option value="author" <?php selected( 'author', $this->options['order_by'] ); ?>><?php esc_html_e( 'Author', 'portfolio' ); ?></option>
[426] Fix | Delete
<option value="rand" <?php selected( 'rand', $this->options['order_by'] ); ?>><?php esc_html_e( 'Random', 'portfolio' ); ?></option>
[427] Fix | Delete
</select>
[428] Fix | Delete
<div class="bws_info"><?php esc_html_e( 'Select projects sorting order in your portfolio page.', 'portfolio' ); ?></div>
[429] Fix | Delete
</td>
[430] Fix | Delete
</tr>
[431] Fix | Delete
<tr valign="top">
[432] Fix | Delete
<th scope="row"><?php esc_html_e( 'Arrange Projects by', 'portfolio' ); ?></th>
[433] Fix | Delete
<td>
[434] Fix | Delete
<fieldset>
[435] Fix | Delete
<label><input type="radio" name="prtfl_order" value="ASC" <?php checked( 'ASC', $this->options['order'] ); ?> /> <?php esc_html_e( 'Ascending (e.g. 1, 2, 3; a, b, c)', 'portfolio' ); ?></label>
[436] Fix | Delete
<br />
[437] Fix | Delete
<label><input type="radio" name="prtfl_order" value="DESC" <?php checked( 'DESC', $this->options['order'] ); ?> /> <?php esc_html_e( 'Descending (e.g. 3, 2, 1; c, b, a)', 'portfolio' ); ?></label>
[438] Fix | Delete
</fieldset>
[439] Fix | Delete
</td>
[440] Fix | Delete
</tr>
[441] Fix | Delete
</table>
[442] Fix | Delete
<?php if ( ! $this->hide_pro_tabs ) { ?>
[443] Fix | Delete
<div class="bws_pro_version_bloc">
[444] Fix | Delete
<div class="bws_pro_version_table_bloc">
[445] Fix | Delete
<button type="submit" name="bws_hide_premium_options" class="notice-dismiss bws_hide_premium_options" title="<?php esc_html_e( 'Close', 'portfolio' ); ?>"></button>
[446] Fix | Delete
<div class="bws_table_bg"></div>
[447] Fix | Delete
<table class="form-table bws_pro_version">
[448] Fix | Delete
<tr valign="top">
[449] Fix | Delete
<th scope="row"><?php esc_html_e( 'Lightbox Helper', 'portfolio' ); ?></th>
[450] Fix | Delete
<td>
[451] Fix | Delete
<input disabled type="checkbox" name="" /> <span class="bws_info"><?php esc_html_e( 'Enable to use a lightbox helper navigation between images.', 'portfolio' ); ?></span>
[452] Fix | Delete
</td>
[453] Fix | Delete
</tr>
[454] Fix | Delete
<tr valign="top">
[455] Fix | Delete
<th scope="row"><?php esc_html_e( 'Lightbox Helper Type', 'portfolio' ); ?></th>
[456] Fix | Delete
<td>
[457] Fix | Delete
<select disabled name="">
[458] Fix | Delete
<option><?php esc_html_e( 'Thumbnails', 'portfolio' ); ?></option>
[459] Fix | Delete
<option><?php esc_html_e( 'Buttons', 'portfolio' ); ?></option>
[460] Fix | Delete
</select>
[461] Fix | Delete
</td>
[462] Fix | Delete
</tr>
[463] Fix | Delete
</table>
[464] Fix | Delete
</div>
[465] Fix | Delete
<?php $this->bws_pro_block_links(); ?>
[466] Fix | Delete
</div>
[467] Fix | Delete
<?php } ?>
[468] Fix | Delete
<table class="form-table">
[469] Fix | Delete
<tr valign="top">
[470] Fix | Delete
<th scope="row"><?php esc_html_e( 'Text Link', 'portfolio' ); ?></th>
[471] Fix | Delete
<td>
[472] Fix | Delete
<label>
[473] Fix | Delete
<input type="checkbox" name="prtfl_link_additional_field_for_non_registered" value="1" id="prtfl_link_additional_field_for_non_registered" <?php checked( 1, $this->options['link_additional_field_for_non_registered'] ); ?> /> <span class="bws_info"><?php esc_html_e( 'Enable to display link field as a text for non-registered users.', 'portfolio' ); ?></span>
[474] Fix | Delete
</label>
[475] Fix | Delete
</td>
[476] Fix | Delete
</tr>
[477] Fix | Delete
<tr>
[478] Fix | Delete
<th scope="row"><?php esc_html_e( 'Automatic Mailout when Publishing a New:', 'portfolio' ); ?></th>
[479] Fix | Delete
<td>
[480] Fix | Delete
<?php
[481] Fix | Delete
if ( array_key_exists( 'sender-pro/sender-pro.php', $this->all_plugins ) ) {
[482] Fix | Delete
if ( is_plugin_active( 'sender-pro/sender-pro.php' ) ) {
[483] Fix | Delete
?>
[484] Fix | Delete
<fieldset>
[485] Fix | Delete
<label>
[486] Fix | Delete
<input type="checkbox" name="prtfl_sndr_mailout" value="1" class="bws_option_affect" data-affect-show="[data-post-type=bws-portfolio]" <?php checked( in_array( 'bws-portfolio', $sndr_options['automailout_new_post'] ) ); ?> />&nbsp<?php esc_html_e( 'Projects', 'portfolio' ); ?>
[487] Fix | Delete
</label><br />
[488] Fix | Delete
<div data-post-type="bws-portfolio">
[489] Fix | Delete
<p><?php sndr_distribution_list_select( $sndr_options['group_for_post'], 'bws-portfolio' ); ?></p>
[490] Fix | Delete
<p><?php sndr_letters_list_select( $sndr_options['letter_for_post'], 'bws-portfolio' ); ?></p>
[491] Fix | Delete
<p>
[492] Fix | Delete
<?php
[493] Fix | Delete
sndr_priorities_list( $sndr_options['priority_for_post_letters'], '', 'bws-portfolio' );
[494] Fix | Delete
esc_html_e( 'Select mailout priority', 'portfolio' );
[495] Fix | Delete
?>
[496] Fix | Delete
<br /><span class="bws_info"><?php esc_html_e( 'Less number - higher priority', 'portfolio' ); ?></span>
[497] Fix | Delete
</p><br/>
[498] Fix | Delete
</div>
[499] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function