y;
if ( $years_diff === false )
return 0;
return $years_diff;
}
function age_in_years_shortcodes_notice() {
echo '
The Age Shortcodes plugin is not working because the shortcode [age] is already registered.
';
}
function age_in_years_shortcodes_init() {
if ( shortcode_exists( 'age' ) )
add_action( 'all_admin_notices', 'age_in_years_shortcodes_notice' );
else
add_shortcode( 'age', 'age_in_years_shortcodes' );
}
add_action( 'init', 'age_in_years_shortcodes_init' );