PluginProbe ʕ •ᴥ•ʔ
Pods – Custom Content Types and Fields / 2.7.31.4
Pods – Custom Content Types and Fields v2.7.31.4
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 / components / Migrate-CPTUI / ui / wizard.php
pods / components / Migrate-CPTUI / ui Last commit date
wizard.php 1 week ago
wizard.php
177 lines
1 <div class="wrap pods-admin">
2 <script>
3 var PODS_URL = '<?php echo esc_js( PODS_URL ); ?>';
4 </script>
5 <div id="icon-pods" class="icon32"><br /></div>
6
7 <form action="" method="post" class="pods-submittable">
8 <div class="pods-submittable-fields">
9 <?php echo PodsForm::field( 'action', 'pods_admin_components', 'hidden' ); ?>
10 <?php echo PodsForm::field( 'component', $component, 'hidden' ); ?>
11 <?php echo PodsForm::field( 'method', $method, 'hidden' ); ?>
12 <?php echo PodsForm::field( '_wpnonce', wp_create_nonce( 'pods-component-' . $component . '-' . $method ), 'hidden' ); ?>
13 <?php echo PodsForm::field( 'cleanup', 0, 'hidden', array( 'attributes' => array( 'id' => 'pods_cleanup' ) ) ); ?>
14
15 <h2 class="italicized"><?php _e( 'Migrate: Import from Custom Post Type UI', 'pods' ); ?></h2>
16
17 <img src="<?php echo esc_url( PODS_URL ); ?>ui/images/pods-logo-notext-rgb-transparent.png" class="pods-leaf-watermark-right" />
18
19 <div id="pods-wizard-box" class="pods-wizard-steps-2 pods-wizard-hide-first">
20 <div id="pods-wizard-heading">
21 <ul>
22 <li class="pods-wizard-menu-current" data-step="1">
23 <i></i> <span>1</span> <?php _e( 'Setup', 'pods' ); ?>
24 <em></em>
25 </li>
26 <li data-step="2">
27 <i></i> <span>2</span> <?php _e( 'Migrate', 'pods' ); ?>
28 <em></em>
29 </li>
30 </ul>
31 </div>
32 <div id="pods-wizard-main">
33 <div id="pods-wizard-panel-1" class="pods-wizard-panel">
34 <div class="pods-wizard-content">
35 <p><?php _e( 'Custom Post Type UI provides an interface to create Custom Post Types and Custom Taxonomies. You can import these and their settings directly into Pods 2.0', 'pods' ); ?></p>
36 </div>
37 <div id="pods-wizard-options">
38 <div class="pods-wizard-option">
39 <a href="#pods-wizard-import" data-opt="0">
40 <h2><?php _e( 'Import Only', 'pods' ); ?></h2>
41
42 <p><?php _e( 'This will import your Custom Post Types and Taxonomies.', 'pods' ); ?></p>
43 </a>
44
45 <p><br /></p>
46 </div>
47 <div class="pods-wizard-option">
48 <a href="#pods-wizard-import-clean" data-opt="1">
49 <h2><?php _e( 'Import and Clean Up', 'pods' ); ?></h2>
50
51 <p><?php _e( 'This will import your Custom Post Types and Taxonomies, and then remove them from Custom Post Type UI.', 'pods' ); ?></p>
52 </a>
53
54 <p><br /></p>
55 </div>
56 </div>
57 </div>
58 <div id="pods-wizard-panel-2" class="pods-wizard-panel">
59 <div class="pods-wizard-content">
60 <p><?php _e( 'Choose below which Custom Post Types and Taxonomies you want to import into Pods 2.0', 'pods' ); ?></p>
61 </div>
62
63 <div class="stuffbox">
64 <h3><label for="link_name"><?php _e( 'Choose Post Types to Import', 'pods' ); ?></label>
65 </h3>
66
67 <div class="inside pods-manage-field pods-dependency">
68 <?php
69 if ( ! empty( $post_types ) ) {
70 ?>
71 <div class="pods-field-option-group">
72 <p class="pods-field-option-group-label">
73 <?php _e( 'Available Post Types', 'pods' ); ?>
74 </p>
75
76 <div class="pods-pick-values pods-pick-checkbox">
77 <ul>
78 <?php
79 foreach ( $post_types as $post_type ) {
80 $post_type_name = pods_var_raw( 'name', $post_type );
81 $post_type_label = pods_var_raw( 'label', $post_type, ucwords( str_replace( '_', ' ', $post_type_name ) ) );
82 ?>
83 <li>
84 <div class="pods-field pods-boolean">
85 <?php echo PodsForm::field( 'post_type[' . $post_type_name . ']', pods_var_raw( 'post_type[' . $post_type_name . ']', 'post', true ), 'boolean', array( 'boolean_yes_label' => $post_type_label . ' (' . $post_type_name . ')' ) ); ?>
86 </div>
87 </li>
88 <?php
89 }
90 ?>
91 </ul>
92 </div>
93 </div>
94 <?php
95 } else {
96 ?>
97 <p class="padded"><?php _e( 'No Post Types were found.', 'pods' ); ?></p>
98 <?php
99 }//end if
100 ?>
101 </div>
102 </div>
103
104 <div class="stuffbox">
105 <h3><label for="link_name"><?php _e( 'Choose Taxonomies to Import', 'pods' ); ?></label>
106 </h3>
107
108 <div class="inside pods-manage-field pods-dependency">
109 <?php
110 if ( ! empty( $taxonomies ) ) {
111 ?>
112 <div class="pods-field-option-group">
113 <p class="pods-field-option-group-label">
114 <?php _e( 'Available Taxonomies', 'pods' ); ?>
115 </p>
116
117 <div class="pods-pick-values pods-pick-checkbox">
118 <ul>
119 <?php
120 foreach ( $taxonomies as $taxonomy ) {
121 $taxonomy_name = pods_var_raw( 'name', $taxonomy );
122 $taxonomy_label = pods_var_raw( 'label', $taxonomy, ucwords( str_replace( '_', ' ', $taxonomy_name ) ) );
123 ?>
124 <li>
125 <?php echo PodsForm::field( 'taxonomy[' . $taxonomy_name . ']', pods_var_raw( 'taxonomy[' . $taxonomy_name . ']', 'post', true ), 'boolean', array( 'boolean_yes_label' => $taxonomy_label . ' (' . $taxonomy_name . ')' ) ); ?>
126 </li>
127 <?php
128 }
129 ?>
130 </ul>
131 </div>
132 </div>
133 <?php
134 } else {
135 ?>
136 <p class="padded"><?php _e( 'No Taxonomies were found.', 'pods' ); ?></p>
137 <?php
138 }//end if
139 ?>
140 </div>
141 </div>
142 </div>
143
144 <div id="pods-wizard-actions">
145 <div id="pods-wizard-toolbar">
146 <a href="#start" id="pods-wizard-start" class="button button-secondary"><?php _e( 'Start Over', 'pods' ); ?></a>
147 <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( 'Finished', 'pods' ); ?>" data-processing="<?php esc_attr_e( 'Processing', 'pods' ); ?>.."><?php _e( 'Next Step', 'pods' ); ?></a>
148 </div>
149 <div id="pods-wizard-finished">
150
151 </div>
152 </div>
153 </div>
154 </div>
155 </div>
156 </form>
157 </div>
158 <script type="text/javascript">
159 var pods_admin_submit_callback = function ( id ) {
160 id = parseInt( id );
161 document.location = 'admin.php?page=pods&do=create';
162 };
163
164 var pods_admin_option_select_callback = function ( $opt ) {
165 jQuery( '#pods_cleanup' ).val( $opt.data( 'opt' ) );
166 };
167
168 jQuery( function ( $ ) {
169 $( document ).Pods( 'validate' );
170 $( document ).Pods( 'submit' );
171 $( document ).Pods( 'wizard' );
172 $( document ).Pods( 'dependency' );
173 $( document ).Pods( 'advanced' );
174 $( document ).Pods( 'confirm' );
175 } );
176 </script>
177