Download raw (8.8 KB)
<?php // these map the photo ids from the old wppa gallery to attachment posts in the new database $p = array( '210' => '4456', '209' => '4455', '208' => '4454', '207' => '4453', '206' => '4452', '205' => '4451', '204' => '4450', '203' => '4449', '202' => '4448', '201' => '4447', '200' => '4446', '198' => '4445', '197' => '4444', '196' => '4443', '195' => '4442', '194' => '4441', '193' => '4440', '192' => '4439', '191' => '4438', '190' => '4437', '189' => '4436', '188' => '4435', '187' => '4434', '186' => '4433', '185' => '4432', '184' => '4431', '183' => '4430', '182' => '4429', '181' => '4428', '468' => '4407', '467' => '4406', '466' => '4405', '465' => '4404', '464' => '4403', '463' => '4402', '462' => '4401', '461' => '4400', '460' => '4399', '459' => '4398', '458' => '4397', '457' => '4396', '456' => '4395', '455' => '4394', '454' => '4393', '453' => '4392', '452' => '4391', '451' => '4390', '450' => '4389', '449' => '4388', '448' => '4387', '447' => '4386', '446' => '4385', '445' => '4384', '444' => '4383', '443' => '4382', '442' => '4381', '441' => '4380', '440' => '4379', '439' => '4378', '438' => '4377', '437' => '4376', '436' => '4375', '435' => '4374', '434' => '4373', '433' => '4372', '432' => '4371', '431' => '4370', '427' => '4367', '426' => '4366', '424' => '4365', '423' => '4364', '421' => '4363', '417' => '4362', '416' => '4361', '415' => '4360', '412' => '4359', '410' => '4358', '409' => '4357', '402' => '4356', '401' => '4355', '398' => '4353', '397' => '4352', '396' => '4351', '395' => '4350', '394' => '4349', '393' => '4348', '392' => '4347', '391' => '4346', '390' => '4345', '389' => '4344', '388' => '4343', '387' => '4342', '386' => '4341', '385' => '4340', '383' => '4339', '382' => '4338', '381' => '4337', '380' => '4336', '379' => '4335', '378' => '4334', '377' => '4333', '376' => '4332', '375' => '4331', '374' => '4330', '373' => '4329', '372' => '4328', '371' => '4327', '370' => '4326', '369' => '4325', '367' => '4324', '366' => '4323', '364' => '4322', '363' => '4321', '361' => '4320', '360' => '4319', '359' => '4318', '358' => '4316', '357' => '4315', '356' => '4314', '355' => '4313', '354' => '4312', '353' => '4311', '352' => '4310', '351' => '4309', '350' => '4308', '349' => '4307', '348' => '4306', '347' => '4305', '346' => '4304', '345' => '4303', '344' => '4302', '343' => '4301', '342' => '4300', '341' => '4299', '340' => '4298', '339' => '4297', '338' => '4296', '337' => '4295', '336' => '4294', '322' => '4293', '321' => '4292', '314' => '4290', '313' => '4289', '312' => '4288', '286' => '4286', '309' => '4285', '308' => '4284', '307' => '4283', '306' => '4282', '305' => '4281', '304' => '4280', '303' => '4279', '302' => '4278', '301' => '4277', '299' => '4276', '298' => '4275', '297' => '4274', '296' => '4273', '295' => '4272', '294' => '4271', '293' => '4270', '292' => '4269', '291' => '4268', '290' => '4267', '289' => '4266', '288' => '4265', '287' => '4264', '286' => '4263', '285' => '4262', '283' => '4260', '282' => '4259', '281' => '4258', '280' => '4257', '279' => '4256', '278' => '4255', '275' => '4254', '274' => '4253', '273' => '4252', '272' => '4251', '268' => '4250', '266' => '4249', '265' => '4248', '264' => '4247', '263' => '4245', '262' => '4244', '261' => '4243', '260' => '4242', '259' => '4241', '258' => '4240', '257' => '4239', '256' => '4238', '255' => '4237', '254' => '4236', '253' => '4235', '252' => '4234', '251' => '4233', '250' => '4232', '249' => '4231', '248' => '4229', '247' => '4228', '246' => '4227', '245' => '4226', '244' => '4225', '243' => '4224', '242' => '4223', '241' => '4222', '240' => '4221', '239' => '4220', '238' => '4219', '237' => '4218', '236' => '4217', '235' => '4216', '234' => '4215', '233' => '4214', '232' => '4213', '231' => '4212', '230' => '4211', '229' => '4210', '228' => '4209', '227' => '4208', '226' => '4207', '225' => '4206', '224' => '4205', '223' => '4204', '222' => '4202', '221' => '4201', '220' => '4200', '219' => '4199', '218' => '4198', '217' => '4197', '216' => '4196', '215' => '4195', '214' => '4194', '213' => '4193', '212' => '4192', '211' => '4191', '180' => '4189', '179' => '4188', '178' => '4187', '177' => '4186', '176' => '4185', '175' => '4184', '174' => '4183', '173' => '4182', '172' => '4181', '171' => '4180', '170' => '4179', '169' => '4178', '168' => '4177', '167' => '4176', '166' => '4175', '165' => '4174', '164' => '4173', '163' => '4172', '162' => '4171', '161' => '4170', '159' => '4169', '158' => '4168', '131' => '4166', '130' => '4165', '129' => '4164', '128' => '4163', '127' => '4162', '126' => '4161', '125' => '4160', '124' => '4159', '123' => '4158', '122' => '4157', '121' => '4156', '120' => '4155', '119' => '4154', '118' => '4153', '117' => '4152', '116' => '4151', '115' => '4150', '114' => '4149', '113' => '4148', '112' => '4146', '111' => '4145', '110' => '4144', '109' => '4143', '108' => '4142', '107' => '4141', '106' => '4140', '105' => '4139', '104' => '4138', '103' => '4137', '102' => '4136', '101' => '4135', '100' => '4134', '99' => '4133', '98' => '4132', '156' => '4130', '155' => '4129', '154' => '4128', '152' => '4127', '151' => '4126', '150' => '4125', '149' => '4124', '148' => '4123', '147' => '4122', '146' => '4121', '145' => '4120', '144' => '4119', '143' => '4118', '142' => '4117', '139' => '4116', '138' => '4115', '137' => '4114', '136' => '4113', '135' => '4112', '134' => '4111', '133' => '4110', '132' => '4109', '97' => '4108', '96' => '4107', '95' => '4106', '94' => '4105', '93' => '4104', '92' => '4103', '91' => '4102', '90' => '4101', '89' => '4100', '88' => '4099', '87' => '4098', '86' => '4097', '85' => '4096', '84' => '4095', '83' => '4094', '82' => '4093', '81' => '4092', '80' => '4091', '79' => '4090', '78' => '4089', '77' => '4088', '76' => '4087', '75' => '4086', '74' => '4085', '73' => '4084', '72' => '4083', '71' => '4082', '70' => '4081', '69' => '4080', '67' => '4078', '66' => '4077', '65' => '4076', '64' => '4075', '63' => '4074', '62' => '4073', '61' => '4072', '60' => '4071', '59' => '4070', '58' => '4068', '57' => '4067', '56' => '4066', '55' => '4065', '54' => '4064', '53' => '4063', '52' => '4062', '51' => '4061', '50' => '4060', '49' => '4059', '48' => '4058', '47' => '4057', '46' => '4056', '45' => '4055', '44' => '4054', '43' => '4053', '42' => '4050', '41' => '4049', '40' => '4048', '39' => '4047', '38' => '4046', '37' => '4045', '36' => '4044', '35' => '4043', '34' => '4042', '33' => '4041', '32' => '4040', ); // these map the photo albim ids from the old wppa gallery to galerie posts in the new database $g = array( '4' => '4039', '5' => '4052', '6' => '4069', '11' => '4427', '7' => '4079', '8' => '4131', '9' => '4147', '10' => '4167', '12' => '4190', '13' => '4203', '14' => '4230', '15' => '4246', '16' => '4261', '18' => '4291', '17' => '4287', '19' => '4317', '20' => '4354', '21' => '4369', ); if (array_key_exists('page_id', $_GET)) { switch($_GET['page_id']) { case "12": // /?page_id=12 wp_redirect( home_url( "/production/" ) ); break; case "1139": // /?page_id=1139 production by title wp_redirect( home_url( "/production/" ) ); break; case "40": // /?page_id=40 production by genre wp_redirect( home_url( "/production/" ) ); break; case "1760": if (array_key_exists('cover', $_GET)) { if (array_key_exists($_GET['album'], $g)) { // /?page_id=1760&album=20&cover=0&occur=1 wppa album wp_redirect( home_url( "/?p=" . $g[$_GET['album']] ) ); } } elseif (array_key_exists('photo', $_GET)) { // /?page_id=1760&album=20&photo=401&occur=1 wppa photo wp_redirect( home_url( "/?p=" . $p[$_GET['photo']] ) ); } else { // /?page_id=1760 galerie archives wp_redirect( home_url( "/galerie/" ) ); } } } ?> <?php /** * The template for displaying 404 pages (Not Found). * */ get_header(); ?> <div id="primary" class="site-content"> <div id="content" role="main"> <article id="post-0" class="post error404 no-results not-found"> <header class="entry-header"> <h1 class="entry-title"><?php _e( 'This is somewhat embarrassing, isn’t it?', 'acsr' ); ?></h1> </header> <div class="entry-content"> <p><?php _e( 'It seems we can’t find what you’re looking for. Perhaps searching can help.', 'acsr' ); ?></p> <?php get_search_form(); ?> </div><!-- .entry-content --> </article><!-- #post-0 --> </div><!-- #content --> </div><!-- #primary --> <?php get_footer(); ?>