PluginProbe
Team Showcase / 1.6
Team Showcase v1.6
trunk 1.0 1.1 1.11 1.13 1.14 1.15 1.16 1.17 1.18 1.19 1.2 1.20 1.21 1.21.1 1.21.2 1.21.3 1.21.4 1.21.5 1.22.0 1.22.1 1.22.10 1.22.12 1.22.13 1.22.14 All 49 releases
team / team-update.php

team-update.php in Team Showcase 1.6, at team-update.php

136 lines 3.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3
4 if ( ! defined('ABSPATH')) exit; // if direct access
5
6 $team_version = get_option('team_version');
7 $team_member_social_field = get_option( 'team_member_social_field' );
8
9
10 if(empty($team_member_social_field))
11 {
12 $team_member_social_field = array(
13 "facebook"=>"facebook",
14 "twitter"=>"twitter",
15 "googleplus"=>"googleplus",
16 "pinterest"=>"pinterest",
17
18 );
19 }
20
21 $team_member_social_field_new_field = array(
22 "website"=>"website",
23 "email"=>"email",
24 "skype"=>"skype",
25 "mobile"=>"mobile",
26 );
27
28
29 $team_member_social_field = array_merge($team_member_social_field,$team_member_social_field_new_field);
30 update_option('team_member_social_field', $team_member_social_field);
31
32 ?>
33
34
35
36
37
38 <div class="wrap">
39
40 <div id="icon-tools" class="icon32"><br></div><?php echo "<h2>".__(team_plugin_name.' Update', 'team')."</h2>";?>
41
42
43 <div class="para-settings team-settings">
44
45 <ul class="tab-nav">
46 <li nav="1" class="nav1 active">Update</li>
47 </ul> <!-- tab-nav end -->
48 <ul class="box">
49 <li style="display: block;" class="box1 tab-box active">
50 <div class="option-box">
51 <p class="option-title">Things has updated</p>
52 <p class="option-info">New things come with version <?php echo $team_version['current']; ?> your old version is <?php echo $team_version['previous']; ?>,
53 <br />
54 # you will see new profile fields at settigns page email, skype, website & mobile.<br />
55
56 # And no longer team member static(variable) values for email, skype, website under "team_member" post type these are merge with dynamic field which come from setting page.
57 </p>
58 <p>Above things already updated by visiting this page, you no longer visit this page again.
59 </p>
60
61 <?php
62
63
64 if($team_version['previous'] <= '1.4')
65 {
66 global $wp_query;
67
68
69 $team_posttype = 'team_member';
70
71 $wp_query = new WP_Query(
72 array (
73 'post_type' => $team_posttype,
74 'order' => 'DESC'
75
76 ) );
77
78 if ( $wp_query->have_posts() ) :
79 while ( $wp_query->have_posts() ) : $wp_query->the_post();
80
81 $team_member_website = get_post_meta( get_the_ID(), 'team_member_website', true );
82 $team_member_email = get_post_meta( get_the_ID(), 'team_member_email', true );
83 $team_member_skype = get_post_meta( get_the_ID(), 'team_member_skype', true );
84 $team_member_social_links = get_post_meta( get_the_ID(), 'team_member_social_links', true );
85
86
87 $team_member_social_links['website'] = $team_member_website;
88 $team_member_social_links['email'] = $team_member_email;
89 $team_member_social_links['skype'] = $team_member_skype;
90
91
92 update_post_meta(get_the_ID(), 'team_member_social_links', $team_member_social_links );
93
94 endwhile;
95 wp_reset_query();
96
97 endif;
98
99
100
101 update_option('team_version_ok', 'ok');
102 }
103
104
105
106
107
108
109
110
111 ?>
112
113
114
115
116
117
118
119 </div>
120
121
122 </li>
123
124
125 </ul>
126
127
128
129
130
131 </div>
132
133
134
135 </div>
136