wp/wp-content/plugins/portfolio/bws_menu/bws_functions.php
changeset 12 d8a8807227e4
parent 7 cf61fcea0001
child 16 a86126ab1dd4
equal deleted inserted replaced
11:bf1778c34b9a 12:d8a8807227e4
    89 	function bws_plugin_reviews_block( $plugin_name, $plugin_slug ) { ?>
    89 	function bws_plugin_reviews_block( $plugin_name, $plugin_slug ) { ?>
    90 		<div class="bws-plugin-reviews">
    90 		<div class="bws-plugin-reviews">
    91 			<div class="bws-plugin-reviews-rate">
    91 			<div class="bws-plugin-reviews-rate">
    92 				<?php _e( 'Like the plugin?', 'bestwebsoft' ); ?>
    92 				<?php _e( 'Like the plugin?', 'bestwebsoft' ); ?>
    93 				<a href="https://wordpress.org/support/view/plugin-reviews/<?php echo esc_attr( $plugin_slug ); ?>?filter=5" target="_blank" title="<?php printf( __( '%s reviews', 'bestwebsoft' ), sanitize_text_field( $plugin_name ) ); ?>">
    93 				<a href="https://wordpress.org/support/view/plugin-reviews/<?php echo esc_attr( $plugin_slug ); ?>?filter=5" target="_blank" title="<?php printf( __( '%s reviews', 'bestwebsoft' ), sanitize_text_field( $plugin_name ) ); ?>">
    94 					<?php _e( 'Rate it', 'bestwebsoft' ); ?> 
    94 					<?php _e( 'Rate it', 'bestwebsoft' ); ?>
    95 					<span class="dashicons dashicons-star-filled"></span>
    95 					<span class="dashicons dashicons-star-filled"></span>
    96 					<span class="dashicons dashicons-star-filled"></span>
    96 					<span class="dashicons dashicons-star-filled"></span>
    97 					<span class="dashicons dashicons-star-filled"></span>
    97 					<span class="dashicons dashicons-star-filled"></span>
    98 					<span class="dashicons dashicons-star-filled"></span>
    98 					<span class="dashicons dashicons-star-filled"></span>
    99 					<span class="dashicons dashicons-star-filled"></span>
    99 					<span class="dashicons dashicons-star-filled"></span>
   259 		 * show notices about deprecated_function
   259 		 * show notices about deprecated_function
   260 		 * @since 1.9.8
   260 		 * @since 1.9.8
   261 		*/
   261 		*/
   262 		if ( ! empty( $bstwbsftwppdtplgns_options['deprecated_function'] ) ) { ?>
   262 		if ( ! empty( $bstwbsftwppdtplgns_options['deprecated_function'] ) ) { ?>
   263 			<div class="update-nag">
   263 			<div class="update-nag">
   264 				<strong><?php _e( 'Deprecated function(-s) is used on the site here:', 'bestwebsoft' ); ?></strong>  
   264 				<strong><?php _e( 'Deprecated function(-s) is used on the site here:', 'bestwebsoft' ); ?></strong>
   265 				<?php $i = 1; 
   265 				<?php $i = 1;
   266 				foreach ( $bstwbsftwppdtplgns_options['deprecated_function'] as $function_name => $attr ) {
   266 				foreach ( $bstwbsftwppdtplgns_options['deprecated_function'] as $function_name => $attr ) {
   267 					if ( 1 != $i )
   267 					if ( 1 != $i )
   268 						echo ' ,';
   268 						echo ' ,';
   269 					if ( ! empty( $attr['product-name'] ) ) {
   269 					if ( ! empty( $attr['product-name'] ) ) {
   270 						echo $attr['product-name'];
   270 						echo $attr['product-name'];
   273 					}
   273 					}
   274 					unset( $bstwbsftwppdtplgns_options['deprecated_function'][ $function_name ] );
   274 					unset( $bstwbsftwppdtplgns_options['deprecated_function'][ $function_name ] );
   275 					$i++;
   275 					$i++;
   276 				} ?>.
   276 				} ?>.
   277 				<br/>
   277 				<br/>
   278 				<?php _e( 'This function(-s) will be removed over time. Please update the product(-s).', 'bestwebsoft' ); ?>				
   278 				<?php _e( 'This function(-s) will be removed over time. Please update the product(-s).', 'bestwebsoft' ); ?>
   279 			</div>				
   279 			</div>
   280 			<?php if ( is_multisite() )
   280 			<?php if ( is_multisite() )
   281 				update_site_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
   281 				update_site_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
   282 			else
   282 			else
   283 				update_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
   283 				update_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
   284 		}
   284 		}
   592 			wp_enqueue_script( 'bws_menu_script', bws_menu_url( 'js/bws_menu.js' ) );
   592 			wp_enqueue_script( 'bws_menu_script', bws_menu_url( 'js/bws_menu.js' ) );
   593 			wp_enqueue_script( 'theme-install' );
   593 			wp_enqueue_script( 'theme-install' );
   594 			add_thickbox();
   594 			add_thickbox();
   595 			wp_enqueue_script( 'plugin-install' );
   595 			wp_enqueue_script( 'plugin-install' );
   596 		}
   596 		}
   597 		
   597 
   598 		if ( 'plugins.php' == $hook_suffix && ! defined( 'DOING_AJAX' ) ) {
   598 		if ( 'plugins.php' == $hook_suffix && ! defined( 'DOING_AJAX' ) ) {
   599 			wp_enqueue_style( 'bws-modal-css', bws_menu_url( 'css/modal.css' ) );
   599 			wp_enqueue_style( 'bws-modal-css', bws_menu_url( 'css/modal.css' ) );
   600 		}
   600 		}
   601 	}
   601 	}
   602 }
   602 }
   885 			</div>
   885 			</div>
   886 		<?php }
   886 		<?php }
   887 	}
   887 	}
   888 }
   888 }
   889 
   889 
   890 /** 
   890 /**
   891  * output shortcode in a special block
   891  * output shortcode in a special block
   892  * @since 1.9.8
   892  * @since 1.9.8
   893  */
   893  */
   894 if ( ! function_exists( 'bws_shortcode_output' ) ) {
   894 if ( ! function_exists( 'bws_shortcode_output' ) ) {
   895 	function bws_shortcode_output( $shortcode ) { ?>
   895 	function bws_shortcode_output( $shortcode ) { ?>
   896 		<span class="bws_shortcode_output"><input type="text" onfocus="this.select();" readonly="readonly" value="<?php echo $shortcode; ?>" class="large-text bws_no_bind_notice"></span>
   896 		<span class="bws_shortcode_output"><input type="text" onfocus="this.select();" readonly="readonly" value="<?php echo $shortcode; ?>" class="large-text bws_no_bind_notice"></span>
   897 	<?php }
   897 	<?php }
   898 }
   898 }
   899 
   899 
   900 /** 
   900 /**
   901  * output tooltip
   901  * output tooltip
   902  * @since 1.9.8
   902  * @since 1.9.8
   903  * @param   string   $content  - HTML content for the tooltip
   903  * @param   string   $content  - HTML content for the tooltip
   904  * @param   string   $class  - Can be standart "bws-hide-for-mobile" (tooltip will be hidden in 782px) and "bws-auto-width" (need for img) or some custom class.
   904  * @param   string   $class  - Can be standart "bws-hide-for-mobile" (tooltip will be hidden in 782px) and "bws-auto-width" (need for img) or some custom class.
   905  */
   905  */