';
$error_message .= sprintf( __( '%1$s requires both %2$s and %3$s to function correctly. Please activate %4$s before activating %1$s. For now, the plugin has been deactivated.', 'acf-tablepress' ), 'ACF: TablePress', 'TablePress', '' . __( 'Advanced Custom Fields (4 or 5)', 'acf-tablepress' ) . '', $to_enable );
$error_message .= '
';
echo $error_message;
if ( isset( $_GET['activate'] ) ) {
unset( $_GET['activate'] );
}
}
}
}
/* For ACF 5 */
// $version = 5 and can be ignored until ACF6 exists
function include_field_types_tablepress( $version ) {
include_once 'tablepress-v5.php';
}
add_action( 'acf/include_field_types', 'include_field_types_tablepress' );
/* For ACF 4 */
function register_fields_tablepress() {
include_once('tablepress-v4.php');
}
add_action('acf/register_fields', 'register_fields_tablepress');
add_action( 'init', 'acftp_load_plugin_textdomain' );
function acftp_load_plugin_textdomain() {
$domain = 'acf-tablepress';
$locale = apply_filters( 'plugin_locale', get_locale(), $domain );
load_textdomain( $domain, WP_LANG_DIR . '/' .$domain. '/' . $domain . '-' . $locale . '.mo' );
load_plugin_textdomain( $domain, FALSE, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
}
}
add_action( 'plugins_loaded', 'acftp_init' );