Filter: dmyip_core_filters
Since: 1.7.2
Hook timing: Runs on init (after theme functions.php loads, so themes can filter it)
This developer reference documents the plugin’s filters, with dmyip_core_filters as the headline: introduced in 1.7.2, it controls which WordPress core filters process shortcodes, so themes can disable title or excerpt processing without losing content rendering.
Controls which WordPress hooks the plugin attaches its shortcode renderer to. Allows themes and plugins to selectively disable shortcode processing in titles, excerpts, and archive titles. As of 1.8.0 these callbacks render only the plugin’s own tags (via the internal Registry allowlist), so third-party shortcodes in titles and excerpts are left untouched.
Default value:
[
'the_title' => true,
'single_post_title' => true,
'wp_title' => true,
'the_excerpt' => true,
'get_the_excerpt' => true,
'get_the_archive_title' => true,
]Disable all core filters
Shortcodes will still work in post content and Gutenberg blocks. Only title/excerpt/archive title processing is disabled.
add_filter( 'dmyip_core_filters', '__return_empty_array' );Disable specific filters
add_filter( 'dmyip_core_filters', function ( $filters ) {
$filters['the_title'] = false;
$filters['the_excerpt'] = false;
return $filters;
} );Disable only in admin
Useful if shortcodes in titles cause issues in the admin post list but should render on the frontend.
add_filter( 'dmyip_core_filters', function ( $filters ) {
if ( is_admin() ) {
$filters['the_title'] = false;
}
return $filters;
} );Disable everywhere except post content
add_filter( 'dmyip_core_filters', '__return_empty_array' );This is the cleanest approach. Post content runs through the_content which always processes shortcodes via WordPress core. The dmyip_core_filters hook only controls the additional hooks the plugin adds.
Return false to disable all
Returning a non-array value disables all filters (the plugin has an is_array() guard):
add_filter( 'dmyip_core_filters', '__return_false' );Filter: strip_shortcodes_tagnames
The plugin hooks into strip_shortcodes_tagnames to prevent its shortcodes from being removed by WordPress’s strip_shortcodes() function.
This ensures shortcodes like [year] and [month] remain intact in excerpts and other contexts where WordPress strips shortcodes by default.
Protected tags: year, month, cmonth, mon, cmon, mm, mn, nmonth, cnmonth, pmonth, cpmonth, nmon, cnmon, pmon, cpmon, date, monthyear, nmonthyear, pmonthyear, nyear, nnyear, pyear, ppyear, dt, nd, pd, weekday, wd, blackfriday, cybermonday, daysuntil, dayssince, datepublished, datemodified, age, season
Using Shortcodes in PHP
// Basic usage in theme templates
echo do_shortcode( '[year]' );
echo do_shortcode( '[month] [year]' );
echo do_shortcode( '[age date="1990-05-15" format="ym"]' );
// In dynamic strings
$copyright = do_shortcode( 'Copyright [year] My Company' );
// Conditional logic based on output
$days = (int) do_shortcode( '[daysuntil date="2026-12-25"]' );
if ( $days <= 30 ) {
echo 'Christmas is coming!';
}Using Shortcodes in ACF Fields
The plugin does not process shortcodes in ACF fields by default (security consideration). Enable selectively:
// By field type - all text fields
add_filter( 'acf/format_value/type=text', 'do_shortcode' );
// By field name
add_filter( 'acf/format_value/name=headline', 'do_shortcode' );
// By field key
add_filter( 'acf/format_value/key=field_abc123', 'do_shortcode' );
// Textarea fields
add_filter( 'acf/format_value/type=textarea', 'do_shortcode' );
// WYSIWYG fields
add_filter( 'acf/format_value/type=wysiwyg', 'do_shortcode' );REST API from JavaScript
// Fetch all dates
const response = await fetch('/wp-json/dmyip/v1/dates');
const dates = await response.json();
console.log(dates.year.current); // "2026"
// Fetch a specific date
const age = await fetch('/wp-json/dmyip/v1/date/age?date=1990-05-15');
const data = await age.json();
console.log(data.value); // "35"See REST API for full endpoint documentation.
Plugin Constants
DYNAMIC_MONTH_YEAR_INTO_POSTS_VERSION:'1.8.0'→ Plugin versionDMYIP_PLUGIN_FILE:__FILE__→ Main plugin file pathDMYIP_PLUGIN_DIR:plugin_dir_path()→ Plugin directory pathDMYIP_PLUGIN_URL:plugin_dir_url()→ Plugin directory URL
Namespaces and Classes
Namespace: DMYIP\
DMYIP\Plugin: Bootstrap, singleton, registers all componentsDMYIP\Date\DateEngine: Site-timezone date calculations (added in 1.8.0)DMYIP\Date\DateRenderer: Single renderer behind every shortcode, block, binding, REST and CLI output (added in 1.8.0)DMYIP\Shortcodes\Registry: Central allowlist of plugin-owned shortcode tags (added in 1.8.0)DMYIP\Shortcodes\Year: Year shortcodesDMYIP\Shortcodes\Month: Month shortcodesDMYIP\Shortcodes\Day: Day shortcodesDMYIP\Shortcodes\Date: Combined date shortcodesDMYIP\Shortcodes\PostDate: Published/modified date shortcodesDMYIP\Shortcodes\Events: Black Friday/Cyber MondayDMYIP\Shortcodes\Countdown: Days until/since, age calculationDMYIP\Shortcodes\Season: Season shortcodesDMYIP\Shortcodes\CoreFilters: WordPress hook integrationDMYIP\BlockEditor\Assets: Editor script/style enqueueDMYIP\BlockEditor\Patterns: Block pattern registrationDMYIP\BlockEditor\DynamicDateBlock: Dynamic Date block registrationDMYIP\BlockEditor\BlockBindings: Block Bindings API (WP 6.5+)DMYIP\REST\DatesEndpoint: REST API endpointsDMYIP\CLI\Commands: WP-CLI commandsDMYIP\Integrations\RankMath: Rank Math filtersDMYIP\Integrations\Yoast: Yoast SEO filtersDMYIP\Integrations\SEOPress: SEOPress filtersDMYIP\Integrations\Elementor: Elementor widget filterDMYIP\Integrations\Bricks: Bricks Builder dynamic data filterDMYIP\Integrations\RelatedPosts: CRP title filter
Localized Script Data
Since 1.8.0 the plugin passes dmyipEditorData to the editor script (replacing the older dmyipData object):
window.dmyipEditorData = {
bindingValues: {
year: "2026",
month: "July",
date: "July 27, 2026",
monthyear: "July 2026",
weekday: "Monday",
blackfriday: "November 27"
}
};Used for live preview values in the editor, including the Block Bindings source preview.
Quick answers to common questions:
How do I stop shortcode processing in titles only?
Filter dmyip_core_filters and remove the title entries from the array; content and excerpt processing continue untouched. It runs on init after the theme loads, so a theme’s functions.php can register the filter normally.
Can I add my own dynamic shortcode alongside the plugin’s?
Yes, register your shortcode normally; it works in post content as usual. Note that since 1.8.0 the plugin’s title, excerpt, and SEO-field processing renders only its own tags, so your shortcode won’t piggyback on those hooks. Add your own filter (or do_shortcode call) for titles if you need it there.