This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Activello — a free classic (non-block) WordPress blog theme by Colorlib, v1.6.0, derived from Underscores (_s) and built on Bootstrap 3.4.1. Text domain: activello. Verified against WordPress 7.0 on PHP 8.5. WooCommerce-compatible.
This is a WordPress theme folder, not an application project: there is no build toolchain committed (the old Grunt 0.4 / Travis stack was deleted in 1.6.0 — Travis no longer exists and that Grunt stack cannot run on modern Node). Files ship exactly as they sit on disk.
- No build step.
style.cssandassets/css/*.cssare edited directly — there is no SCSS source.assets/js/functions.jsships unminified and is what's enqueued; vendor files (bootstrap.*,flexslider.*,font-awesome.*) are stock upstream builds — never hand-edit them. - Version lives in the
style.cssheader and is read once into theACTIVELLO_VERSIONconstant (functions.php), which cache-busts every theme asset. Bump the header and every asset URL follows — never hardcode a version in an enqueue. Version must also be bumped inreadme.md/readme.txt(kept identical; both carry the changelog). - To run it, symlink or copy this folder into a WordPress install's
wp-content/themes/. The verification lab used for the 1.5.0/1.6.0 work is/Users/silkalns/Projects/colorlib-theme-lab/wp(SQLite drop-in,php -S 127.0.0.1:8099fromwp/, current wp-cli phar needed for PHP 8.5 — the lab's ownwp-cli.pharis too old). This theme is symlinked there aswp-content/themes/activello. - i18n: regenerate with
wp i18n make-pot . languages/activello.pot --domain=activello, thenmsgmerge --update --backup=none <locale>.po languages/activello.potandmsgfmteach locale (26 bundled). Every placeholder string needs atranslators:comment inside the PHP block or extraction warns. - Release zip:
zip -r activello.zip activello/ -x "activello/.git/*" "activello/CLAUDE.md"from the parent directory — everything else in the folder is meant to ship. Theme Check passes as of 1.6.0 (0 required, 0 warnings); keep it that way — no dev files (shell scripts, rulesets, CI configs) in the theme root, images compressed (screenshot.jpgquality 92, 1200x900).
- Every AJAX handler needs a capability check and
check_ajax_referer(). The welcome screen's nonce is theme-owned (activello_welcome_nonce, localized intoactivelloWelcomeScreenObject). Never hook privileged work toadmin_init— admin-ajax.php fires it before authentication. - Colours printed into the wp_head
<style>block go throughactivello_css_color()(inc/extras.php), which re-validates at output time; stored mods from old versions may hold arbitrary text. The Customizer sanitizeractivello_sanitize_hexcolor()returns''(never the raw input) on failure. - Anything rendering user-supplied data (tag names, titles, plugin-API fields) must be escaped — that sweep is done; keep new output escaped.
- functions.php is the hub:
ACTIVELLO_VERSION, theme supports (including block-editor supports +assets/css/editor-style.css), image sizes (activello-featured/slider/thumbnail/medium/big), enqueues, and requires for everything ininc/. - Option-list globals load on
init(activello_setup_globals()):$site_layoutand$header_showtranslate their labels, and translating earlier trips WP 6.7+'s_load_textdomain_just_in_timenotice on every request. Anything reading them must run oninitor later. - Theme mods (
activello_*, plusaccent_color/social_color/social_hover_color) are declared ininc/customizer.phpand take effect ininc/extras.php: body classes for sidebar layout, blog-layout selection (template-parts/content.phpvscontent-grid.php), the FlexSlider markup (activello_featured_slider()), and the inline colour CSS onwp_head. Per-post layout override comes from thesite_layoutmeta (inc/metaboxes.php), resolved in header.php. - Gotcha:
activello_featured_hide == 1means the slider is enabled (despite the name). Slider assets (flexslider CSS/JS +assets/js/flexslider-custom.js) load only on the front page with that mod on. - Customizer toggles are first-party (1.6.0):
Activello_Customize_Toggle_Control(inc/class-activello-customize-toggle-control.php) is presentation-only — sanitization lives in each setting'ssanitize_callback, never in the control.Epsilon_Control_Togglesurvives as a deprecated alias for child themes; don't use it in new code or remove it without a major version. Switch CSS:assets/css/customizer.css, loaded only oncustomize_controls_enqueue_scripts. The Epsilon framework itself is gone and its upstream (MachoThemes) deleted — never reintroduce it. - Welcome screen (
inc/welcome-screen/): "About Activello" under Appearance. Tabs render viaget_template_part()with a tab allowlist; the Recommended Plugins tab uses core's plugin-card markup (core plugin-install styles — the theme adds no CSS for it) and renders in a bare.wrapbecauseabout.cssinflates type inside.about-wrap. The required-actions list ships empty (welcome-page-setup.php) — its tab exists only by URL. - Navigation:
Activello_Wp_Bootstrap_Navwalkeremits BS3 markup;.activello-dropdownspans are the mobile sub-menu toggles handled in functions.js;activello_make_top_level_menu_clickable()(inc/extras.php) injects a small vanilla-JS snippet onwp_footerfor desktop. - Widgets: Social, Recent Posts, Categories in
inc/widgets/, registered inactivello_widgets_init(). One sidebar (sidebar-1).
assets/js/functions.js is plain DOM APIs, no jQuery, enqueued in the footer with no jQuery dependency. It keeps window.ActivelloIsMobile and window.generateMobileMenu as globals because child themes may call them, reproduces jQuery's swing easing for scroll-to-top, and honours prefers-reduced-motion. The no-js→js class swap is a one-line inline script in header.php (Modernizr is gone).
FlexSlider is a jQuery plugin, so flexslider-custom.js keeps its jQuery dependency and uses $( window ).on( 'load' ) — the removed-in-jQuery-3 .load() shorthand only worked via jQuery Migrate, so the slider silently died wherever Migrate was dequeued. Bootstrap's JS also still requires jQuery; only theme-owned code dropped it.
Do not mix Bootstrap majors. Until 1.5.0 the theme shipped BS 3.3.7 CSS with BS 4.x JS against BS3 markup, held together by a hand-patched .navbar-collapse.collapse:not(.show) rule. All four Bootstrap files are now stock 3.4.1 (byte-identical to the official dist, includes the CVE-2019-8331 fix).
No committed test suite; regressions are visual and silent. The bar set by 1.5.0/1.6.0:
- WP 7.0 / PHP 8.5 with
WP_DEBUG+WP_DEBUG_LOGon: sweep home, single (incl. password-protected), page, category, tag, author, search, empty search, 404, feed, attachment — plus admin: all welcome tabs, Customizer, widgets, block editor. Target is an empty debug.log. - Exercise option-driven paths: slider on/off, blog layout, sidebar positions, all colour pickers.
phpcs --standard=PHPCompatibilityWP --runtime-set testVersion 8.5reports 0 errors/0 warnings.- Theme Check: 0 REQUIRED / 0 WARNING (remaining advisories: block styles/patterns suggestions, the intentional inline no-js script, credit links).
- WooCommerce: shop, product, cart, checkout, my-account render clean (declared supports incl. gallery zoom/lightbox/slider).
- Every function is prefixed
activello_; template-level ones are wrapped inif ( ! function_exists() )so child themes can override. Preserve both. - WordPress coding standards: tabs, spaces inside parens,
esc_html__()/esc_attr()at output. - Assets are conditionally enqueued (slider assets only when rendering) and versioned from
ACTIVELLO_VERSIONor the real library version.