PluginProbe ʕ •ᴥ•ʔ
Pods – Custom Content Types and Fields / 3.2.8.3
Pods – Custom Content Types and Fields v3.2.8.3
2.7.31.4 2.8.23.5 2.9.19.5 3.0.10.5 3.1.4.3 3.2.8.4 3.3.9.2 2.8.23.4 2.9.19.4 3.0.10.4 3.1.4.2 3.2.8.3 3.3.9.1 trunk 1.14.8 2.7.31.3 2.8.23.3 2.9.19.3 3.0.10.3 3.1.4.1 3.2.0 3.2.1 3.2.1.1 3.2.2 3.2.4 3.2.5 3.2.6 3.2.7 3.2.7.1 3.2.8 3.2.8.1 3.2.8.2 3.3.0 3.3.1 3.3.2 3.3.3 3.3.4 3.3.5 3.3.6 3.3.7 3.3.8 3.3.9
pods / ui / admin / upgrade / upgrade_2_0_0.php
pods / ui / admin / upgrade Last commit date
backup.php 2 weeks ago upgrade_2_0_0.php 2 weeks ago upgrade_2_1_0.php 2 weeks ago
upgrade_2_0_0.php
301 lines
1 <?php
2 // Don't load directly.
3 if ( ! defined( 'ABSPATH' ) ) {
4 die( '-1' );
5 }
6
7 global $wpdb;
8 ?>
9 <div class="wrap pods-admin">
10 <div id="icon-pods" class="icon32"><br /></div>
11
12 <h2 class="italicized"><?php _e( 'Upgrade Pods', 'pods' ); ?></h2>
13
14 <img src="<?php echo esc_url( PODS_URL ); ?>ui/images/pods-logo-notext-rgb-transparent.png" class="pods-leaf-watermark-right" />
15
16 <div id="pods-wizard-box" class="pods-wizard-steps-3" data-action="pods_admin" data-method="upgrade" data-_wpnonce="<?php echo wp_create_nonce( 'pods-upgrade' ); ?>" data-version="<?php echo $new_version; ?>">
17 <div id="pods-wizard-heading">
18 <ul>
19 <li class="pods-wizard-menu-current" data-step="1">
20 <i></i> <span>1</span> <?php _e( 'Getting Started', 'pods' ); ?> <em></em>
21 </li>
22 <li data-step="2">
23 <i></i> <span>2</span> <?php _e( 'Prepare', 'pods' ); ?> <em></em>
24 </li>
25 <li data-step="3">
26 <i></i> <span>3</span> <?php _e( 'Migrate', 'pods' ); ?> <em></em>
27 </li>
28 </ul>
29 </div>
30 <div id="pods-wizard-main">
31
32 <!-- Getting Started Panel -->
33 <div id="pods-wizard-panel-1" class="pods-wizard-panel">
34 <div class="pods-wizard-content pods-wizard-grey">
35 <p>
36 <?php
37 $intro = __( 'Welcome to Pods 2.x! We sincerely hope you enjoy over two years worth of planning and work, available to you for <em>free</em>.', 'pods' ) . ' ' . __( 'Due to a number of optimizations in Pods 2.x, we need to run a few updates to your database. This should not remove or change your existing Pod data from 1.x, so if you wish to rollback to Pods 1.x - you can easily do that.', 'pods' );
38
39 echo $intro;
40 ?>
41 </p>
42 </div>
43
44 <?php require_once PODS_DIR . 'ui/admin/upgrade/backup.php'; ?>
45 </div>
46 <!-- // Getting Started Panel -->
47
48 <!-- Prepare Panel -->
49 <div id="pods-wizard-panel-2" class="pods-wizard-panel">
50 <div class="pods-wizard-content">
51 <p><?php _e( 'We will prepare all of your Pods, Settings, and Content for migration. If any issues are found they will be displayed below for your review. Be sure to backup your database before continuing onto the next step for Migration.', 'pods' ); ?></p>
52 </div>
53 <table cellpadding="0" cellspacing="0">
54 <col style="width: 70px">
55 <col style="width: 110px">
56 <col style="width: 580px">
57 <thead>
58 <tr>
59 <th colspan="3"><?php _e( 'Preparing Your Content for Migration', 'pods' ); ?>..</th>
60 </tr>
61 </thead>
62 <tbody>
63 <?php
64 $pods = $wpdb->get_results( "SELECT `name`, `label` FROM `{$wpdb->prefix}pod_types` ORDER BY `name`" );
65 $count = count( $pods );
66 ?>
67 <tr class="pods-wizard-table-<?php echo esc_attr( 0 < $count ? 'complete' : 'pending' ); ?>" data-upgrade="pods">
68 <td class="pods-wizard-right pods-wizard-status">
69 <i><img src="<?php echo esc_url( PODS_URL ); ?>ui/images/spinner.gif" alt="Loading..." /></i>
70 </td>
71 <td class="pods-wizard-right pods-wizard-count"><?php echo esc_attr( 0 < $count ? $count : '&mdash;' ); ?></td>
72 <td class="pods-wizard-name">
73 <?php _e( 'Pods', 'pods' ); ?> <span class="pods-wizard-info"></span>
74 </td>
75 </tr>
76 <tr class="pods-wizard-table-pending" data-upgrade="fields">
77 <td class="pods-wizard-right pods-wizard-status">
78 <i><img src="<?php echo esc_url( PODS_URL ); ?>ui/images/spinner.gif" alt="Loading..." /></i>
79 </td>
80 <td class="pods-wizard-right pods-wizard-count">&mdash;</td>
81 <td class="pods-wizard-name">
82 <?php _e( 'Fields', 'pods' ); ?> <span class="pods-wizard-info"></span>
83 </td>
84 </tr>
85 <tr class="pods-wizard-table-pending" data-upgrade="relationships">
86 <td class="pods-wizard-right pods-wizard-status">
87 <i><img src="<?php echo esc_url( PODS_URL ); ?>ui/images/spinner.gif" alt="Loading..." /></i>
88 </td>
89 <td class="pods-wizard-right pods-wizard-count">&mdash;</td>
90 <td class="pods-wizard-name">
91 <?php _e( 'Relationships', 'pods' ); ?> <span class="pods-wizard-info"></span>
92 </td>
93 </tr>
94 <tr class="pods-wizard-table-pending" data-upgrade="index">
95 <td class="pods-wizard-right pods-wizard-status">
96 <i><img src="<?php echo esc_url( PODS_URL ); ?>ui/images/spinner.gif" alt="Loading..." /></i>
97 </td>
98 <td class="pods-wizard-right pods-wizard-count">&mdash;</td>
99 <td class="pods-wizard-name">
100 <?php _e( 'Item Indexes', 'pods' ); ?> <span class="pods-wizard-info"></span>
101 </td>
102 </tr>
103 <tr class="pods-wizard-table-pending" data-upgrade="templates">
104 <td class="pods-wizard-right pods-wizard-status">
105 <i><img src="<?php echo esc_url( PODS_URL ); ?>ui/images/spinner.gif" alt="Loading..." /></i>
106 </td>
107 <td class="pods-wizard-right pods-wizard-count">&mdash;</td>
108 <td class="pods-wizard-name">
109 <?php _e( 'Templates', 'pods' ); ?> <span class="pods-wizard-info"></span>
110 </td>
111 </tr>
112 <tr class="pods-wizard-table-pending" data-upgrade="pages">
113 <td class="pods-wizard-right pods-wizard-status">
114 <i><img src="<?php echo esc_url( PODS_URL ); ?>ui/images/spinner.gif" alt="Loading..." /></i>
115 </td>
116 <td class="pods-wizard-right pods-wizard-count">&mdash;</td>
117 <td class="pods-wizard-name">
118 <?php _e( 'Pod Pages', 'pods' ); ?> <span class="pods-wizard-info"></span>
119 </td>
120 </tr>
121 <tr class="pods-wizard-table-pending" data-upgrade="helpers">
122 <td class="pods-wizard-right pods-wizard-status">
123 <i><img src="<?php echo esc_url( PODS_URL ); ?>ui/images/spinner.gif" alt="Loading..." /></i>
124 </td>
125 <td class="pods-wizard-right pods-wizard-count">&mdash;</td>
126 <td class="pods-wizard-name">
127 <?php _e( 'Helpers', 'pods' ); ?> <span class="pods-wizard-info"></span>
128 </td>
129 </tr>
130 <?php
131 foreach ( $pods as $pod ) {
132 ?>
133 <tr class="pods-wizard-table-pending" data-upgrade="pod" data-pod="<?php echo esc_attr( $pod->name ); ?>">
134 <td class="pods-wizard-right pods-wizard-status">
135 <i><img src="<?php echo esc_url( PODS_URL ); ?>ui/images/spinner.gif" alt="Loading..." /></i>
136 </td>
137 <td class="pods-wizard-right pods-wizard-count">&mdash;</td>
138 <td class="pods-wizard-name">
139 <?php echo __( 'Content', 'pods' ) . ': ' . $pod->name; ?>
140 <span class="pods-wizard-info"></span>
141 </td>
142 </tr>
143 <?php
144 }
145 ?>
146 </tbody>
147 </table>
148 </div>
149 <!-- // Prepare Panel -->
150
151 <!-- Migrate Panel -->
152 <div id="pods-wizard-panel-3" class="pods-wizard-panel">
153 <div class="pods-wizard-content">
154 <p><?php _e( 'During this process your Pods, Settings, and Content will be migrated into the optimized Pods 2.x architecture. We will not delete any of your old data, the tables will remain until you choose to clean them up after a successful upgrade.', 'pods' ); ?></p>
155 </div>
156 <table cellpadding="0" cellspacing="0">
157 <col style="width: 70px">
158 <col style="width: 110px">
159 <col style="width: 580px">
160 <thead>
161 <tr>
162 <th colspan="3"><?php _e( 'Migrating Your Content', 'pods' ); ?>..</th>
163 </tr>
164 </thead>
165 <tbody><!-- complete|pending|active <i></i> -->
166 <tr class="pods-wizard-table-pending" data-upgrade="1_x">
167 <td class="pods-wizard-right pods-wizard-status">
168 <i><img src="<?php echo esc_url( PODS_URL ); ?>ui/images/spinner.gif" alt="Loading..." /></i>
169 </td>
170 <td class="pods-wizard-right pods-wizard-count">&mdash;</td>
171 <td class="pods-wizard-name">
172 <?php _e( '1.x Updates', 'pods' ); ?> <span class="pods-wizard-info"></span>
173 </td>
174 </tr>
175 <tr class="pods-wizard-table-pending" data-upgrade="pods">
176 <td class="pods-wizard-right pods-wizard-status">
177 <i><img src="<?php echo esc_url( PODS_URL ); ?>ui/images/spinner.gif" alt="Loading..." /></i>
178 </td>
179 <td class="pods-wizard-right pods-wizard-count"><?php echo( 0 < $count ? $count : '&mdash;' ); ?></td>
180 <td class="pods-wizard-name">
181 <?php _e( 'Pods', 'pods' ); ?> <span class="pods-wizard-info"></span>
182 </td>
183 </tr>
184 <tr class="pods-wizard-table-pending" data-upgrade="fields">
185 <td class="pods-wizard-right pods-wizard-status">
186 <i><img src="<?php echo esc_url( PODS_URL ); ?>ui/images/spinner.gif" alt="Loading..." /></i>
187 </td>
188 <td class="pods-wizard-right pods-wizard-count">&mdash;</td>
189 <td class="pods-wizard-name">
190 <?php _e( 'Fields', 'pods' ); ?> <span class="pods-wizard-info"></span>
191 </td>
192 </tr>
193 <tr class="pods-wizard-table-pending" data-upgrade="relationships">
194 <td class="pods-wizard-right pods-wizard-status">
195 <i><img src="<?php echo esc_url( PODS_URL ); ?>ui/images/spinner.gif" alt="Loading..." /></i>
196 </td>
197 <td class="pods-wizard-right pods-wizard-count">&mdash;</td>
198 <td class="pods-wizard-name">
199 <?php _e( 'Relationships', 'pods' ); ?> <span class="pods-wizard-info"></span>
200 </td>
201 </tr>
202 <tr class="pods-wizard-table-pending" data-upgrade="settings">
203 <td class="pods-wizard-right pods-wizard-status">
204 <i><img src="<?php echo esc_url( PODS_URL ); ?>ui/images/spinner.gif" alt="Loading..." /></i>
205 </td>
206 <td class="pods-wizard-right pods-wizard-count">&mdash;</td>
207 <td class="pods-wizard-name">
208 <?php _e( 'Settings', 'pods' ); ?> <span class="pods-wizard-info"></span>
209 </td>
210 </tr>
211 <tr class="pods-wizard-table-pending" data-upgrade="templates">
212 <td class="pods-wizard-right pods-wizard-status">
213 <i><img src="<?php echo esc_url( PODS_URL ); ?>ui/images/spinner.gif" alt="Loading..." /></i>
214 </td>
215 <td class="pods-wizard-right pods-wizard-count">&mdash;</td>
216 <td class="pods-wizard-name">
217 <?php _e( 'Templates', 'pods' ); ?> <span class="pods-wizard-info"></span>
218 </td>
219 </tr>
220 <tr class="pods-wizard-table-pending" data-upgrade="pages">
221 <td class="pods-wizard-right pods-wizard-status">
222 <i><img src="<?php echo esc_url( PODS_URL ); ?>ui/images/spinner.gif" alt="Loading..." /></i>
223 </td>
224 <td class="pods-wizard-right pods-wizard-count">&mdash;</td>
225 <td class="pods-wizard-name">
226 <?php _e( 'Pod Pages', 'pods' ); ?> <span class="pods-wizard-info"></span>
227 </td>
228 </tr>
229 <tr class="pods-wizard-table-pending" data-upgrade="helpers">
230 <td class="pods-wizard-right pods-wizard-status">
231 <i><img src="<?php echo esc_url( PODS_URL ); ?>ui/images/spinner.gif" alt="Loading..." /></i>
232 </td>
233 <td class="pods-wizard-right pods-wizard-count">&mdash;</td>
234 <td class="pods-wizard-name">
235 <?php _e( 'Helpers', 'pods' ); ?> <span class="pods-wizard-info"></span>
236 </td>
237 </tr>
238 <?php
239 foreach ( $pods as $pod ) {
240 ?>
241 <tr class="pods-wizard-table-pending" data-upgrade="pod" data-pod="<?php echo esc_attr( $pod->name ); ?>">
242 <td class="pods-wizard-right pods-wizard-status">
243 <i><img src="<?php echo esc_url( PODS_URL ); ?>ui/images/spinner.gif" alt="Loading..." /></i>
244 </td>
245 <td class="pods-wizard-right pods-wizard-count">&mdash;</td>
246 <td class="pods-wizard-name">
247 <?php echo __( 'Content', 'pods' ) . ': ' . $pod->name; ?>
248 <span class="pods-wizard-info"></span>
249 </td>
250 </tr>
251 <?php
252 }
253 ?>
254 <tr class="pods-wizard-table-pending" data-upgrade="cleanup">
255 <td class="pods-wizard-right pods-wizard-status">
256 <i><img src="<?php echo esc_url( PODS_URL ); ?>ui/images/spinner.gif" alt="Loading..." /></i>
257 </td>
258 <td class="pods-wizard-right pods-wizard-count">&mdash;</td>
259 <td class="pods-wizard-name">
260 <?php _e( 'Cleanup', 'pods' ); ?> <span class="pods-wizard-info"></span>
261 </td>
262 </tr>
263 </tbody>
264 </table>
265 </div>
266 <!-- // Mirate Panel -->
267
268 </div>
269 <div id="pods-wizard-actions">
270 <div id="pods-wizard-toolbar">
271 <a href="#start" id="pods-wizard-start" class="button button-secondary"><?php _e( 'Start Over', 'pods' ); ?></a>
272 <a href="#next" id="pods-wizard-next" class="button button-primary" data-next="<?php esc_attr_e( 'Next Step', 'pods' ); ?>" data-finished="<?php esc_attr_e( 'Start using Pods', 'pods' ); ?>"><?php _e( 'Next Step', 'pods' ); ?></a>
273 </div>
274 <div id="pods-wizard-finished">
275 <?php _e( 'Migration Complete!', 'pods' ); ?>
276 </div>
277 </div>
278 </div>
279 </div>
280
281 <script>
282 var pods_admin_wizard_callback = function ( step ) {
283 jQuery( '#pods-wizard-start, #pods-wizard-next' ).hide();
284
285 if ( step == 2 ) {
286 jQuery( '#pods-wizard-box' ).PodsUpgrade( 'prepare' );
287
288 return false;
289 }
290 else {
291 if ( step == 3 ) {
292 jQuery( '#pods-wizard-box' ).PodsUpgrade( 'migrate' );
293 }
294 }
295 };
296
297 jQuery( function ( $ ) {
298 $( '#pods-wizard-box' ).Pods( 'wizard' );
299 } );
300 </script>
301