wp/wp-content/plugins/portfolio/inc/class-prtfl-settings.php
author ymh <ymh.work@gmail.com>
Tue, 15 Dec 2020 13:49:49 +0100
changeset 16 a86126ab1dd4
parent 12 d8a8807227e4
child 19 3d72ae0968f4
permissions -rwxr-xr-x
update enmi-conf
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
     1
<?php
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
     2
/**
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
     3
 * Displays the content on the plugin settings page
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
     4
 */
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
     5
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
     6
if ( ! class_exists( 'Prtfl_Settings_Tabs' ) ) {
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
     7
	class Prtfl_Settings_Tabs extends Bws_Settings_Tabs {
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
     8
		public $wp_image_sizes = array();
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
     9
		public $cstmsrch_options, $fields;
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    10
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    11
		/**
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    12
		 * Constructor.
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    13
		 *
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    14
		 * @access public
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    15
		 *
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    16
		 * @see Bws_Settings_Tabs::__construct() for more information on default arguments.
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    17
		 *
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    18
		 * @param string $plugin_basename
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    19
		 */
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    20
		public function __construct( $plugin_basename ) {
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    21
			global $prtfl_options, $prtfl_plugin_info, $prtfl_BWS_demo_data;
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    22
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    23
			$tabs = array(
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    24
				'settings' 		=> array( 'label' => __( 'Settings', 'portfolio' ) ),
16
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
    25
				'project' 		=> array( 'label' => __( 'Project', 'portfolio' ) ),
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    26
				'misc' 			=> array( 'label' => __( 'Misc', 'portfolio' ) ),
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    27
				'custom_code' 	=> array( 'label' => __( 'Custom Code', 'portfolio' ) ),
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    28
				'import-export' => array( 'label' => __( 'Import / Export', 'portfolio' ) ),
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    29
				'license'		=> array( 'label' => __( 'License Key', 'portfolio' ) ),
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    30
			);
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    31
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    32
			parent::__construct( array(
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    33
				'plugin_basename' 	 => $plugin_basename,
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    34
				'plugins_info'		 => $prtfl_plugin_info,
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    35
				'prefix' 			 => 'prtfl',
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    36
				'default_options' 	 => prtfl_get_options_default(),
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    37
				'options' 			 => $prtfl_options,
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    38
				'tabs' 				 => $tabs,
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    39
				'wp_slug'			 => 'portfolio',
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    40
				'demo_data'			 => $prtfl_BWS_demo_data,
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    41
				'link_key' 			 => 'f047e20c92c972c398187a4f70240285',
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    42
				'link_pn' 			 => '74',
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    43
			) );
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    44
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    45
			$wp_sizes = get_intermediate_image_sizes();
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    46
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    47
			foreach ( (array) $wp_sizes as $size ) {
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    48
				if ( ! array_key_exists( $size, $prtfl_options['custom_size_px'] ) ) {
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    49
					if ( isset( $_wp_additional_image_sizes[ $size ] ) ) {
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    50
						$width  = absint( $_wp_additional_image_sizes[ $size ]['width'] );
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    51
						$height = absint( $_wp_additional_image_sizes[ $size ]['height'] );
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    52
					} else {
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    53
						$width  = absint( get_option( $size . '_size_w' ) );
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    54
						$height = absint( get_option( $size . '_size_h' ) );
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    55
					}
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    56
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    57
					if ( ! $width && ! $height ) {
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    58
						$this->wp_image_sizes[] = array(
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    59
							'value'  => $size,
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    60
							'name'   => ucwords( str_replace( array( '-', '_' ), ' ', $size ) ),
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    61
						);
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    62
					} else {
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    63
						$this->wp_image_sizes[] = array(
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    64
							'value'  => $size,
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    65
							'name'   => ucwords( str_replace( array( '-', '_' ), ' ', $size ) ) . ' (' . $width . ' &#215; ' . $height . ')',
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    66
							'width'  => $width,
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    67
							'height' => $height
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    68
						);
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    69
					}
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    70
				}
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    71
			}
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    72
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    73
			$this->cstmsrch_options = get_option( 'cstmsrch_options' );
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    74
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    75
			$this->fields = array(
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    76
				'executor'			=> __( 'Executors', 'portfolio' ),
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    77
				'technologies'		=> __( 'Technologies', 'portfolio' ),
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    78
				'date'				=> __( 'Date of completion', 'portfolio' ),
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    79
				'link'				=> __( 'Link', 'portfolio' ),
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    80
				'shrdescription'	=> __( 'Short Description', 'portfolio' ),
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    81
				'description'		=> __( 'Description', 'portfolio' ),
16
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
    82
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    83
			);
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    84
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    85
			add_action( get_parent_class( $this ) . '_display_custom_messages', array( $this, 'display_custom_messages' ) );
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    86
			add_action( get_parent_class( $this ) . '_additional_misc_options_affected', array( $this, 'additional_misc_options_affected' ) );
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    87
			add_action( get_parent_class( $this ) . '_additional_import_export_options', array( $this, 'additional_import_export_options' ) );
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    88
			add_action( get_parent_class( $this ) . '_display_metabox', array( $this, 'display_metabox' ) );
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    89
		}
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    90
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    91
		/**
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    92
		 * Save plugin options to the database
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    93
		 * @access public
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    94
		 * @param  void
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    95
		 * @return array    The action results
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    96
		 */
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    97
		public function save_options() {
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
    98
16
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
    99
			$message = $notice = $error = '';
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   100
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   101
			$this->options["custom_image_row_count"] = absint( $_POST['prtfl_custom_image_row_count'] );
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   102
			$this->options["custom_portfolio_row_count"] = absint( $_POST['prtfl_portfolio_custom_row_count'] );
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   103
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   104
			$new_image_size_photo 		= esc_attr( $_POST['prtfl_image_size_photo'] );
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   105
			$custom_image_size_w_photo 	= intval( $_POST['prtfl_custom_image_size_w_photo'] );
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   106
			$custom_image_size_h_photo 	= intval( $_POST['prtfl_custom_image_size_h_photo'] );
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   107
			$custom_size_px_photo 		= array( $custom_image_size_w_photo, $custom_image_size_h_photo );
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   108
			if ( 'portfolio-photo-thumb' == $new_image_size_photo ) {
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   109
				if ( $new_image_size_photo != $this->options['image_size_photo'] ) {
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   110
					$need_image_update = true;
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   111
				} else {
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   112
					foreach ( $custom_size_px_photo as $key => $value ) {
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   113
						if ( $value != $this->options['custom_size_px']['portfolio-photo-thumb'][ $key ] ) {
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   114
							$need_image_update = true;
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   115
							break;
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   116
						}
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   117
					}
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   118
				}
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   119
			}
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   120
			$this->options['custom_size_px']['portfolio-photo-thumb'] = $custom_size_px_photo;
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   121
			$this->options['image_size_photo'] 				= $new_image_size_photo;
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   122
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   123
			$new_image_size_album 		= esc_attr( $_POST['prtfl_image_size_album'] );
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   124
			$custom_image_size_w_album 	= intval( $_POST['prtfl_custom_image_size_w_album'] );
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   125
			$custom_image_size_h_album 	= intval( $_POST['prtfl_custom_image_size_h_album'] );
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   126
			$custom_size_px_album 		= array( $custom_image_size_w_album, $custom_image_size_h_album );
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   127
			if ( 'portfolio-thumb' == $new_image_size_album ) {
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   128
				if ( $new_image_size_album != $this->options['image_size_album'] ) {
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   129
					$need_image_update = true;
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   130
				} else {
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   131
					foreach ( $custom_size_px_album as $key => $value ) {
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   132
						if ( $value != $this->options['custom_size_px']['portfolio-thumb'][ $key ] ) {
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   133
							$need_image_update = true;
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   134
							break;
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   135
						}
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   136
					}
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   137
				}
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   138
			}
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   139
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   140
			$this->options['custom_size_px']['portfolio-thumb'] = $custom_size_px_album;
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   141
			$this->options['image_size_album'] 				= $new_image_size_album;
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   142
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   143
			if ( ! empty( $_POST['prtfl_page_id_portfolio_template'] ) && $this->options['page_id_portfolio_template'] != intval( $_POST['prtfl_page_id_portfolio_template'] ) ) {
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   144
				/* for rewrite */
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   145
				$this->options["flush_rewrite_rules"] = 1;
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   146
				$this->options['page_id_portfolio_template'] = intval( $_POST['prtfl_page_id_portfolio_template'] );
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   147
			}
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   148
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   149
			$this->options["order_by"]		= esc_attr( $_POST['prtfl_order_by'] );
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   150
			$this->options["order"]			= esc_attr( $_POST['prtfl_order'] );
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   151
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   152
			if ( ! empty( $need_image_update ) ) {
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   153
				$this->options['need_image_update'] = __( 'Custom image size was changed. You need to update project images.', 'portfolio' );
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   154
			}
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   155
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   156
			$this->options["link_additional_field_for_non_registered"] = isset( $_REQUEST["prtfl_link_additional_field_for_non_registered"] ) ? 1 : 0;
16
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   157
			$this->options["svn_text_field"] = sanitize_text_field( $_REQUEST["prtfl_svn_text_field"] );
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   158
			$this->options["svn_additional_field_for_non_logged"] = isset( $_REQUEST["prtfl_svn_additional_field_for_non_logged"] ) ? 1 : 0;
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   159
			$this->options["svn_additional_field"] = isset( $_REQUEST["prtfl_svn_additional_field"] ) ? 1 : 0;
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   160
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   161
			foreach ( $this->fields as $field_key => $field_title ) {
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   162
				$this->options[ $field_key . '_additional_field'] = isset( $_REQUEST['prtfl_' . $field_key . '_additional_field'] ) ? 1 : 0;
16
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   163
				$this->options[ $field_key . '_text_field'] = stripslashes( sanitize_text_field( $_REQUEST['prtfl_' . $field_key . '_text_field'] ) );
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   164
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   165
			}
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   166
16
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   167
			$this->options['screenshot_text_field'] = stripslashes( sanitize_text_field( $_REQUEST['prtfl_screenshot_text_field'] ) );
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   168
16
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   169
			if ( $this->options["slug"] != $_POST['prtfl_slug'] )
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   170
				$this->options["flush_rewrite_rules"] = 1;
16
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   171
			$this->options["slug"] = sanitize_title( $_POST['prtfl_slug'] );
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   172
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   173
			/**
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   174
			 * rewriting post types name with unique one from default options
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   175
			 */
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   176
			if ( ! empty( $_POST['prtfl_rename_post_type'] ) ) {
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   177
				global $wpdb;
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   178
				$wpdb->update(
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   179
					$wpdb->prefix . 'posts',
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   180
					array( 'post_type' => $this->default_options['post_type_name'] ),
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   181
					array( 'post_type' => $this->options['post_type_name'] )
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   182
				);
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   183
				$this->options['post_type_name'] = $this->default_options['post_type_name'];
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   184
			}
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   185
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   186
			if ( ! empty( $this->cstmsrch_options ) ) {
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   187
				if ( isset( $this->cstmsrch_options['output_order'] ) ) {
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   188
					$is_enabled = isset( $_POST['prtfl_add_to_search'] ) ? 1 : 0;
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   189
					$post_type_exist = false;
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   190
					foreach ( $this->cstmsrch_options['output_order'] as $key => $item ) {
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   191
						if ( $item['name'] == $this->options['post_type_name'] && 'post_type' == $item['type'] ) {
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   192
							$post_type_exist = true;
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   193
							if ( $item['enabled'] != $is_enabled ) {
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   194
								$this->cstmsrch_options['output_order'][ $key ]['enabled'] = $is_enabled;
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   195
								$cstmsrch_options_update = true;
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   196
							}
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   197
							break;
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   198
						}
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   199
					}
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   200
					if ( ! $post_type_exist ) {
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   201
						$this->cstmsrch_options['output_order'][] = array(
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   202
							'name' 		=> $this->options['post_type_name'],
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   203
							'type' 		=> 'post_type',
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   204
							'enabled' 	=> $is_enabled );
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   205
						$cstmsrch_options_update = true;
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   206
					}
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   207
				} elseif ( isset( $this->cstmsrch_options['post_types'] ) ) {
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   208
					if ( isset( $_POST['prtfl_add_to_search'] ) && ! in_array( $this->options['post_type_name'], $this->cstmsrch_options['post_types'] ) ) {
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   209
						array_push( $this->cstmsrch_options['post_types'], $this->options['post_type_name'] );
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   210
						$cstmsrch_options_update = true;
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   211
					} elseif ( ! isset( $_POST['prtfl_add_to_search'] ) && in_array( $this->options['post_type_name'], $this->cstmsrch_options['post_types'] ) ) {
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   212
						unset( $this->cstmsrch_options['post_types'][ array_search( $this->options['post_type_name'], $this->cstmsrch_options['post_types'] ) ] );
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   213
						$cstmsrch_options_update = true;
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   214
					}
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   215
				}
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   216
				if ( isset( $cstmsrch_options_update ) ) {
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   217
					update_option( 'cstmsrch_options', $this->cstmsrch_options );
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   218
				}
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   219
			}
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   220
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   221
			update_option( 'prtfl_options', $this->options );
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   222
			$message = __( "Settings saved.", 'portfolio' );
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   223
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   224
			return compact( 'message', 'notice', 'error' );
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   225
		}
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   226
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   227
		/**
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   228
		 * Display custom error\message\notice
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   229
		 * @access public
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   230
		 * @param  $save_results - array with error\message\notice
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   231
		 * @return void
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   232
		 */
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   233
		public function display_custom_messages( $save_results ) { ?>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   234
			<noscript><div class="error below-h2"><p><strong><?php _e( "Please enable JavaScript in Your browser.", 'portfolio' ); ?></strong></p></div></noscript>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   235
			<?php if ( ! empty( $this->options['need_image_update'] ) ) { ?>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   236
				<div class="updated bws-notice inline prtfl_image_update_message">
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   237
					<p>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   238
						<?php echo $this->options['need_image_update']; ?>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   239
						<input type="button" value="<?php _e( 'Update Images', 'portfolio' ); ?>" id="prtfl_ajax_update_images" name="ajax_update_images" class="button" />
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   240
					</p>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   241
				</div>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   242
			<?php }
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   243
		}
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   244
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   245
		/**
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   246
		 *
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   247
		 */
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   248
		public function tab_settings() { ?>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   249
			<h3 class="bws_tab_label"><?php _e( 'Portfolio Settings', 'portfolio' ); ?></h3>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   250
			<?php $this->help_phrase(); ?>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   251
			<hr>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   252
			<table class="form-table">
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   253
				<tr valign="top">
16
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   254
					<th scope="row"><?php _e( 'Portfolio Page', 'portfolio' ); ?></th>
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   255
					<td>
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   256
						<?php wp_dropdown_pages( array(
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   257
							'depth'                 => 0,
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   258
							'selected'              => $this->options['page_id_portfolio_template'],
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   259
							'name'                  => 'prtfl_page_id_portfolio_template',
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   260
							'show_option_none'		=> '...'
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   261
						) ); ?>
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   262
						<div class="bws_info"><?php _e( 'Base page where all existing projects will be displayed.' , 'portfolio'); ?></div>
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   263
					</td>
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   264
				</tr>
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   265
				<tr valign="top">
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   266
					<th scope="row"><?php _e( 'Number of Columns', 'portfolio' ); ?> </th>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   267
					<td>
12
d8a8807227e4 upgrade portofolio
ymh <ymh.work@gmail.com>
parents: 7
diff changeset
   268
						<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' ); ?>
d8a8807227e4 upgrade portofolio
ymh <ymh.work@gmail.com>
parents: 7
diff changeset
   269
						<div class="bws_info"><?php printf( __( 'Number of portfolio columns (default is %s).', 'portfolio' ), '1' ); ?></div>
d8a8807227e4 upgrade portofolio
ymh <ymh.work@gmail.com>
parents: 7
diff changeset
   270
					</td>
d8a8807227e4 upgrade portofolio
ymh <ymh.work@gmail.com>
parents: 7
diff changeset
   271
				</tr>
d8a8807227e4 upgrade portofolio
ymh <ymh.work@gmail.com>
parents: 7
diff changeset
   272
				<tr valign="top">
16
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   273
					<th scope="row"><?php _e( 'Number of Image Columns', 'portfolio' ); ?> </th>
12
d8a8807227e4 upgrade portofolio
ymh <ymh.work@gmail.com>
parents: 7
diff changeset
   274
					<td>
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   275
						<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' ); ?>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   276
						 <div class="bws_info"><?php printf( __( 'Number of image columns (default is %s).', 'portfolio' ), '3' ); ?></div>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   277
					</td>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   278
				</tr>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   279
				<tr valign="top">
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   280
					<th scope="row"><?php _e( 'Image Size', 'portfolio' ); ?></th>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   281
					<td>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   282
						<select name="prtfl_image_size_photo">
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   283
							<?php foreach ( $this->wp_image_sizes as $data ) { ?>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   284
								<option value="<?php echo $data['value']; ?>" <?php selected( $data['value'], $this->options['image_size_photo'] ); ?>><?php echo $data['name']; ?></option>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   285
							<?php } ?>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   286
							<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 _e( 'Custom', 'portfolio' ); ?></option>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   287
						</select>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   288
						<div class="bws_info"><?php _e( 'Maximum portfolio image size. "Custom" uses the Image Dimensions values.', 'portfolio' ); ?></div>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   289
					</td>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   290
				</tr>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   291
				<tr valign="top" class="prtfl_for_custom_image_size">
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   292
					<th scope="row"><?php _e( 'Custom Image Size', 'portfolio' ); ?> </th>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   293
					<td>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   294
						<input type="number" name="prtfl_custom_image_size_w_photo" min="1" max="10000" value="<?php echo $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 $this->options['custom_size_px']['portfolio-photo-thumb'][1]; ?>" /> px <div class="bws_info"><?php _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>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   295
					</td>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   296
				</tr>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   297
				<tr valign="top">
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   298
					<th scope="row"><?php _e( 'Cover Image Size', 'portfolio' ); ?> </th>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   299
					<td>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   300
						<select name="prtfl_image_size_album">
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   301
							<?php foreach ( $this->wp_image_sizes as $data ) { ?>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   302
								<option value="<?php echo $data['value']; ?>" <?php selected( $data['value'], $this->options['image_size_album'] ); ?>><?php echo $data['name']; ?></option>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   303
							<?php } ?>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   304
							<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>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   305
						</select>
16
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   306
						<div class="bws_info"><?php _e( 'Maximum cover image size. "Custom" uses the Image Dimensions values.', 'portfolio' ); ?></div>
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   307
					</td>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   308
				</tr>
16
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   309
                <tr valign="top" class="prtfl_for_custom_image_size_album">
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   310
                    <th scope="row"><?php _e( 'Custom Cover Image Size', 'portfolio' ); ?> </th>
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   311
                    <td>
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   312
                        <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
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   313
                    </td>
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   314
                </tr>
12
d8a8807227e4 upgrade portofolio
ymh <ymh.work@gmail.com>
parents: 7
diff changeset
   315
            </table>
d8a8807227e4 upgrade portofolio
ymh <ymh.work@gmail.com>
parents: 7
diff changeset
   316
            <?php if ( ! $this->hide_pro_tabs ) { ?>
d8a8807227e4 upgrade portofolio
ymh <ymh.work@gmail.com>
parents: 7
diff changeset
   317
                <div class="bws_pro_version_bloc">
d8a8807227e4 upgrade portofolio
ymh <ymh.work@gmail.com>
parents: 7
diff changeset
   318
                    <div class="bws_pro_version_table_bloc">
d8a8807227e4 upgrade portofolio
ymh <ymh.work@gmail.com>
parents: 7
diff changeset
   319
                        <button type="submit" name="bws_hide_premium_options" class="notice-dismiss bws_hide_premium_options" title="<?php _e( 'Close', 'portfolio' ); ?>"></button>
d8a8807227e4 upgrade portofolio
ymh <ymh.work@gmail.com>
parents: 7
diff changeset
   320
                        <div class="bws_table_bg"></div>
d8a8807227e4 upgrade portofolio
ymh <ymh.work@gmail.com>
parents: 7
diff changeset
   321
                        <table class="form-table bws_pro_version">
d8a8807227e4 upgrade portofolio
ymh <ymh.work@gmail.com>
parents: 7
diff changeset
   322
                            <tr valign="top">
d8a8807227e4 upgrade portofolio
ymh <ymh.work@gmail.com>
parents: 7
diff changeset
   323
                                <th scope="row"><?php _e( 'Slider Image Size', 'portfolio' ); ?> </th>
d8a8807227e4 upgrade portofolio
ymh <ymh.work@gmail.com>
parents: 7
diff changeset
   324
                                <td>
16
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   325
                                    <select disabled="disabled" name="prtfl_image_size_slider">
12
d8a8807227e4 upgrade portofolio
ymh <ymh.work@gmail.com>
parents: 7
diff changeset
   326
                                        <option value="large">Large (1024 × 1024)</option>
d8a8807227e4 upgrade portofolio
ymh <ymh.work@gmail.com>
parents: 7
diff changeset
   327
                                    </select>
16
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   328
                                    <div class="bws_info"><?php _e( 'Maximum slider image size. "Custom" uses the Image Dimensions values.', 'portfolio' ); ?></div>
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   329
                                </td>
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   330
                            </tr>
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   331
                            <tr valign="top">
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   332
                                <th scope="row"><?php _e( 'Sort Projects Option', 'portfolio' ); ?></th>
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   333
                                <td>
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   334
                                    <label>
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   335
                                        <input type="checkbox" name="prtfl_sorting_selectbox" value="1" disabled="disabled" /> <span class="bws_info"><?php _e( 'Enable to display sort projects manually by date or title.', 'portfolio' ); ?></span>
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   336
                                    </label>
12
d8a8807227e4 upgrade portofolio
ymh <ymh.work@gmail.com>
parents: 7
diff changeset
   337
                                </td>
d8a8807227e4 upgrade portofolio
ymh <ymh.work@gmail.com>
parents: 7
diff changeset
   338
                            </tr>
d8a8807227e4 upgrade portofolio
ymh <ymh.work@gmail.com>
parents: 7
diff changeset
   339
                        </table>
d8a8807227e4 upgrade portofolio
ymh <ymh.work@gmail.com>
parents: 7
diff changeset
   340
                    </div>
d8a8807227e4 upgrade portofolio
ymh <ymh.work@gmail.com>
parents: 7
diff changeset
   341
                    <?php $this->bws_pro_block_links(); ?>
d8a8807227e4 upgrade portofolio
ymh <ymh.work@gmail.com>
parents: 7
diff changeset
   342
                </div>
d8a8807227e4 upgrade portofolio
ymh <ymh.work@gmail.com>
parents: 7
diff changeset
   343
            <?php } ?>
d8a8807227e4 upgrade portofolio
ymh <ymh.work@gmail.com>
parents: 7
diff changeset
   344
            <table class="form-table">
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   345
				<tr valign="top">
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   346
					<th scope="row"><?php _e( 'Sort Projects by', 'portfolio' ); ?></th>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   347
					<td>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   348
						<select name="prtfl_order_by">
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   349
							<option value="ID" <?php selected( 'ID', $this->options["order_by"] ); ?>><?php _e( 'Project ID', 'portfolio' ); ?></option>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   350
							<option value="title" <?php selected( 'title', $this->options["order_by"] ); ?>><?php _e( 'Title', 'portfolio' ); ?></option>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   351
							<option value="date" <?php selected( 'date', $this->options["order_by"] ); ?>><?php _e( 'Date', 'portfolio' ); ?></option>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   352
							<option value="modified" <?php selected( 'modified', $this->options["order_by"] ); ?>><?php _e( 'Last modified date', 'portfolio' ); ?></option>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   353
							<option value="comment_count" <?php selected( 'comment_count', $this->options["order_by"] ); ?>><?php _e( 'Comment count', 'portfolio' ); ?></option>	
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   354
							<option value="menu_order" <?php selected( 'menu_order', $this->options["order_by"] ); ?>><?php _e( 'Sorting order (the input field for sorting order)', 'portfolio' ); ?></option>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   355
							<option value="author" <?php selected( 'author', $this->options["order_by"] ); ?>><?php _e( 'Author', 'portfolio' ); ?></option>	
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   356
							<option value="rand" <?php selected( 'rand', $this->options["order_by"] ); ?>><?php _e( 'Random', 'portfolio' ); ?></option>							
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   357
						</select>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   358
						<div class="bws_info"><?php _e( 'Select projects sorting order in your portfolio page.', 'portfolio' ); ?></div>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   359
					</td>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   360
				</tr>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   361
				<tr valign="top">
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   362
					<th scope="row"><?php _e( 'Arrange Projects by', 'portfolio' ); ?></th>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   363
					<td>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   364
						<fieldset>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   365
							<label><input type="radio" name="prtfl_order" value="ASC" <?php checked( 'ASC', $this->options["order"] ); ?> /> <?php _e( 'Ascending (e.g. 1, 2, 3; a, b, c)', 'portfolio' ); ?></label>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   366
							<br />
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   367
							<label><input type="radio" name="prtfl_order" value="DESC" <?php checked( 'DESC', $this->options["order"] ); ?> /> <?php _e( 'Descending (e.g. 3, 2, 1; c, b, a)', 'portfolio' ); ?></label>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   368
						</fieldset>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   369
					</td>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   370
				</tr>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   371
			</table>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   372
			<?php if ( ! $this->hide_pro_tabs ) { ?>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   373
				<div class="bws_pro_version_bloc">
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   374
					<div class="bws_pro_version_table_bloc">
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   375
						<button type="submit" name="bws_hide_premium_options" class="notice-dismiss bws_hide_premium_options" title="<?php _e( 'Close', 'portfolio' ); ?>"></button>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   376
						<div class="bws_table_bg"></div>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   377
						<table class="form-table bws_pro_version">
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   378
							<tr valign="top">
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   379
								<th scope="row"><?php _e( 'Lightbox Helper', 'portfolio' ); ?></th>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   380
								<td>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   381
									<input disabled type="checkbox" name="" /> <span class="bws_info"><?php _e( 'Enable to use a lightbox helper navigation between images.', 'portfolio' ); ?></span>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   382
								</td>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   383
							</tr>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   384
							<tr valign="top">
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   385
								<th scope="row"><?php _e( 'Lightbox Helper Type', 'portfolio' ); ?></th>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   386
								<td>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   387
									<select disabled name="">
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   388
										<option><?php _e( 'Thumbnails', 'portfolio' ); ?></option>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   389
										<option><?php _e( 'Buttons', 'portfolio' ); ?></option>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   390
									</select>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   391
								</td>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   392
							</tr>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   393
						</table>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   394
					</div>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   395
					<?php $this->bws_pro_block_links(); ?>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   396
				</div>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   397
			<?php } ?>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   398
			<table class="form-table">
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   399
				<tr valign="top">
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   400
					<th scope="row"><?php _e( 'Text Link', 'portfolio' ); ?></th>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   401
					<td>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   402
						<label>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   403
							<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 _e( 'Enable to display link field as a text for non-registered users.', 'portfolio' ); ?></span>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   404
						</label>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   405
					</td>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   406
				</tr>
16
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   407
			</table>
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   408
        <?php }
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   409
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   410
		/**
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   411
		 *
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   412
		 */
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   413
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   414
		public function tab_project() { ?>
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   415
			<h3 class="bws_tab_label"><?php _e( 'Single Project Settings', 'portfolio' ); ?></h3>
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   416
			<?php $this->help_phrase(); ?>
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   417
			<hr>
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   418
			<table class="form-table">
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   419
				<tr valign="top">
16
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   420
					<th scope="row" class="prtfl_table_project"><?php _e( 'Projects Fields', 'portfolio' ); ?> </th>
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   421
					<td>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   422
						<fieldset>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   423
							<?php foreach ( $this->fields as $field_key => $field_title ) { ?>
16
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   424
								<label class="prtfl_label_project">
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   425
									<input<?php echo $this->change_permission_attr; ?> type="checkbox" name="prtfl_<?php echo $field_key; ?>_additional_field" value="1" <?php checked( 1, $this->options[ $field_key . '_additional_field'] ); ?> />
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   426
									 <?php echo $field_title; ?>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   427
									<br>
16
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   428
									<input<?php echo $this->change_permission_attr; ?> class="prtfl_input_project" type="text" name="prtfl_<?php echo $field_key; ?>_text_field" maxlength="250" value="<?php echo $this->options[ $field_key . '_text_field']; ?>" />
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   429
								</label>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   430
								<br />
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   431
							<?php } ?>
16
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   432
							<label class="prtfl_label_project">
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   433
								<input<?php echo $this->change_permission_attr; ?> type="checkbox" name="prtfl_svn_additional_field" value="1" <?php checked( 1, $this->options["svn_additional_field"] ); ?> />
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   434
								 <?php _e( 'Source Files, URL', 'portfolio' ); ?>
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   435
							</label>
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   436
							<label class="prtfl_label_project" id="prtfl_non_logged">
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   437
								<input<?php echo $this->change_permission_attr; ?> type="checkbox" name="prtfl_svn_additional_field_for_non_logged" value="1" <?php checked( 1, $this->options["svn_additional_field_for_non_logged"] ); ?> />
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   438
								 <?php _e( 'Display only for logged-in users', 'portfolio' ); ?>
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   439
							</label> 
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   440
							<label class="prtfl_label_project">
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   441
								<input<?php echo $this->change_permission_attr; ?> class="prtfl_input_project" type="text" name="prtfl_svn_text_field" maxlength="250" value= "<?php echo $this->options["svn_text_field"]; ?>" />
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   442
							</label>
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   443
							<label class="prtfl_label_project">
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   444
								 <?php _e( '"More screenshots" block', 'portfolio' ); ?>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   445
								<br>
16
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   446
								<input class="prtfl_input_project" type="text" name="prtfl_screenshot_text_field" maxlength="250" value="<?php echo $this->options["screenshot_text_field"]; ?>" />
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   447
							</label>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   448
						</fieldset>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   449
					</td>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   450
				</tr>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   451
			</table>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   452
			<?php if ( ! $this->hide_pro_tabs ) { ?>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   453
				<div class="bws_pro_version_bloc">
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   454
					<div class="bws_pro_version_table_bloc">
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   455
						<button type="submit" name="bws_hide_premium_options" class="notice-dismiss bws_hide_premium_options" title="<?php _e( 'Close', 'portfolio' ); ?>"></button>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   456
						<div class="bws_table_bg"></div>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   457
						<table class="form-table bws_pro_version">
16
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   458
							<tr>
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   459
								<th scope="row" class="prtfl_table_project"><?php _e( 'Projects Fields', 'portfolio' ); ?></th>
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   460
								<td>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   461
									<fieldset>
16
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   462
										<label class="prtfl_label_project">
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   463
											<input type="checkbox" name="prtfl_categories_additional_field" value="1" disabled="disabled" />
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   464
											 <?php _e( 'Categories', 'portfolio' ); ?><br />
16
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   465
											<input class="prtfl_input_project" type="text" name="prtfl_categories_text_field" value="<?php _e( 'Categories', 'portfolio' ); ?>:" disabled="disabled" />
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   466
										</label><br />
16
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   467
										<label class="prtfl_label_project">
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   468
											<input type="checkbox" name="prtfl_sectors_additional_field" value="1" disabled="disabled" />
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   469
											 <?php _e( 'Sectors', 'portfolio' ); ?><br />
16
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   470
											<input class="prtfl_input_project" type="text" name="prtfl_sectors_text_field" value="<?php _e( 'Sectors', 'portfolio' ); ?>:" disabled="disabled" />
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   471
										</label><br />
16
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   472
										<label class="prtfl_label_project">
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   473
											<input type="checkbox" name="prtfl_services_additional_field" value="1" disabled="disabled" />
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   474
											 <?php _e( 'Services', 'portfolio' ); ?><br />
16
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   475
											<input class="prtfl_input_project" type="text" name="prtfl_services_text_field" value="<?php _e( 'Services', 'portfolio' ); ?>:" disabled="disabled" />
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   476
										</label><br />
16
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   477
										<label class="prtfl_label_project">
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   478
											<input type="checkbox" name="prtfl_client_additional_field" value="1" disabled="disabled" />
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   479
											 <?php _e( 'Client', 'portfolio' ); ?><br />
16
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   480
											<input class="prtfl_input_project" type="text" name="prtfl_client_text_field" value="<?php _e( 'Client', 'portfolio' ); ?>:" disabled="disabled" />
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   481
										</label><br />
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   482
										<label><input type="checkbox" name="prtfl_disbable_screenshot_block" value="1" disabled="disabled" /> <?php _e( '"More screenshots" block', 'portfolio' ); ?></label><br />
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   483
									</fieldset>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   484
								</td>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   485
							</tr>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   486
						</table>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   487
					</div>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   488
					<?php $this->bws_pro_block_links(); ?>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   489
				</div>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   490
			<?php }
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   491
		}
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   492
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   493
		/**
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   494
		 *
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   495
		 */
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   496
		public function additional_import_export_options() { ?>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   497
			<table class="form-table">
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   498
				<tr valign="top">
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   499
					<th scope="row"><?php _e( 'Demo Data', 'portfolio' ); ?></th>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   500
					<td>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   501
						<?php $this->demo_data->bws_show_demo_button( __( 'Install demo data to create portfolio projects with images, post with shortcodes and page with a list of all portfolio projects.', 'portfolio' ) ); ?>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   502
					</td>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   503
				</tr>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   504
			</table>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   505
		<?php }
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   506
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   507
		/**
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   508
		 * Display custom options on the 'misc' tab
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   509
		 * @access public
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   510
		 */
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   511
		public function additional_misc_options_affected() {
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   512
			global $wp_version;
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   513
			if ( ! $this->all_plugins ) {
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   514
				if ( ! function_exists( 'get_plugins' ) ) {
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   515
					require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   516
				}
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   517
				$this->all_plugins = get_plugins();
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   518
			}
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   519
			if ( $this->options['post_type_name'] != $this->default_options['post_type_name'] ) { ?>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   520
				<tr valign="top">
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   521
					<th scope="row"><?php _e( 'Portfolio Post Type', 'portfolio' ); ?></th>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   522
					<td>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   523
						<input type="checkbox" name="prtfl_rename_post_type" value="1" />
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   524
						<span class="bws_info">
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   525
							<?php _e( 'Enable to avoid conflicts with other portfolio plugins installed. All portfolio created earlier will stay unchanged. However, after enabling we recommend to check settings of other plugins where "portfolio" post type is used.', 'portfolio' ); ?>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   526
						</span>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   527
					</td>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   528
				</tr>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   529
			<?php } ?>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   530
			<tr valign="top">
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   531
				<th scope="row"><?php _e( 'Portfolio Slug', 'portfolio' ); ?></th>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   532
				<td>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   533
					<input type="text" name="prtfl_slug" maxlength="100" value="<?php echo $this->options["slug"]; ?>" />
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   534
					<div class="bws_info"><?php _e( 'Enter the unique portfolio slug.', 'portfolio' ); ?></div>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   535
				</td>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   536
			</tr>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   537
			<tr valign="top">
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   538
				<th scope="row"><?php _e( 'Search Portfolio Projects', 'portfolio' ); ?></th>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   539
				<td>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   540
					<?php $disabled = $checked = $link = '';
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   541
					if ( array_key_exists( 'custom-search-plugin/custom-search-plugin.php', $this->all_plugins ) || array_key_exists( 'custom-search-pro/custom-search-pro.php', $this->all_plugins ) ) {
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   542
						if ( ! is_plugin_active( 'custom-search-plugin/custom-search-plugin.php' ) && ! is_plugin_active( 'custom-search-pro/custom-search-pro.php' ) ) {
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   543
							$disabled = ' disabled="disabled"';
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   544
							$link = '<a href="' . admin_url( 'plugins.php' ) . '">' . __( 'Activate Now', 'portfolio' ) . '</a>';
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   545
						}
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   546
						if ( isset( $this->cstmsrch_options['output_order'] ) ) {
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   547
							foreach ( $this->cstmsrch_options['output_order'] as $key => $item ) {
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   548
								if ( $item['name'] == $this->options['post_type_name'] && 'post_type' == $item['type'] ) {
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   549
									if ( $item['enabled'] ) {
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   550
										$checked = ' checked="checked"';
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   551
									}
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   552
									break;
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   553
								}
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   554
							}
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   555
						} elseif ( ! empty( $this->cstmsrch_options['post_types'] ) && in_array( $this->options['post_type_name'], $this->cstmsrch_options['post_types'] ) ) {
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   556
							$checked = ' checked="checked"';
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   557
						}
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   558
					} else {
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   559
						$disabled = ' disabled="disabled"';
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   560
						$link = '<a href="https://bestwebsoft.com/products/wordpress/plugins/custom-search/?k=75e20470c8716645cf65febf9d30f269&amp;pn=' . $this->link_pn . '&amp;v=' . $this->plugins_info["Version"] . '&amp;wp_v=' . $wp_version . '" target="_blank">' . __( 'Install Now', 'portfolio' ) . '</a>';
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   561
					} ?>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   562
					<input type="checkbox" name="prtfl_add_to_search" value="1"<?php echo $disabled . $checked; ?> />
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   563
					 <span class="bws_info"><?php _e( 'Enable to include portfolio projects to your website search.', 'portfolio' ); ?> <?php printf( __( '%s plugin is required.', 'portfolio' ), 'Custom Search' ); ?> <?php echo $link; ?></span>					
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   564
				</td>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   565
			</tr>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   566
		<?php }
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   567
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   568
		/**
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   569
		 * Display custom metabox
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   570
		 * @access public
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   571
		 * @param  void
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   572
		 * @return array    The action results
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   573
		 */
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   574
		public function display_metabox() { ?>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   575
			<div class="postbox">
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   576
				<h3 class="hndle">
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   577
					<?php _e( 'Portfolio Shortcode', 'portfolio' ); ?>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   578
				</h3>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   579
				<div class="inside">
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   580
					<?php _e( "Add the latest portfolio projects using the following shortcode (where * is a number of projects to display):", 'portfolio' ); ?>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   581
					<?php bws_shortcode_output( '[latest_portfolio_items count=*]' ); ?>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   582
				</div>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   583
			</div>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   584
		<?php }
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
diff changeset
   585
	}
16
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents: 12
diff changeset
   586
}