wp/wp-content/plugins/portfolio/includes/class-prtfl-settings.php
changeset 23 417f20492bf7
parent 21 48c4eec2b7e6
equal deleted inserted replaced
22:8c2e4d02f4ef 23:417f20492bf7
   205 					$this->options['flush_rewrite_rules'] = 1;
   205 					$this->options['flush_rewrite_rules'] = 1;
   206 				}
   206 				}
   207 				$this->options['slug'] = sanitize_text_field( wp_unslash( $_POST['prtfl_slug'] ) );
   207 				$this->options['slug'] = sanitize_text_field( wp_unslash( $_POST['prtfl_slug'] ) );
   208 
   208 
   209 				if ( is_plugin_active( 'sender-pro/sender-pro.php' ) ) {
   209 				if ( is_plugin_active( 'sender-pro/sender-pro.php' ) ) {
   210 					$sndr_options = get_option( 'sndr_options' );
   210 					if ( is_multisite() ) {
       
   211 						$sndr_options = get_site_option( 'sndr_options' );
       
   212 					} else {
       
   213 						$sndr_options = get_option( 'sndr_options' );
       
   214 					}
   211 					/* mailout when publishing quote */
   215 					/* mailout when publishing quote */
   212 					if ( ! empty( $_POST['sndr_distribution_select'] ) && ! empty( $_POST['sndr_templates_select'] ) && ! empty( $_POST['sndr_priority'] ) ) {
   216 					if ( ! empty( $_POST['sndr_distribution_select'] ) && ! empty( $_POST['sndr_templates_select'] ) && ! empty( $_POST['sndr_priority'] ) ) {
   213 						if ( isset( $_POST['prtfl_sndr_mailout'] ) ) {
   217 						if ( isset( $_POST['prtfl_sndr_mailout'] ) ) {
   214 							$key = array_search( 'bws-portfolio', $sndr_options['automailout_new_post'] );
   218 							$key = array_search( 'bws-portfolio', $sndr_options['automailout_new_post'] );
   215 							if ( false === $key ) {
   219 							if ( false === $key ) {
   309 		/**
   313 		/**
   310 		 * Display 'Settings'
   314 		 * Display 'Settings'
   311 		 */
   315 		 */
   312 		public function tab_settings() {
   316 		public function tab_settings() {
   313 			if ( is_plugin_active( 'sender-pro/sender-pro.php' ) ) {
   317 			if ( is_plugin_active( 'sender-pro/sender-pro.php' ) ) {
   314 				$sndr_options = get_option( 'sndr_options' );
   318 				if ( is_multisite() ) {
       
   319 					$sndr_options = get_site_option( 'sndr_options' );
       
   320 				} else {
       
   321 					$sndr_options = get_option( 'sndr_options' );
       
   322 				}
   315 			}
   323 			}
   316 			?>
   324 			?>
   317 			<h3 class="bws_tab_label"><?php esc_html_e( 'Portfolio Settings', 'portfolio' ); ?></h3>
   325 			<h3 class="bws_tab_label"><?php esc_html_e( 'Portfolio Settings', 'portfolio' ); ?></h3>
   318 			<?php $this->help_phrase(); ?>
   326 			<?php $this->help_phrase(); ?>
   319 			<hr>
   327 			<hr>