My life in Spain hasn’t been all Sunshine and Siestas. Read about my difficulties learning Spanish, dealing with the dreaded Oficina de Extranjeros and accepting my place in Seville, starting with the preparation for Spain and the first few shaky months here.
<?php /*
**************************************************************************
Plugin Name: Clean Archives Reloaded
Plugin URI: http://www.viper007bond.com/wordpress-plugins/clean-archives-reloaded/
Description: A slick, Javascript-enhanced post archive list generator for WordPress 2.5+.
Version: 3.2.0
Author: Viper007Bond
Author URI: http://www.viper007bond.com/
**************************************************************************
Copyright (C) 2008-2011 Viper007Bond
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
**************************************************************************/
// Seems some themes bundle this plugin and then users install it,
// resulting in double output. This should be avoided, so use a global.
if ( !isset($cleanarchivesreloaded) )
$cleanarchivesreloaded = false;
class CleanArchivesReloaded {
# Configuration has been moved to the new options page at Settings -> Clean Archives.
# You can also set the configuration via the shortcode tag.
var $version = ‘3.2.0’;
// Class initialization
function CleanArchivesReloaded() {
if ( !function_exists(‘add_shortcode’) )
return;
// Load up the localization file if we’re using WordPress in a different language
// Place it in this plugin’s “languages” folder and name it “car-[value in wp-config].mo”
load_plugin_textdomain( ‘clean-archives-reloaded’, false, ‘/clean-archives-reloaded/languages’ );
// Make sure all the plugin options have defaults set
if ( FALSE === get_option(‘car_usejs’) ) add_option( ‘car_usejs’, 1 );
if ( FALSE === get_option(‘car_monthorder’) ) add_option( ‘car_monthorder’, ‘new’ );
if ( FALSE === get_option(‘car_postorder’) ) add_option( ‘car_postorder’, ‘new’ );
if ( FALSE === get_option(‘car_dynamicload’) ) add_option( ‘car_dynamicload’, null );
// Register all the hooks
add_action( ‘admin_menu’, array(&$this, ‘AddAdminMenu’) );
add_shortcode( ‘cleanarchivesreloaded’ , array(&$this, ‘PostList’) );
add_shortcode( ‘cartotalposts’ , array(&$this, ‘PostCount’) );
add_filter( ‘widget_text’, ‘do_shortcode’, 11 ); // For the text widget
// Hook into wp_head early so we can potentially look for posts
add_action( ‘wp_head’, array(&$this, ‘MaybeEnqueueCSSJavascript’), 1 );
// For users with a persistent object caching plugin installed, we need to dump the cache in some cases
add_action( ‘save_post’, array(&$this, ‘DeleteCache’) );
add_action( ‘edit_post’, array(&$this, ‘DeleteCache’) );
add_action( ‘delete_post’, array(&$this, ‘DeleteCache’) );
}
// Register the admin menu
function AddAdminMenu() {
add_options_page( __(‘Clean Archives Reloaded’, ‘clean-archives-reloaded’), __(‘Clean Archives’, ‘clean-archives-reloaded’), ‘manage_options’, ‘clean-archives-reloaded’, array(&$this, ‘OptionsPage’) );
}
// The options page for this plugin
function OptionsPage() { ?>
<div class=”wrap”>
<h2><?php _e(‘Clean Archives Reloaded’, ‘clean-archives-reloaded’); ?></h2>
<form method=”post” action=”options.php”>
<?php wp_nonce_field(‘update-options’) ?>
<table class=”form-table”>
<tr>
<th scope=”row” colspan=”2″ class=”th-full”>
<label for=”car_usejs”>
<input name=”car_usejs” type=”checkbox” id=”car_usejs” value=”1″ <?php checked( ‘1’, get_option(‘car_usejs’) ); ?> />
<?php _e(‘Use Javascript to make the months collapsible’, ‘clean-archives-reloaded’); ?>
</label>
</th>
</tr>
<tr>
<th scope=”row” colspan=”2″ class=”th-full”>
<label for=”car_dynamicload”>
<input name=”car_dynamicload” type=”checkbox” id=”car_dynamicload” value=”1″ <?php checked( ‘1’, get_option(‘car_dynamicload’) ); ?> />
<?php _e(“Only load the Javascript files when displaying an archive (this will break the archive list if it’s used in your sidebar)”, ‘clean-archives-reloaded’); ?>
</label>
</th>
</tr>
<tr valign=”top”>
<th scope=”row”><?php _e(‘Month Ordering’, ‘clean-archives-reloaded’); ?></th>
<td>
<p>
<label><input name=”car_monthorder” type=”radio” value=”new” <?php checked( ‘new’, get_option(‘car_monthorder’) ); ?> /> <?php _e(‘Show newest months first’, ‘clean-archives-reloaded’); ?></label><br />
<label><input name=”car_monthorder” type=”radio” value=”old” <?php checked( ‘old’, get_option(‘car_monthorder’) ); ?> /> <?php _e(‘Show oldest months first’, ‘clean-archives-reloaded’); ?></label>
</p>
</td>
</tr>
<tr valign=”top”>
<th scope=”row”><?php _e(‘Post Ordering’, ‘clean-archives-reloaded’); ?></th>
<td>
<p><?php _e(‘Within individual months…’, ‘clean-archives-reloaded’); ?></p>
<p>
<label><input name=”car_postorder” type=”radio” value=”new” <?php checked( ‘new’, get_option(‘car_postorder’) ); ?> /> <?php _e(‘Show newest posts first’, ‘clean-archives-reloaded’); ?></label><br />
<label><input name=”car_postorder” type=”radio” value=”old” <?php checked( ‘old’, get_option(‘car_postorder’) ); ?> /> <?php _e(‘Show oldest posts first’, ‘clean-archives-reloaded’); ?></label>
</p>
</td>
</tr>
</table>
<p class=”submit”>
<input type=”submit” name=”Submit” value=”<?php _e(‘Save Changes’) ?>” />
<input type=”hidden” name=”action” value=”update” />
<input type=”hidden” name=”page_options” value=”car_usejs,car_monthorder,car_postorder,car_dynamicload” />
</p>
</form>
</div>
<?php
}
// If the user wants to, then look forward at the posts or Page to be displayed and check for the shortcode
// This allows for only loading jQuery and this plugin’s CSS/JS when the archive will be displayed
function MaybeEnqueueCSSJavascript() {
global $wp_query;
// If the user opted to only have the JS/CSS loaded when the archive is to be displayed, then check for it
if ( 1 == get_option(‘car_dynamicload’) ) {
// Abort if no posts (obviously)
if ( !is_array($wp_query->posts) || empty($wp_query->posts) ) return;
// Loop through each post looking for the shortcode
foreach ( $wp_query->posts as $post ) {
if ( false !== stripos( $post->post_content, ‘
- October 2025 (1)
- May 2024 (2)
- June 2021 (1)
- March 2021 (1)
- September 2020 (1)
- May 2020 (1)
- January 2020 (1)
- November 2019 (1)
- July 2019 (1)
- May 2019 (1)
- February 2019 (1)
- January 2019 (1)
- December 2018 (1)
- November 2018 (1)
- October 2018 (1)
- September 2018 (1)
- August 2018 (2)
- July 2018 (1)
- May 2018 (1)
- April 2018 (2)
- February 2018 (1)
- December 2017 (1)
- October 2017 (1)
- September 2017 (2)
- August 2017 (1)
- July 2017 (1)
- March 2017 (1)
- January 2017 (1)
- December 2016 (2)
- November 2016 (4)
- October 2016 (2)
- September 2016 (2)
- August 2016 (4)
- July 2016 (3)
- May 2016 (1)
- April 2016 (4)
- 25: Guiri 101: A Crash-Course on How to Find Summer Work in Spain (17)
- 20: Chasing Don Quixote: a Detour through Castilla-La Mancha (10)
- 09: Things to Do in Madrid with Kids: the best activites for all ages (3)
- 05: On Pessoa, Portuguese Cuisine and Hidden Tastes: a Food Tour with Taste of Lisboa (7)
- March 2016 (4)
- February 2016 (3)
- January 2016 (4)
- December 2015 (3)
- 22: My 15 Favorite Instagrams of 2015 (3)
- 15: How to Eat Like a Dane at Christmas (5)
- 09: Photo Post: Colorful Copenhagen (7)
- November 2015 (6)
- 30: Where to Sleep and Siesta in Seville: The Hostel Edition (4)
- 26: The Five Best Day Trips from Seville – 2026 (17)
- 24: Confession: I’m Nervous to Travel After the Paris Terror Attacks (27)
- 16: Five Things You Should Know About Málaga (10)
- 09: When Living Abroad Starts Feeling Like Living in America (34)
- 03: The Truth About Traveling in Sicily (18)
- October 2015 (5)
- 28: Waking up in Vegas: Five Things to Do that Aren’t Clubbing or Gambling (5)
- 20: Five Myths About Seville, Debunked (13)
- 13: Let’s Have a Little Talk About Spanish Toilets (43)
- 06: Wine Tasting for Dummies: An Afternoon with With Locals in Spain (9)
- 01: Tapa Thursday: Tasting Jerez de la Frontera (3)
- September 2015 (8)
- 28: Photo Post: Moroccan Art and Architecture at the Fundación de las Tres Culturas (6)
- 22: 30 Things I’m Glad to Have Done Before Turning 30, part 2 (4)
- 18: Preguntas Ardientes: What kind of health cover do I need for living abroad in Spain? (2)
- 15: My Seville Superlatives: The Best of the Andalusian Capital (23)
- 12: Keeping in Touch with the Spanish Speaking World (or, my ode to my second language) (0)
- 09: 30 Things I’m Glad to Have Done Before Turning 30, Part 1 (10)
- 05: Ten Mistakes New Language Assistants Make (and how to avoid them) (57)
- 02: How a River Boat Changed My Mind About Cruises (1)
- August 2015 (1)
- July 2015 (5)
- June 2015 (5)
- 30: Autonomous Community Spotlight: País Vasco (4)
- 24: Kotor Revisited, and How to Deal with a Travel Slump (9)
- 16: Desafío Eterno: Learning to Cook Spanish Food at the Mercado de Triana (4)
- 10: How to NOT Plan a Trip to Riotinto, Huelva (4)
- 02: The World’s Most Dangerous Footpath: Walking the Caminito del Rey (18)
- May 2015 (5)
- 29: Autonomous Community Spotlight: Navarra (4)
- 20: Photo Post: La Hermandad Rociera de Triana and the Pilgrimage to El Rocío (2)
- 11: Three Reasons Why Seville is a Foodie Haven (25)
- 07: My Top Tips To Stay on a Budget While Traveling (9)
- 05: Spain Snapshots: the Monastery of Yuste in Extremadura (7)
- April 2015 (6)
- 29: Autonomous Community Spotlight: Murcia (11)
- 20: The A-Z of the Feria de Abril (10)
- 16: Tapa Thursday: 10 Typical Foods You’ll Eat at the Feria de Abril (6)
- 13: Málaga: Spain’s Sleeping Giant of Tourism (10)
- 07: Visiting Seville on Two Wheels: a Bike Tour through the City’s Main Sites (12)
- 02: Autonomous Community Spotlight: Madrid (6)
- March 2015 (7)
- 31: Seville Snapshots: Palm Sunday Processions (15)
- 24: Take the Grilled Cheese and Run: How a Desperate Family Committed a Christmas Crime (6)
- 18: Visiting Seville: Best Alternatives to the Tourist Beat (25)
- 13: How to NOT Get Lost on Your Trips: Five Tips for Navigating a New City (4)
- 10: Why do Spaniards call us ‘Guiris’? (31)
- 05: Tapa Thursday: Vermouth (7)
- 02: Autonomous Community Spotlight: La Rioja (4)
- February 2015 (5)
- 23: Photo Post: the Chirigotas of the Carnavales de Cádiz (6)
- 18: Packing for a Trip to Spain: What to Bring and What to Leave at Home (34)
- 13: Ibiza’s Can’t Miss Emblematic Buildings (11)
- 10: Five Things that Make Planning a Spanish-American Wedding a Logistical Nightmare (35)
- 03: The Best Bites from the Devour Barcelona Tour (21)
- January 2015 (7)
- 30: Autonomous Community Spotlight: Galicia (7)
- 26: Where to Eat in Barcelona and Not Be Ripped Off, Disappointed or Still Hungry (28)
- 20: Photo Post: A Visit to the Seville Cathedral Rooftop (19)
- 13: Yes, Boss! : On Learning to Drive a Tuk Tuk in India (19)
- 08: Tapa Thursdays: Mamarracha (2)
- 06: 12 Grapes, 12 Months and 12 things I’m going to start doing in 2015 (22)
- 02: Autonomous Community Spotlight: Extremadura (14)
- December 2014 (9)
- 29: My 2014 Travel Roundup (18)
- 25: Merry Navidades from Sunshine and Siestas! (4)
- 22: Seville Videoshots: The Mercadillo de Belenes (12)
- 18: Tapa Thursdays: Seville’s Newest Gastrocultural Offering, the Mercado Lonja del Barranco (5)
- 15: The Anatomy of a Cesta de Navidad (14)
- 12: Three Ways to Stay Healthy on the Road (6)
- 11: Reflections in Valladolid (or, the Weird Sensation of Returning to Your Study Abroad City) (19)
- 08: Visiting Munich’s Christmas Markets (9)
- 02: Autonomous Community Spotlight: Cataluña (10)
- November 2014 (7)
- 27: Tapa Thursdays: Los Zagales in Valladolid (2)
- 24: Who is the Duquesa de Alba, and what’s with my obsession with her? (33)
- 20: The Five Things No One Tells You About Finding an Apartment in Spain (10)
- 18: Walking The Medieval Murallas of Ávila (24)
- 13: Tapa Thursdays: Taberna Panduro (2)
- 11: Thirteen Weird Spanish Superstitions (31)
- 03: The Colors of India (37)
- October 2014 (8)
- 31: Autonomous Community Spotlight: Castilla-La Mancha (15)
- 27: Love and the Art of Flamenco Guitar Making: A Visit to the Guitarrería Mariano Conde (28)
- 23: Tapa Thursdays: Yakitoro, a Chicote-run Dining Concept in Madrid (10)
- 20: Learning Photography Basics with Photo Tour Seville (10)
- 13: Spain Snapshots: Setenil de las Bodegas (and why I never need to return) (16)
- 09: The Best-Kept Secrets in Florence (10)
- 07: How Greek Life Made Me a Better Expat (25)
- 02: Tapa Thursdays: Taifa, Seville’s Answer to the Craft Brew Craze (20)
- September 2014 (8)
- 30: Autonomous Community Spotlight: Castilla y León (16)
- 26: 10 Reasons Gran Canaria is a Magical Experience (17)
- 23: Rainy Days in Oviedo (6)
- 18: Five Places in Spain that Surprised Me (51)
- 15: Expat Life Then and Now: My Seven Year Spaniversary (46)
- 11: Tapa Thursdays: The Bar that Never Fails to Impress, La Azotea (2)
- 09: Five Weird Things You’ll Find in Your Spanish Apartment (31)
- 04: Autonomous Community Spotlight: Cantabria (19)
- August 2014 (3)
- July 2014 (7)
- 31: Autonomous Community Spotlight: Las Islas Canarias (3)
- 29: Dealing with Reverse Culture Shock (or, why my country confuses me) (56)
- 22: Americana Overload: A Weekend at Road America (9)
- 18: A Very un-Sevillano Summer (12)
- 14: Spain Snapshots: The Guadalupe Monastery of Cáceres (12)
- 09: Big news: I bought a house in Spain! (39)
- 03: Why I enjoyed the Auxiliar Program and how you can, too (14)
- June 2014 (8)
- 30: Autonomous Community Spotlight: Islas Baleares // Illes Balears (11)
- 25: Elephant Riding in Rajasthan: Good Idea, Bad Idea? (30)
- 23: Spain Snapshots: The 10 Best Memes of Spain’s Crushing Defeat in the World Cup (9)
- 19: Behind Every Plate: A Day with Insiders Madrid (2)
- 16: The Thing About Spanish Weddings… (40)
- 13: Grieving as an Expat: A Story About Loss, Life and Last-Minute Bookings (36)
- 09: Spain Snapshots: My Perfect Madrileño Day (17)
- 02: Is Neuschwanstein Castle Worth It? (18)
- May 2014 (9)
- 29: A Tenerife Road Trip (24)
- 26: Seville Snapshots: The Joy of Snail Mail (I’ll even send you some!) (2)
- 19: Learning by Watching and Doing in India (57)
- 16: Four Great Mobile Apps for Keeping in Touch Back Home (and free talk time giveaway!) (21)
- 14: A Weekend at Trujillo Villas (13)
- 12: Spain Snapshots: the Feria del Caballo in Jerez de la Frontera (19)
- 08: Tapa Thursdays: Banderillas (8)
- 05: My Five Favorite Feria de Abril Moments (22)
- 02: How College and my Study Abroad Program Prepared me for a Life in Spain (30)
- April 2014 (9)
- 30: Autonomous Community Spotlight: The Principality of Asturias (17)
- 28: Seville Snapshots: el Manque Pierda and the Crónica of a Season to Forget (12)
- 23: International Book Day and Seven MORE Books on Spain (23)
- 21: Spain Snapshots: Garganta la Olla, the gorgeous extremeño pueblo you’ve never, ever heard of (36)
- 17: FluentU – Learning Spanish Through Video (26)
- 14: India: The Dream I Didn’t Know I Had (18)
- 10: Tapa Thursdays: Eating at a Guachinche on Tenerife (15)
- 07: Seville Snapshots: Costaleros Practicing for Holy Week (9)
- 03: I Bought a Flamenco Dress, Now What?!: a Guide to Buying Complementos (28)
- March 2014 (11)
- 31: Spotlight on Spanish Autonomous Regions: Aragón (13)
- 31: Top Tips for Visiting Catalonia (10)
- 27: Photo Post of Carmona: The Perfect Little Day Trip from Seville (14)
- 24: Spain Snapshots: A Visit to Spain’s Highest Point, el Teide (14)
- 20: Tapa Thursdays: The Corte Inglés Gourmet Experience (8)
- 18: Climbing the Via Ferrata of Archidona (6)
- 14: A Quick Guide to Moving to Spain (12)
- 13: Guiri, Whoa: Buying a Flamenco Dress in Seville (51)
- 10: Spain Snapshots: A Saturday Portrait of Madrid (20)
- 06: Tapa Thursdays: Sol y Sombra (5)
- 03: On Nostalgia and Expat Life (56)
- February 2014 (8)
- 28: Spotlight on Spanish Autonomous Regions: Andalucía (23)
- 26: Learning Spanish in Seville: My Story (44)
- 26: Five Reasons Why Lanzarote Should Be On Your Travel Radar (9)
- 24: Spain Snapshots: The Carnavales de Cádiz (16)
- 20: Tapa Thursdays: Free Munchies in Seville (22)
- 18: El Mercadillo el Jueves (15)
- 13: How Bratislava Surprised Me (23)
- 10: Spain Snapshots: The Medieval City of Mondoñedo along the Camino de Santiago del Norte (19)
- January 2014 (12)
- 30: Seven Indispensable Pieces of Advice for Moving Abroad (23)
- 29: Eight Reasons Why You Should Teach English in Spain NOW (30)
- 27: Seville Snapshots: SIMOF and the Moda Flamenca Industry (16)
- 23: Tapa Thursdays: Apple Strudel at Buda Castle (10)
- 21: Exploring Passau, Germany (26)
- 18: Visiting Spain’s Archaeological Sites (9)
- 16: My Biggest Travel Fiasco (or, the time I spent New Year’s Eve alone in Romania) (59)
- 13: Spain Snapshots: My 2014 Spain Wish List (37)
- 09: Tapa Thursdays: My Favorite Food Markets of 2013 (28)
- 07: Rebajas 101: How to Survive Spain’s Shopping Madness (8)
- 06: Seville Snapshots: The Cabalgata de los Reyes Magos in Triana (9)
- 02: Visiting Spain’s UNESCO World Heritage Sites (16)
- December 2013 (8)
- 28: My 2013 Travel Round-up (12)
- 19: Tapa Thursday: A Field Guide to Spanish Christmas Treats (56)
- 19: Tapas Thursday: Sampling La Brunilda (8)
- 16: Seville Snapshots: Christmas Lights in Seville (9)
- 13: Revisiting Gran Canaria: Driving the Miniature Continent of the Canary Islands (6)
- 11: A Cooking Day in Málaga: Preparing Spanish Dishes in Andalucía (17)
- 03: Picking Winter Fruit in Southern Spain (22)
- 02: Seville Snapshots: The Pabellón de Navigación (4)
- November 2013 (12)
- 28: The five best Spanish foods I never knew existed (28)
- 25: Seville Snapshots: The Ceramic Benches of the Plaza de España (19)
- 21: Tapa Thursdays: Castañas (10)
- 19: Seville: Spain’s Most Bike-Friendly City (30)
- 18: Seville Snapshots: PINC, Seville’s Networking Group for English-speaking Professionals (6)
- 15: The City Of Sorrows: Understanding Seville’s Gypsy Culture (part 2) (11)
- 13: Two Weeks on the Camino de Santiago: 14 Pictures of my Journey (Part 2) (9)
- 11: Spain Snapshots: Little Known Wines from Spain and Portugal (5)
- 08: The City of Sorrows: Understanding Seville’s Gypsy Culture (and giveaway!) (28)
- 05: The Guiri Complex (Or, Why I Can’t Have It All) (73)
- 02: Seville Snapshots: Halloween in Seville (9)
- 01: The Best Destinations for European City-Breaks (3)
- October 2013 (11)
- 30: El Caballo Camina Pa’lante: A Horse-Lover’s Guide to Andalucía (23)
- 28: Spain Snapshots: My Camino de Santiago, Video Style (17)
- 21: Preguntas Ardientes: Is an International Bank Account Right for Me? (5)
- 16: Huelva: Andalucía’s overlooked province and why I love it (30)
- 14: Seville Snapshots: Quiosco El Gato Negro (1)
- 13: Two Weeks on the Camino de Santiago: 14 Pictures of my Journey (Part 1) (14)
- 11: Seville: Perfect for a Fall City Break (4)
- 07: Seville Snapshots: Summer Nights at Plaza del Salvador (5)
- 06: What happens at the Weis’n: Oktoberfest, a Beer-Lover’s Dream (13)
- 04: Tapa Thursdays: My Most Memorable Spanish Meal (26)
- 01: What Walking the Camino de Santiago Taught Me About Life (73)
- September 2013 (14)
- 30: Spain Snapshots: The Romanesque Churches of Oviedo (12)
- 26: Tapa Thursdays: El Gallinero de Sandra (6)
- 24: Trekking the Barranco de Masca in Tenerife (9)
- 23: Seville Snapshots: Verano de San Miguel (10)
- 20: Guest Post: A Case for Fall Travel (1)
- 18: Practical Advice for Attending Spain’s Messiest Festival, la Tomatina (38)
- 16: Spain Snapshots: The Lonja de la Sede, Valencia (3)
- 13: Six Years in Spain – Six Posts You Can’t Miss (39)
- 13: Guest Post: Lanzarote’s Top Three (0)
- 11: Exploring the Roman Ruins of Itálica Near Sevilla (35)
- 09: Spain Snapshots: Playa de las Catedrales, Galicia (12)
- 05: Tapa Thursdays: Heladería Llinares and its Wacky Ice Cream Flavors (12)
- 03: Roots&Boots: Santiago de Compostela’s Pilgrim Hostel (5)
- 02: Seville Snapshots: Luarca, Asturias (22)
- August 2013 (7)
- 29: Preguntas Ardientes: Should I open a bank account in my home country? (6)
- 26: Capture the Color: My favorite colorful shots of Spain (19)
- 19: A Por Ellos: What to Know Before Attending a Spanish Soccer Game (60)
- 19: Seville Snapshots: Waymarkers on the Camino de Santiago (8)
- 15: Eating Coruña: The City’s Midrange Best Restaurants (13)
- 11: Camino de Santiago Round-Up: Best Advice and Resources (37)
- 05: Seville Snapshots: The Torre de Hércules of La Coruña (8)
- July 2013 (12)
- 30: Camino de Santiago Packing List for Women on the Camino del Norte (16)
- 29: Seville Snapshots: First Day on the #CaminoFTK (5)
- 24: The 3500’s: How Not to Despair with a High Inscrita Number When Applying to be an Auxiliar in Spain (14)
- 22: Seville Snapshots: The Real Escuela Ecuestre de Jerez (7)
- 18: Tapa Thursdays: A Gastronomic Experience at Restaurant Puerto Blanco in Calpe (15)
- 16: Paddle Surfing in Calpe (29)
- 15: Seville Snapshots: Coruña’s Blue Hour (1)
- 11: CaminoFTK: Meet my Sponsors, Podoactiva (9)
- 09: Uno de enero, dos de febrero…Experiencing the San Fermines festival of Pamplona (3)
- 08: Seville Snapshots: Un Poquiño da Coruña (7)
- 03: My Travel Round Up from the First Six Months of 2013 (32)
- 01: Seville Snapshots: A Por Ellos. La Roja and the Confederations Cup (4)
- June 2013 (10)
- 26: Bar Buza, Dubrovnik: COLD DRINKS WITH THE MOST BEAUTIFUL VIEWS! (33)
- 24: Seville Snapshots: Calle Pureza, the heart of Triana (1)
- 21: From Wine Tasting to Extraordinary Architecture: Discovering the Douro Valley (8)
- 19: Seville’s Best Terrace Bars for Summer (15)
- 17: Shooting My First Wedding: Andrea y Carlos (27)
- 14: Preguntas Ardientes: Airport Parking (7)
- 12: Technicolor Córdoba: The Colorful Little Sister City (49)
- 06: Tapa Thursdays: Gazpacho (23)
- 05: Betting on Lunch at the Lonja de Pescado of Calpe (23)
- 03: Seville Snapshots: Colorful Windows in El Centro (6)
- May 2013 (12)
- 29: Andalusia: Off the Eaten Path (17)
- 27: Seville Snapshots: The Village of Osuna (24)
- 23: Tapa Thursdays: Caracoles (9)
- 21: Photo Essay: Driving the Picturesque Bay of Kotor, Montenegro (36)
- 20: Seville Snapshots: El Peñón de Ifach (12)
- 16: Montenegro! Very nice! Weather, very bad! But People, so nice! (17)
- 14: My Biggest Medical Mishaps in Spain (19)
- 13: Seville Snapshots: Domingo de Romería (3)
- 10: Preguntas Ardientes: Tips to Get the Best Exchange Rate When You Move to Spain (8)
- 07: Preparing for the Camino: Why I’m Walking (48)
- 06: Seville Snapshots: Reflecting on Art at the Guggenheim, Bilbao (3)
- 02: Tapa Thursdays: Pescaíto (7)
- April 2013 (8)
- 23: Dia del Libro: Barcelona’s Yearly Homage to the Book and my Favorite Books About Spain (26)
- 22: Seville Snapshots: The Horses of the Feria de Abril of Sevilla (9)
- 15: The Do’s and Dont’s of the Feria de Abril of Seville (41)
- 11: Tapa Thursdays: Cevapi (7)
- 09: On the Road Again: Getting a Driver’s License in Spain, Part II (36)
- 08: Photo Essay: Walking the Dubrovnik City Walls (30)
- 03: On the Road Again: Getting a Driver’s License in Spain, Part I (41)
- 01: Seville Snapshots: Making a Splash in Croatia (8)
- March 2013 (11)
- 31: 5 Reasons Why Tübingen is a Must See in Germany (18)
- 27: Three Great Day Trips from Barcelona (16)
- 25: Seville Snapshots: Who’s That Nazareno? (8)
- 20: My Favorite Holy Week Bars in Seville (10)
- 18: Seville Snapshots: The Life, Death and Rebirth of an Orange Tree (7)
- 11: The Sagrada Familia: Gaudi’s Obra Maestra (16)
- 11: Seville Snapshot: Tools of the Trade (5)
- 07: Tapa Thursdays: Gurumelos (7)
- 05: Jaded Expat: Four (and a half) Things I Dislike About Living in Seville (64)
- 04: Seville Snapshots: Reflection of the San Fernando Statue of Plaza Nueva (8)
- 01: Four Kid-Friendly Options in Seville (12)
- February 2013 (12)
- 27: Andalusia: A Love Letter in Photos (44)
- 20: Camping on the Islas Ciès of Galicia (27)
- 18: Seville Snapshots: Laid Back at Puerta Jerez (8)
- 15: Places with Encanto: Barcelona’s Parc Guell (7)
- 15: Seville Snapshots: Twilight at the Setas of Plaza de la Encarnacion (5)
- 13: Places with Encanto: Almohalla 51, Casa Rural and Guest House in Archidona, Malaga (6)
- 11: Seville Snapshots: Love Locks in Florence, Italy (3)
- 09: How Much Spanish Should I Speak to Travel or Live in Spain? (5)
- 07: Tapas Thursday: Eating Italy (17)
- 06: Am I the only one who doesn’t like Barcelona? (207)
- 04: Seville Snapshots: The Statues of Ayamonte (9)
- 01: Applying to to the Auxiliares Program: How to Apply to be a Language Assistant in Spain (95)
- January 2013 (13)
- 30: Romantic Ideas for Valentine’s Day in Seville (14)
- 28: Seville Snapshots: When in Rome… (10)
- 25: Four Mini-breaks from Seville (1)
- 24: Tapa Thursdays: Champiñones (4)
- 22: Sleeping in Spain: A Guide to Accommodation (and 30€ Voucher Giveaway!) (54)
- 21: Seville Snapshot: Afternoons in the Plazita (10)
- 16: Visiting Estepa: More Than Just Mantecados (6)
- 14: Seville Snapshot: The Plaça Reial of Barcelona (10)
- 10: Tapa Thursdays: The Mercado de San Miguel, Madrid (21)
- 08: Making the Choice to Live Abroad (and Stay) (36)
- 07: Seville Snapshot: The Cabalgata de los Reyes Magos (9)
- 04: The Harbin Ice and Snow Sculpture Festival: The Songhua River’s Annual Swan Song (16)
- 01: Travel Highlights from the Last Six Months of 2012 (14)
- December 2012 (9)
- 31: Seville Snapshots: Reflecting on 2012 at Parc Guell, Barcelona (7)
- 20: Trendy Christmas Party: Seville’s Young Fashion Designer Scene (4)
- 18: How a misguided GPS lead us to a good find, but bad luck (21)
- 17: Seville Snapshot: Bodega Marqués de Riscal in Eltziego (País Vasco) (3)
- 13: Tapa Thursdays: Eating (and drinking) La Rioja (26)
- 10: Seville Snapshot: Christmas Lights at Town Hall (5)
- 06: Tapa Thursdays: Where’s Cat? (4)
- 04: You Know You’re in Small Town Spain when… (14)
- 03: Seville Snapshots: NO8DO and Seville’s Most Popular Urban Legend (12)
- November 2012 (12)
- 29: Tapas Thursdays: Ensaladilla Rusa (14)
- 26: Seville Snapshot: The Feria de Belén (6)
- 22: Tapa Thursdays: Mantecados de Estepa and the Despensa de Palacio (11)
- 20: Thanksgiving Turkeys and Triumphs (25)
- 19: Seville Snapshots: Bartering at the Plaza de España (2)
- 15: Tapa Thursdays: Carillada (Braised Pig Cheek) (10)
- 13: Things I’ve Gotten Better at Since Moving to Spain (29)
- 12: Seville Snapshots: Librería Babel and the Joy of Books (9)
- 08: Tapa Thursdays: The Gambas Blancas of Huelva (3)
- 07: Dancing in the Fountain: Enjoy Living Abroad Book Giveaway (21)
- 05: Seville Snapshots: The Quiet Hours (8)
- 01: Tapa Thursdays: Huesos de Santos (13)
- October 2012 (11)
- 29: Seville Snapshots: Horse Carriages (2)
- 25: Tapa Thursdays: The Effervescent Jamón Ibérico (24)
- 22: Seville Snapshots: Santa Catalina Church (2)
- 18: Sampling Spanish Food: Five Must-Try Tapas (19)
- 16: Learning a Language for Love (24)
- 15: Seville Snapshots: Arcos de la Frontera, Cádiz (10)
- 12: Five Places You’ll Wait in Line in Spain (18)
- 10: Sampling Barajas20 Tapas Bar: between Gastro and Traditional (10)
- 05: How to Get a Carné Jóven Andaluz (14)
- 03: Uncovering the Romania Diaries (26)
- 01: Seville Snapshots: Plaza de España (2)
- September 2012 (11)
- 29: Swanky Barcelona Hostels: Where to Sleep in the Ciudad Condal (2)
- 27: The Rain in Spain (1)
- 24: Seville Snapshots: Paseo de Espolón, Burgos (2)
- 24: How to Vote Abroad from Spain (4)
- 20: Details and Street Art in Porto (13)
- 18: How to Survive a Blog Conference as a Newbie (9)
- 17: Seville Snapshots: the Nighttime Streets of Santa Cruz (6)
- 12: Five Years, Five Goals (14)
- 10: Seville Snapshots:Centro Andaluz de Arte Contemporaneo (1)
- 06: Fisherman’s Feast of Boston (2)
- 03: Seville Snapshots: Focusing on the Future (13)
- August 2012 (8)
- 30: Postcards from Chicago (11)
- 27: Seville Snapshots: Tourist Season (1)
- 25: Saturday in the Park: NYC’s Central Park (7)
- 23: Places with Encanto: Casa Hernanz Alpargateria (4)
- 15: My Chicago Soundtrack (5)
- 08: The Hardest Goodbye (2)
- 06: Seville Snapshots: Red line, Jackson station (5)
- 02: Capture the Color (5)
- July 2012 (7)
- 29: Seville Snapshots: Baby’s First Goose Barnacle (7)
- 23: Seville Snapshots: Patio de las Doncellas (6)
- 19: Sun, Sun, Sun! (1)
- 16: Seville Snapshots: Beware the Falling Oranges! (7)
- 13: Places with Encanto: La Bombilla, La Coruña (5)
- 09: Seville Snapshots: The View from Patio de los Naranjos (7)
- 02: Spain Snapshots: Plaza María Pita, A Coruña (12)
- June 2012 (10)
- 30: Travel Highlights from the First Six Months of 2012 (7)
- 27: Strange Food Spotlight: Ears in Madrid (9)
- 25: Seville Snapshots: Flamenco Recital (8)
- 22: Sampling La Bulla (19)
- 18: Seville Snapshots: La Giralda (12)
- 17: Saying Goodbye (39)
- 11: Seville Snapshots: The Battle of the Towers (9)
- 09: How La Roja Made Me Love Fútbol Again (8)
- 07: Baa, Baa Black Sheep: Sampling Ovejas Negras Tapas Bar (15)
- 04: Seville Snapshots: Pasaje de Miguel Mañara (15)
- May 2012 (7)
- 31: For the Love of the Dove: El Rocío (19)
- 24: Death in the Afternoon (15)
- 21: How Oxford Changed my Mind About England (28)
- 18: Snail Tale, Part 2 (7)
- 14: How to Learn English (6)
- 08: Murcia via Instagram (13)
- 03: ¡A Vivir, que son (seis) días (de Feria)! (21)
- April 2012 (7)
- 29: What to do With Outdated Travel Guides (19)
- 24: A Beginner’s Guide to Turkish Food (32)
- 21: 92 Reasons to visit Seville (7)
- 18: Turkey Story (20)
- 15: How to Pay Taxes in Spain (aka The Day I Became an Adult) (12)
- 13: How to Dress for the Feria de Sevilla (28)
- 10: Of Mosques and Men (17)
- March 2012 (7)
- 30: Nazareno, Nazareno (6)
- 28: The Serendipity of Traveling in Galicia (20)
- 20: Signs of Spring (7)
- 15: Ya Huele a Primavera (7)
- 12: My Seven Super Shots (14)
- 06: A Glimpse Inside My Classroom (22)
- 03: An Inside Peek: The Ayuntamiento of Seville (6)
- February 2012 (4)
- 28: Seville Bucketlist: One Year Update (11)
- 20: I like my Sketchers… (8)
- 17: Everybody Was Pueblo-Timing (4)
- 09: Valencia Nocturna (1)
- January 2012 (6)
- December 2011 (5)
- 20: Mother of God. (20)
- 17: Three Ways to Beat Holiday Blues Abroad (10)
- 10: Disappointment. (5)
- 07: What to expect on the DELE Spanish Exam (24)
- 03: Y nace en Santa Cruz. (4)
- November 2011 (4)
- 26: The Charca: Coming to Grips with a Life Abroad (6)
- 12: from the Chi to the SVQ (3)
- 07: Do’s and Don’ts: How to Prepare for the DELE Spanish Exam (64)
- 02: I like cemeteries. (13)
- October 2011 (4)
- 30: The One Where the Novio Carved a Pumpkin (6)
- 23: …eres mi rincón favorito de Madrid. (17)
- 12: Show me some CARA. (8)
- 06: …y de postre? A Guide to Spanish Desserts (23)
- September 2011 (4)
- 26: Agua, Azucarillos y Aguardiente: A Night at the Zarzuela (1)
- 18: On Spanish Tacos and Balls. (16)
- 12: Happy Spaniversary to Me! (8)
- 09: September 11th, 10 years later (4)
- August 2011 (3)
- 31: My Old Kentucky Home (1)
- 29: Dublin Doors (1)
- 04: Takeoffs and Landings (2)
- July 2011 (1)
- June 2011 (2)
- May 2011 (3)
- April 2011 (2)
- March 2011 (2)
- 29: Things Not to Expect in your Spanish Flat (9)
- 24: Granada, Spain in photos (4)
- February 2011 (4)
- 21: Spain Life in Photos: Feria del Mosto (5)
- 19: It happened one night at Casa Anselma… (1)
- 15: On Becoming Pareja de Hecho in Spain (29)
- 05: Spain Life in Photos: SIMOF (3)
- January 2011 (3)
- November 2010 (3)
- 25: Feliz, Feliz en tu día! (2)
- 18: San Diego, Bendito! (5)
- 17: One, Two, Three (0)
- October 2010 (1)
- 22: When I Grow Up (1)
- September 2010 (2)
- August 2010 (2)
- 30: Vaya Campamento, Parte Dos (0)
- 13: Culture shocks I have experienced in Spain (1)
- July 2010 (2)
- June 2010 (1)
- May 2010 (3)
- 28: Algo se muere en el Almaaa: my last weeks at IES Heliche (0)
- 23: 18 May: football and saints (2)
- 13: Live versus Living (0)
- April 2010 (2)
- 26: Revuelto de Abril (0)
- 04: Toros a Tope (1)
- March 2010 (1)
- 03: Sábado de Excursión (0)
- February 2010 (1)
- 17: Kölle Alaaf (3)
- January 2010 (1)
- 19: Marrakesh: A Character Study (2)
- December 2009 (2)
- 17: Escenas Navideñas (0)
- 08: The Spanish Outback (0)
- November 2009 (1)
- 15: Vejer de la Frontera (2)
- October 2009 (3)
- 24: Jammin. At a ham festival. (0)
- 20: The Rain in Spain (0)
- 13: de ida y vuelta (0)
- September 2009 (1)
- 19: Meditation on la Siesta (0)
- June 2009 (1)
- May 2009 (2)
- 26: La Estrellita (2)
- 03: La Feria en Crisis (0)
- April 2009 (2)
- March 2009 (1)
- 10: Me quejo hoy de…. (0)
- January 2009 (1)
- December 2008 (3)
- November 2008 (2)
- October 2008 (1)
- July 2008 (1)
- June 2008 (1)
- May 2008 (3)
- 26: Bodas, beach and the boy! (0)
- 20: End of the school year at IES Heliche (2)
- 05: Galicia (0)
- April 2008 (2)
- 12: ¡Vámanos pá la Feria Cariño Mío! (0)
- 06: Return to the Homeland (3)
- March 2008 (1)
- 19: Pais Vasco (0)
- February 2008 (1)
- November 2007 (1)
- 15: Wonderment (0)
- October 2007 (4)
- September 2007 (2)
</script>
<?php
}
// Grab all posts and filter them into an array
function GetPosts() {
global $wpdb;
// If we have a cached copy of the filtered posts array, use that instead
if ( $posts = wp_cache_get( ‘posts’, ‘clean-archives-reloaded’ ) )
return $posts;
// A direct query is used instead of get_posts() for memory reasons
$rawposts = $wpdb->get_results( “SELECT ID, post_date, post_date_gmt, comment_status, comment_count FROM $wpdb->posts WHERE post_status = ‘publish’ AND post_type = ‘post’ AND post_password = ”” );
// Loop through each post and sort it into a structured array
foreach( $rawposts as $post ) {
$posts[ mysql2date( ‘Y.m’, $post->post_date ) ][] = $post;
}
$rawposts = null; // More memory cleanup
// Store the results into the WordPress cache
wp_cache_set( ‘posts’, $posts, ‘clean-archives-reloaded’ );
return $posts;
}
// Generates the HTML output based on $atts array from the shortcode
function PostList( $atts = array() ) {
global $wp_locale;
// Set any missing $atts items to the defaults
$atts = shortcode_atts(array(
‘usejs’ => get_option(‘car_usejs’),
‘monthorder’ => get_option(‘car_monthorder’),
‘postorder’ => get_option(‘car_postorder’),
‘postcount’ => ‘1’,
‘commentcount’ => ‘1’,
), $atts);
// Get the big array of all posts
$posts = $this->GetPosts();
// Sort the months based on $atts
( ‘new’ == $atts[‘monthorder’] ) ? krsort( $posts ) : ksort( $posts );
// Sort the posts within each month based on $atts
foreach( $posts as $key => $month ) {
$sorter = array();
foreach ( $month as $post )
$sorter[] = $post->post_date_gmt;
$sortorder = ( ‘new’ == $atts[‘postorder’] ) ? SORT_DESC : SORT_ASC;
array_multisort( $sorter, $sortorder, $month );
$posts[$key] = $month;
unset($month);
}
// Generate the HTML
$html = ‘<div class=”car-container’;
if ( 1 == $atts[‘usejs’] ) $html .= ‘ car-collapse’;
$html .= ‘”>’. “\n”;
if ( 1 == $atts[‘usejs’] ) $html .= ‘<a href=”#” class=”car-toggler”>’ . __(‘Expand All’, ‘clean-archives-reloaded’) . “</a>\n\n”;
$html .= ‘<ul class=”car-list”>’ . “\n”;
$firstmonth = TRUE;
foreach( $posts as $yearmonth => $posts ) {
list( $year, $month ) = explode( ‘.’, $yearmonth );
$firstpost = TRUE;
foreach( $posts as $post ) {
if ( TRUE == $firstpost ) {
$html .= ‘ <li><span class=”car-yearmonth”>’ . sprintf( __(‘%1$s %2$d’), $wp_locale->get_month($month), $year );
if ( ‘0’ != $atts[‘postcount’] ) $html .= ‘ <span title=”‘ . __(‘Post Count’, ‘clean-archives-reloaded’) . ‘”>(‘ . count($posts) . ‘)</span>’;
$html .= “</span>\n <ul class=’car-monthlisting’>\n”;
$firstpost = FALSE;
}
$html .= ‘ <li>’ . mysql2date( ‘d’, $post->post_date ) . ‘: <a href=”‘ . get_permalink( $post->ID ) . ‘”>’ . get_the_title( $post->ID ) . ‘</a>’;
// Unless comments are closed and there are no comments, show the comment count
if ( ‘0’ != $atts[‘commentcount’] && ( 0 != $post->comment_count || ‘closed’ != $post->comment_status ) )
$html .= ‘ <span title=”‘ . __(‘Comment Count’, ‘clean-archives-reloaded’) . ‘”>(‘ . $post->comment_count . ‘)</span>’;
$html .= “</li>\n”;
}
$html .= ” </ul>\n </li>\n”;
}
$html .= “</ul>\n</div>\n”;
return $html;
}
// Returns the total number of posts
function PostCount() {
$num_posts = wp_count_posts( ‘post’ );
return number_format_i18n( $num_posts->publish );
}
// Deletes the cached filtered posts array for users using a persistent caching plugin
function DeleteCache() {
wp_cache_delete( ‘posts’, ‘clean-archives-reloaded’ );
}
}
// Start this plugin once all other plugins are fully loaded
add_action( ‘init’, create_function( ”, ‘global $CleanArchivesReloaded; $CleanArchivesReloaded = new CleanArchivesReloaded();’ ) );
// Some backwards compatibility wrapper functions
function car_total_posts() {
global $CleanArchivesReloaded;
return $CleanArchivesReloaded->PostCount();
}
function clean_archives_reloaded() {
global $CleanArchivesReloaded;
echo $CleanArchivesReloaded->PostList();
}
function car_regenerate() {
return FALSE;
}
?>
Pingback: So You’re Dating a Spaniard—Cat « Kaley…& Más
I plan on taking the DELE B2 exam in May and the information you provided served as a great starting point! I just ordered El Cronometro from amazon.es and I plan on giving myself La Tesis de Nancy as an early regalo for Navidad. Thanks again!
My pleasure, Dominique! Suerte!