PluginProbe
PDF & Print by BestWebSoft – WordPress Posts and Pages PDF Generator Plugin / 1.9.0
PDF & Print by BestWebSoft – WordPress Posts and Pages PDF Generator Plugin v1.9.0
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
← All changes | includes/deprecated.php +37 -24 trunk → 1.9.0 View file →
@@ -1,30 +1,43 @@
1 1 <?php
2 2 /**
3 - * Includes deprecated functions
3 +* Includes deprecated functions
4 + * @deprecated since 1.9.0
5 + * @todo remove after 01.03.2017
4 6 */
5 7
6 -if ( ! defined( 'ABSPATH' ) ) {
7 - exit;
8 -}
9 -
10 -/**
11 - * Output buttons of page for BWS Portfolio plugin
12 - *
13 - * @deprecated since 1.8.4
14 - */
15 -if ( ! function_exists( 'pdfprnt_show_buttons_for_bws_portfolio' ) ) {
16 - function pdfprnt_show_buttons_for_bws_portfolio() {
17 - return pdfprnt_show_buttons_for_custom_post_type();
18 - }
19 -}
20 -
21 -/**
22 - * Output buttons of post for BWS Portfolio plugin
23 - *
24 - * @deprecated since 1.8.4
25 - */
26 -if ( ! function_exists( 'pdfprnt_show_buttons_for_bws_portfolio_post' ) ) {
27 - function pdfprnt_show_buttons_for_bws_portfolio_post() {
28 - return pdfprnt_show_buttons_for_custom_post_type();
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 + }
29 42 }
30 43 }