| 1 |
<?php |
| 2 |
namespace ABlocks; |
| 3 |
|
| 4 |
if ( ! defined( 'ABSPATH' ) ) { |
| 5 |
exit; |
| 6 |
} |
| 7 |
|
| 8 |
use ABlocks\Admin\Settings; |
| 9 |
|
| 10 |
class Migration { |
| 11 |
|
| 12 |
public static function init() { |
| 13 |
$self = new self(); |
| 14 |
$self->run_migration(); |
| 15 |
add_filter( 'render_block_data', array( $self, 'update_attributes_backward_compatibility' ) ); |
| 16 |
} |
| 17 |
|
| 18 |
public function run_migration() { |
| 19 |
$ablocks_version = get_option( 'ablocks_version' ); |
| 20 |
// Save Version Number, flash role management and save permalink |
| 21 |
if ( ABLOCKS_VERSION !== $ablocks_version ) { |
| 22 |
Settings::save_settings(); |
| 23 |
$this->migrate_1_6_3( $ablocks_version ); |
| 24 |
$this->migrate_1_8_0( $ablocks_version ); |
| 25 |
update_option( 'ablocks_version', ABLOCKS_VERSION ); |
| 26 |
} |
| 27 |
} |
| 28 |
|
| 29 |
public function migrate_1_6_3( $version ) { |
| 30 |
if ( version_compare( $version, '1.6.3', '<=' ) ) { |
| 31 |
add_option( 'ablocks_has_required_block_attribute_migration', '1.6.3' ); |
| 32 |
// Delete Old Table |
| 33 |
global $wpdb; |
| 34 |
$prefix = $wpdb->prefix; |
| 35 |
Database\CreateFormTable::down( $prefix ); |
| 36 |
// Crate New database table |
| 37 |
Database::create_initial_custom_table(); |
| 38 |
} |
| 39 |
} |
| 40 |
public function migrate_1_8_0( $version ) { |
| 41 |
if ( version_compare( $version, '1.8.0', '<=' ) ) { |
| 42 |
global $wpdb; |
| 43 |
$table_name = $wpdb->prefix . ABLOCKS_PLUGIN_SLUG . '_form_entries'; |
| 44 |
// phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.DirectDatabaseQuery.SchemaChange |
| 45 |
$wpdb->query( "ALTER TABLE `{$table_name}` MODIFY `post_id` VARCHAR(100) NULL" ); |
| 46 |
} |
| 47 |
} |
| 48 |
|
| 49 |
public function update_attributes_backward_compatibility( $block ) { |
| 50 |
if ( get_option( 'ablocks_has_required_block_attribute_migration' ) === '1.6.3' ) { |
| 51 |
|
| 52 |
$attributes = ! empty( $block['attrs'] ) ? $block['attrs'] : []; |
| 53 |
switch ( $block['blockName'] ) { |
| 54 |
case 'ablocks/container': |
| 55 |
$has_old_direction_value = ! empty( $block['attrs']['direction'] ); |
| 56 |
if ( empty( $block['attrs']['dir']['value'] ) || $has_old_direction_value ) { |
| 57 |
$block['attrs']['dir']['value'] = $has_old_direction_value ? $attributes['direction'] : 'column'; |
| 58 |
$block['attrs']['direction'] = ''; |
| 59 |
} |
| 60 |
|
| 61 |
if ( ! empty( $attributes['directionTablet'] ) ) { |
| 62 |
$block['attrs']['dir']['valueTablet'] = $attributes['directionTablet']; |
| 63 |
$block['attrs']['directionTablet'] = ''; |
| 64 |
} |
| 65 |
|
| 66 |
if ( ! empty( $attributes['directionMobile'] ) ) { |
| 67 |
$block['attrs']['dir']['valueMobile'] = $attributes['directionMobile']; |
| 68 |
$block['attrs']['directionMobile'] = ''; |
| 69 |
} |
| 70 |
|
| 71 |
if ( ! empty( $attributes['justify'] ) ) { |
| 72 |
$block['attrs']['justification']['value'] = $attributes['justify']; |
| 73 |
$block['attrs']['justify'] = ''; |
| 74 |
} |
| 75 |
|
| 76 |
if ( ! empty( $attributes['justifyTablet'] ) ) { |
| 77 |
$block['attrs']['justification']['valueTablet'] = $attributes['justifyTablet']; |
| 78 |
$block['attrs']['justifyTablet'] = ''; |
| 79 |
} |
| 80 |
|
| 81 |
if ( ! empty( $attributes['justifyMobile'] ) ) { |
| 82 |
$block['attrs']['justification']['valueMobile'] = $attributes['justifyMobile']; |
| 83 |
$block['attrs']['justifyMobile'] = ''; |
| 84 |
} |
| 85 |
|
| 86 |
if ( ! empty( $attributes['align'] ) ) { |
| 87 |
$block['attrs']['alignment']['value'] = $attributes['align']; |
| 88 |
$block['attrs']['align'] = ''; |
| 89 |
} |
| 90 |
|
| 91 |
if ( ! empty( $attributes['alignTablet'] ) ) { |
| 92 |
$block['attrs']['alignment']['valueTablet'] = $attributes['alignTablet']; |
| 93 |
$block['attrs']['alignTablet'] = ''; |
| 94 |
} |
| 95 |
|
| 96 |
if ( ! empty( $attributes['alignMobile'] ) ) { |
| 97 |
$block['attrs']['alignment']['valueMobile'] = $attributes['alignMobile']; |
| 98 |
$block['attrs']['alignMobile'] = ''; |
| 99 |
} |
| 100 |
|
| 101 |
if ( ! empty( $attributes['wrap'] ) ) { |
| 102 |
$block['attrs']['wrapping']['value'] = $attributes['wrap']; |
| 103 |
$block['attrs']['wrap'] = ''; |
| 104 |
} |
| 105 |
|
| 106 |
if ( ! empty( $attributes['wrapTablet'] ) ) { |
| 107 |
$block['attrs']['wrapping']['valueTablet'] = $attributes['wrapTablet']; |
| 108 |
$block['attrs']['wrapTablet'] = ''; |
| 109 |
} |
| 110 |
|
| 111 |
if ( ! empty( $attributes['wrapMobile'] ) ) { |
| 112 |
$block['attrs']['wrapping']['valueMobile'] = $attributes['wrapMobile']; |
| 113 |
$block['attrs']['wrapMobile'] = ''; |
| 114 |
} |
| 115 |
break; |
| 116 |
case 'ablocks/counter': |
| 117 |
case 'ablocks/coupon': |
| 118 |
case 'ablocks/icon': |
| 119 |
case 'ablocks/notice': |
| 120 |
case 'ablocks/paypal-button': |
| 121 |
case 'ablocks/price-menu-item': |
| 122 |
case 'ablocks/star-ratings': |
| 123 |
case 'ablocks/stripe-button': |
| 124 |
case 'ablocks/svg-draw': |
| 125 |
case 'ablocks/tabs': |
| 126 |
if ( ! empty( $attributes['iconSize'] ) ) { |
| 127 |
$block['attrs']['iconSizing']['value'] = $attributes['iconSize']; |
| 128 |
} |
| 129 |
if ( ! empty( $attributes['iconRotate'] ) ) { |
| 130 |
$block['attrs']['iconRotated']['value'] = $attributes['iconRotate']; |
| 131 |
} |
| 132 |
// button-group control migration start |
| 133 |
$has_old_tabsMenuPosition_value = ! empty( $block['attrs']['tabsMenuPosition'] ); |
| 134 |
if ( empty( $block['attrs']['tabsMenuPositioning']['value'] ) || $has_old_tabsMenuPosition_value ) { |
| 135 |
$block['attrs']['tabsMenuPositioning']['value'] = $has_old_tabsMenuPosition_value ? $attributes['tabsMenuPosition'] : 'left'; |
| 136 |
$block['attrs']['tabsMenuPosition'] = ''; |
| 137 |
} |
| 138 |
if ( ! empty( $attributes['tabsMenuPositionTablet'] ) ) { |
| 139 |
$block['attrs']['tabsMenuPositioning']['valueTablet'] = $attributes['tabsMenuPositionTablet']; |
| 140 |
$block['attrs']['tabsMenuPositionTablet'] = ''; |
| 141 |
} |
| 142 |
if ( ! empty( $attributes['tabsMenuPositionMobile'] ) ) { |
| 143 |
$block['attrs']['tabsMenuPositioning']['valueMobile'] = $attributes['tabsMenuPositionMobile']; |
| 144 |
$block['attrs']['tabsMenuPositionMobile'] = ''; |
| 145 |
} |
| 146 |
if ( ! empty( $attributes['tabMenuAlign'] ) ) { |
| 147 |
$block['attrs']['tabMenuAlignment']['value'] = $attributes['tabMenuAlign']; |
| 148 |
$block['attrs']['tabMenuAlign'] = ''; |
| 149 |
} |
| 150 |
if ( ! empty( $attributes['tabMenuAlignTablet'] ) ) { |
| 151 |
$block['attrs']['tabMenuAlignment']['valueTablet'] = $attributes['tabMenuAlignTablet']; |
| 152 |
$block['attrs']['tabMenuAlignTablet'] = ''; |
| 153 |
} |
| 154 |
if ( ! empty( $attributes['tabMenuAlignMobile'] ) ) { |
| 155 |
$block['attrs']['tabMenuAlignment']['valueMobile'] = $attributes['tabMenuAlignMobile']; |
| 156 |
$block['attrs']['tabMenuAlignMobile'] = ''; |
| 157 |
} |
| 158 |
$has_old_menuContentAlign_value = ! empty( $block['attrs']['menuContentAlign'] ); |
| 159 |
if ( empty( $block['attrs']['menuContentAlignment']['value'] ) || $has_old_menuContentAlign_value ) { |
| 160 |
$block['attrs']['menuContentAlignment']['value'] = $has_old_menuContentAlign_value ? $attributes['menuContentAlign'] : 'center'; |
| 161 |
$block['attrs']['menuContentAlign'] = ''; |
| 162 |
} |
| 163 |
if ( ! empty( $attributes['menuContentAlignTablet'] ) ) { |
| 164 |
$block['attrs']['menuContentAlignment']['valueTablet'] = $attributes['menuContentAlignTablet']; |
| 165 |
$block['attrs']['menuContentAlignTablet'] = ''; |
| 166 |
} |
| 167 |
if ( ! empty( $attributes['menuContentAlignMobile'] ) ) { |
| 168 |
$block['attrs']['menuContentAlignment']['valueMobile'] = $attributes['menuContentAlignMobile']; |
| 169 |
$block['attrs']['menuContentAlignMobile'] = ''; |
| 170 |
} |
| 171 |
|
| 172 |
// button-group control migration end |
| 173 |
|
| 174 |
break; |
| 175 |
|
| 176 |
case 'ablocks/button': |
| 177 |
if ( ! empty( $attributes['iconSize'] ) ) { |
| 178 |
$iconSize = intval( $attributes['iconSize'] ); |
| 179 |
if ( $iconSize !== 16 ) { |
| 180 |
$block['attrs']['iconSizing']['value'] = $iconSize; |
| 181 |
} |
| 182 |
} |
| 183 |
if ( ! empty( $attributes['iconRotate'] ) ) { |
| 184 |
$block['attrs']['iconRotated']['value'] = $attributes['iconRotate']; |
| 185 |
} |
| 186 |
break; |
| 187 |
|
| 188 |
case 'ablocks/form-input': |
| 189 |
if ( ! empty( $attributes['iconSize'] ) ) { |
| 190 |
$block['attrs']['iconSizing']['value'] = $attributes['iconSize']; |
| 191 |
} |
| 192 |
if ( ! empty( $attributes['iconRotate'] ) ) { |
| 193 |
$block['attrs']['iconRotated']['value'] = $attributes['iconRotate']; |
| 194 |
} |
| 195 |
break; |
| 196 |
|
| 197 |
case 'ablocks/form-password': |
| 198 |
if ( ! empty( $attributes['iconSize'] ) ) { |
| 199 |
$block['attrs']['iconSizing']['value'] = $attributes['iconSize']; |
| 200 |
} |
| 201 |
if ( ! empty( $attributes['iconRotate'] ) ) { |
| 202 |
$block['attrs']['iconRotated']['value'] = $attributes['iconRotate']; |
| 203 |
} |
| 204 |
|
| 205 |
if ( ! empty( $attributes['passwordShowSize'] ) ) { |
| 206 |
$block['attrs']['passwordShowSizing']['value'] = $attributes['passwordShowSize']; |
| 207 |
} |
| 208 |
if ( ! empty( $attributes['passwordShowRotate'] ) ) { |
| 209 |
$block['attrs']['passwordShowRotated']['value'] = $attributes['passwordShowRotate']; |
| 210 |
} |
| 211 |
if ( ! empty( $attributes['passwordHideSize'] ) ) { |
| 212 |
$block['attrs']['passwordHideSizing']['value'] = $attributes['passwordHideSize']; |
| 213 |
} |
| 214 |
if ( ! empty( $attributes['passwordHideRotate'] ) ) { |
| 215 |
$block['attrs']['passwordHideRotated']['value'] = $attributes['passwordHideRotate']; |
| 216 |
} |
| 217 |
|
| 218 |
break; |
| 219 |
|
| 220 |
case 'ablocks/carousel': |
| 221 |
if ( ! empty( $attributes['leftIconSize'] ) ) { |
| 222 |
$block['attrs']['leftIconSizing']['value'] = $attributes['leftIconSize']; |
| 223 |
} |
| 224 |
if ( ! empty( $attributes['leftIconRotate'] ) ) { |
| 225 |
$block['attrs']['leftIconRotated']['value'] = $attributes['leftIconRotate']; |
| 226 |
} |
| 227 |
if ( ! empty( $attributes['rightIconSize'] ) ) { |
| 228 |
$block['attrs']['rightIconSizing']['value'] = $attributes['rightIconSize']; |
| 229 |
} |
| 230 |
if ( ! empty( $attributes['rightIconRotate'] ) ) { |
| 231 |
$block['attrs']['rightIconRotated']['value'] = $attributes['rightIconRotate']; |
| 232 |
} |
| 233 |
break; |
| 234 |
case 'ablocks/content-timeline': |
| 235 |
break; |
| 236 |
case 'ablocks/content-timeline-child': |
| 237 |
if ( ! empty( $attributes['iconSize'] ) ) { |
| 238 |
$block['attrs']['iconSizing']['value'] = $attributes['iconSize']; |
| 239 |
} |
| 240 |
if ( ! empty( $attributes['iconRotate'] ) ) { |
| 241 |
$block['attrs']['iconRotated']['value'] = $attributes['iconRotate']; |
| 242 |
} |
| 243 |
|
| 244 |
if ( ! empty( $attributes['contentTimeLineIconSize'] ) ) { |
| 245 |
$block['attrs']['contentTimeLineIconSizing']['value'] = $attributes['contentTimeLineIconSize']; |
| 246 |
} |
| 247 |
if ( ! empty( $attributes['contentTimeLineIconRotate'] ) ) { |
| 248 |
$block['attrs']['contentTimeLineIconRotated']['value'] = $attributes['contentTimeLineIconRotate']; |
| 249 |
} |
| 250 |
break; |
| 251 |
|
| 252 |
case 'ablocks/divider': |
| 253 |
if ( ! empty( $attributes['iconSize'] ) ) { |
| 254 |
$block['attrs']['iconSizing']['value'] = $attributes['iconSize']; |
| 255 |
} |
| 256 |
if ( ! empty( $attributes['iconRotate'] ) ) { |
| 257 |
$block['attrs']['iconRotated']['value'] = $attributes['iconRotate']; |
| 258 |
} |
| 259 |
break; |
| 260 |
|
| 261 |
case 'ablocks/single-accordion': |
| 262 |
if ( ! empty( $attributes['leftActiveIconSize'] ) ) { |
| 263 |
$block['attrs']['leftActiveIconSizing']['value'] = $attributes['leftActiveIconSize']; |
| 264 |
} |
| 265 |
if ( ! empty( $attributes['leftActiveIconRotate'] ) ) { |
| 266 |
$block['attrs']['leftActiveIconRotated']['value'] = $attributes['leftActiveIconRotate']; |
| 267 |
} |
| 268 |
if ( ! empty( $attributes['leftCloseIconSize'] ) ) { |
| 269 |
$block['attrs']['leftCloseIconSizing']['value'] = $attributes['leftCloseIconSize']; |
| 270 |
} |
| 271 |
if ( ! empty( $attributes['leftCloseIconRotate'] ) ) { |
| 272 |
$block['attrs']['leftCloseIconRotated']['value'] = $attributes['leftCloseIconRotate']; |
| 273 |
} |
| 274 |
if ( ! empty( $attributes['rightActiveIconSize'] ) ) { |
| 275 |
$block['attrs']['rightActiveIconSizing']['value'] = $attributes['rightActiveIconSize']; |
| 276 |
} |
| 277 |
if ( ! empty( $attributes['rightActiveIconRotate'] ) ) { |
| 278 |
$block['attrs']['rightActiveIconRotated']['value'] = $attributes['rightActiveIconRotate']; |
| 279 |
} |
| 280 |
if ( ! empty( $attributes['rightCloseIconSize'] ) ) { |
| 281 |
$block['attrs']['rightCloseIconSizing']['value'] = $attributes['rightCloseIconSize']; |
| 282 |
} |
| 283 |
if ( ! empty( $attributes['rightCloseIconRotate'] ) ) { |
| 284 |
$block['attrs']['rightCloseIconRotated']['value'] = $attributes['rightCloseIconRotate']; |
| 285 |
} |
| 286 |
break; |
| 287 |
|
| 288 |
case 'ablocks/table-of-content': |
| 289 |
if ( ! empty( $attributes['iconSize'] ) ) { |
| 290 |
$block['attrs']['iconSizing']['value'] = $attributes['iconSize']; |
| 291 |
} |
| 292 |
if ( ! empty( $attributes['iconRotate'] ) ) { |
| 293 |
$block['attrs']['iconRotated']['value'] = $attributes['iconRotate']; |
| 294 |
} |
| 295 |
|
| 296 |
if ( ! empty( $attributes['closeIconSize'] ) ) { |
| 297 |
$block['attrs']['closeIconSizing']['value'] = $attributes['closeIconSize']; |
| 298 |
} |
| 299 |
if ( ! empty( $attributes['closeIconRotate'] ) ) { |
| 300 |
$block['attrs']['closeIconRotated']['value'] = $attributes['closeIconRotate']; |
| 301 |
} |
| 302 |
if ( ! empty( $attributes['openIconSize'] ) ) { |
| 303 |
$block['attrs']['openIconSizing']['value'] = $attributes['openIconSize']; |
| 304 |
} |
| 305 |
if ( ! empty( $attributes['openIconRotate'] ) ) { |
| 306 |
$block['attrs']['openIconRotated']['value'] = $attributes['openIconRotate']; |
| 307 |
} |
| 308 |
break; |
| 309 |
|
| 310 |
case 'ablocks/info-box': |
| 311 |
if ( ! empty( $attributes['iconSize'] ) ) { |
| 312 |
$block['attrs']['iconSizing']['value'] = $attributes['iconSize']; |
| 313 |
} |
| 314 |
if ( ! empty( $attributes['iconRotate'] ) ) { |
| 315 |
$block['attrs']['iconRotated']['value'] = $attributes['iconRotate']; |
| 316 |
} |
| 317 |
if ( ! empty( $attributes['btnIconSize'] ) ) { |
| 318 |
$block['attrs']['btnIconSizing']['value'] = $attributes['btnIconSize']; |
| 319 |
} |
| 320 |
if ( ! empty( $attributes['btnIconRotate'] ) ) { |
| 321 |
$block['attrs']['btnIconRotated']['value'] = $attributes['btnIconRotate']; |
| 322 |
} |
| 323 |
if ( ! empty( $attributes['starIconSize'] ) ) { |
| 324 |
$block['attrs']['starIconSizing']['value'] = $attributes['starIconSize']; |
| 325 |
} |
| 326 |
if ( ! empty( $attributes['starIconRotate'] ) ) { |
| 327 |
$block['attrs']['starIconRotated']['value'] = $attributes['starIconRotate']; |
| 328 |
} |
| 329 |
break; |
| 330 |
|
| 331 |
case 'ablocks/lists': |
| 332 |
break; |
| 333 |
|
| 334 |
case 'ablocks/modal': |
| 335 |
break; |
| 336 |
case 'ablocks/progress-tracker': |
| 337 |
break; |
| 338 |
case 'ablocks/social-shares': |
| 339 |
break; |
| 340 |
case 'ablocks/toggle': |
| 341 |
break; |
| 342 |
case 'ablocks/flip-box': |
| 343 |
break; |
| 344 |
|
| 345 |
case 'ablocks/countdown': |
| 346 |
// button-group control migration start |
| 347 |
$has_old_direction_value = ! empty( $block['attrs']['direction'] ); |
| 348 |
if ( empty( $attributes['orient'] ) || $has_old_direction_value ) { |
| 349 |
$block['attrs']['orient']['value'] = $has_old_direction_value ? $attributes['direction'] : 'row'; |
| 350 |
$block['attrs']['direction'] = ''; |
| 351 |
} |
| 352 |
if ( ! empty( $attributes['directionTablet'] ) ) { |
| 353 |
$block['attrs']['orient']['valueTablet'] = $attributes['directionTablet']; |
| 354 |
$block['attrs']['directionTablet'] = ''; |
| 355 |
} |
| 356 |
if ( ! empty( $attributes['directionMobile'] ) ) { |
| 357 |
$block['attrs']['orient']['valueMobile'] = $attributes['directionMobile']; |
| 358 |
$block['attrs']['directionMobile'] = ''; |
| 359 |
} |
| 360 |
$has_old_justifyAlign_value = ! empty( $block['attrs']['justifyAlign'] ); |
| 361 |
if ( empty( $attributes['justificationAlign'] ) || $has_old_justifyAlign_value ) { |
| 362 |
$block['attrs']['justificationAlign']['value'] = $has_old_justifyAlign_value ? $attributes['justifyAlign'] : 'center'; |
| 363 |
$block['attrs']['justifyAlign'] = ''; |
| 364 |
} |
| 365 |
if ( ! empty( $attributes['justifyAlignTablet'] ) ) { |
| 366 |
$block['attrs']['justificationAlign']['valueTablet'] = $attributes['justifyAlignTablet']; |
| 367 |
$block['attrs']['justifyAlignTablet'] = ''; |
| 368 |
} |
| 369 |
if ( ! empty( $attributes['justifyAlignMobile'] ) ) { |
| 370 |
$block['attrs']['justificationAlign']['valueMobile'] = $attributes['justifyAlignMobile']; |
| 371 |
$block['attrs']['justifyAlignMobile'] = ''; |
| 372 |
} |
| 373 |
$has_old_align_value = ! empty( $block['attrs']['align'] ); |
| 374 |
if ( empty( $attributes['alignment'] ) || $has_old_align_value ) { |
| 375 |
$block['attrs']['alignment']['value'] = $has_old_align_value ? $attributes['align'] : 'stretch'; |
| 376 |
$block['attrs']['align'] = ''; |
| 377 |
} |
| 378 |
if ( ! empty( $attributes['alignTablet'] ) ) { |
| 379 |
$block['attrs']['alignment']['valueTablet'] = $attributes['alignTablet']; |
| 380 |
$block['attrs']['alignTablet'] = ''; |
| 381 |
} |
| 382 |
if ( ! empty( $attributes['alignMobile'] ) ) { |
| 383 |
$block['attrs']['alignment']['valueMobile'] = $attributes['alignMobile']; |
| 384 |
$block['attrs']['alignMobile'] = ''; |
| 385 |
} |
| 386 |
$has_old_wrap_value = ! empty( $block['attrs']['wrap'] ); |
| 387 |
if ( empty( $attributes['wrapping'] ) || $has_old_wrap_value ) { |
| 388 |
$block['attrs']['wrapping']['value'] = $has_old_wrap_value ? $attributes['wrap'] : 'wrap'; |
| 389 |
$block['attrs']['wrap'] = ''; |
| 390 |
} |
| 391 |
if ( ! empty( $attributes['wrapTablet'] ) ) { |
| 392 |
$block['attrs']['wrapping']['valueTablet'] = $attributes['wrapTablet']; |
| 393 |
$block['attrs']['wrapTablet'] = ''; |
| 394 |
} |
| 395 |
if ( ! empty( $attributes['wrapMobile'] ) ) { |
| 396 |
$block['attrs']['wrapping']['valueMobile'] = $attributes['wrapMobile']; |
| 397 |
$block['attrs']['wrapMobile'] = ''; |
| 398 |
} |
| 399 |
// button-group control migration end |
| 400 |
break; |
| 401 |
}//end switch |
| 402 |
}//end if |
| 403 |
return $block; |
| 404 |
} |
| 405 |
|
| 406 |
|
| 407 |
} |
| 408 |
|