PluginProbe
PDF & Print by BestWebSoft – WordPress Posts and Pages PDF Generator Plugin / 1.9.1
PDF & Print by BestWebSoft – WordPress Posts and Pages PDF Generator Plugin v1.9.1
trunk 1.5 1.6 1.7 1.7.1 1.7.2 1.7.3 1.7.4 1.7.5 1.7.6 1.7.7 1.7.8 1.7.9 1.8.0 1.8.1 1.8.2 1.8.3 1.8.4 1.8.5 1.8.6 1.8.7 1.8.8 1.8.9 1.9.0 1.9.1 All 71 releases
pdf-print / includes / deprecated.php

deprecated.php in PDF & Print by BestWebSoft – WordPress Posts and Pages PDF Generator Plugin 1.9.1, at includes/deprecated.php

44 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Includes deprecated functions
4 * @deprecated since 1.9.0
5 * @todo remove after 01.03.2017
6 */
7
8 /* Renaming old version options name */
9 if ( ! function_exists( 'pdfprnt_check_old_options' ) ) {
10 function pdfprnt_check_old_options() {
11 if ( is_multisite() ) {
12 global $wpdb;
13 if ( $old_options = get_site_option( 'pdfprnt_options_array' ) ) {
14 if ( ! get_site_option( 'pdfprnt_options' ) )
15 add_site_option( 'pdfprnt_options', $old_options );
16 else
17 update_site_option( 'pdfprnt_options', $old_options );
18 delete_site_option( 'pdfprnt_options_array' );
19 }
20 $blogids = $wpdb->get_col( "SELECT `blog_id` FROM $wpdb->blogs" );
21 $old_blog = $wpdb->blogid;
22 foreach ( $blogids as $blog_id ) {
23 switch_to_blog( $blog_id );
24 if ( $old_options = get_option( 'pdfprnt_options_array' ) ) {
25 if ( ! get_option( 'pdfprnt_options' ) )
26 add_option( 'pdfprnt_options', $old_options );
27 else
28 update_option( 'pdfprnt_options', $old_options );
29 delete_option( 'pdfprnt_options_array' );
30 }
31 }
32 switch_to_blog( $old_blog );
33 } else {
34 if ( $old_options = get_option( 'pdfprnt_options_array' ) ) {
35 if ( ! get_option( 'pdfprnt_options' ) )
36 add_option( 'pdfprnt_options', $old_options );
37 else
38 update_option( 'pdfprnt_options', $old_options );
39 delete_option( 'pdfprnt_options_array' );
40 }
41 }
42 }
43 }
44