automator_get_integration_by_name( $name )
Contents
Parameters Parameters
- $name
-
(Required)
Return Return
(string)
Source Source
File: src/global-functions.php
function automator_get_integration_by_name( string $name ) { $integration = strtolower( str_replace( array( ' ', '_' ), '-', $name ) ); $integration_keys = array_keys( Set_Up_Automator::$all_integrations ); if ( in_array( $integration, $integration_keys, true ) ) { return $integration; } $return = ''; switch ( $integration ) { case 'wordpress': //phpcs:ignore WordPress.WP.CapitalPDangit.Misspelled $return = 'wp'; break; case 'easy-digital-downloads': $return = 'edd'; break; case 'automator': $return = 'uncanny-automator'; break; } return apply_filters( 'automator_get_integration_key', $return, $integration, $name ); }
Expand full source code Collapse full source code View on Github
Changelog Changelog
Version | Description |
---|---|
3.0 | Introduced. |