SVG HTML.
*/
function aha_orbit_testimonials_get_social_icons()
{
return array(
'facebook' => '',
'instagram' => '',
'linkedin' => '',
'twitter' => '',
'youtube' => '',
'tiktok' => '',
'google' => '',
'trustpilot' => '',
);
}
/**
* Register the built-in layouts (default, grid, carousel).
*
* This is the single canonical source for built-in layout definitions.
* Both the shortcode and the metabox layout selector consume layouts
* exclusively through the `aha_orbit_testimonials_layouts` filter,
* so registering here guarantees they are always in sync.
*
* Add-ons can hook into the same filter at a higher priority to add
* their own layouts without touching core code.
*
* @param array $layouts Existing layouts array.
* @return array
*/
function aha_orbit_testimonials_register_builtin_layouts($layouts)
{
$path = AHA_ORBIT_TESTIMONIALS_PATH . 'templates/frontend/';
return array_merge(
array(
'default' => array(
'label' => __('Default (Orbit)', 'aha-orbit-testimonials'),
'template' => $path . 'default.php',
'supported_fields' => array(),
),
'grid' => array(
'label' => __('Grid', 'aha-orbit-testimonials'),
'template' => $path . 'grid.php',
'supported_fields' => array(),
),
'carousel' => array(
'label' => __('Carousel', 'aha-orbit-testimonials'),
'template' => $path . 'carousel.php',
'supported_fields' => array(),
),
),
$layouts
);
}
add_filter('aha_orbit_testimonials_layouts', 'aha_orbit_testimonials_register_builtin_layouts', 5);
/**
* Initialize the plugin.
*/
function aha_orbit_testimonials_init()
{
// Initialize CPT
Aha_Orbit_Testimonials_CPT::get_instance();
// Admin functionality
if (is_admin()) {
Aha_Orbit_Testimonials_Settings::get_instance();
Aha_Orbit_Testimonials_Metabox::get_instance();
Aha_Orbit_Testimonials_Admin_Assets::get_instance();
Aha_Orbit_Testimonials_Admin_Notices::get_instance();
}
// Frontend – always loaded.
Aha_Orbit_Testimonials_Shortcode::get_instance();
Aha_Orbit_Testimonials_Frontend_Assets::get_instance();
/**
* Action hook: aha_orbit_testimonials_init
* Allows add-ons to hook into plugin initialisation.
*
* @since 1.0.0
*/
do_action('aha_orbit_testimonials_init');
}
add_action('plugins_loaded', 'aha_orbit_testimonials_init', 15);
/**
* Activation hook.
*/
function aha_orbit_testimonials_activate()
{
/**
* Action hook: aha_orbit_testimonials_activate
* Runs when the plugin is activated.
*
* @since 1.0.0
*/
do_action('aha_orbit_testimonials_activate');
}
register_activation_hook(__FILE__, 'aha_orbit_testimonials_activate');
/**
* Deactivation hook.
*/
function aha_orbit_testimonials_deactivate()
{
/**
* Action hook: aha_orbit_testimonials_deactivate
* Runs when the plugin is deactivated.
*
* @since 1.0.0
*/
do_action('aha_orbit_testimonials_deactivate');
}
register_deactivation_hook(__FILE__, 'aha_orbit_testimonials_deactivate');