settings = array( 'version' => '3.3.0', 'url' => plugin_dir_url( __FILE__ ), 'path' => plugin_dir_path( __FILE__ ), ); // include files require plugin_dir_path( __FILE__ ) . 'includes/api-template.php'; require plugin_dir_path( __FILE__ ) . 'includes/admin_settings.php'; require plugin_dir_path( __FILE__ ) . 'includes/functions.php'; // include field add_action( 'acf/include_field_types', array( $this, 'include_field_types' ) ); // v5 add_action( 'acf/register_fields', array( $this, 'include_field_types' ) ); // v4 add_action( 'acf/field_group/admin_enqueue_scripts', array( $this, 'field_group_admin_enqueue_scripts' ) ); } /* * include_field_types * * This function will include the field type class * * @type function * @date 17/02/2016 * @since 1.0.0 * * @param $version (int) major ACF version. Defaults to false * @return n/a */ function include_field_types( $version = false ) { // support empty $version if ( ! $version ) { $version = 4; } // include include_once 'fields/acf-Typography-v' . $version . '.php'; } function field_group_admin_enqueue_scripts() { wp_enqueue_script( 'acf-typography-fieldgroup-script', plugin_dir_url( __FILE__ ) . 'assets/js/admin-field-group.js', array( 'jquery' ), $this->settings['version'] ); } } // initialize new acf_plugin_Typography(); // keep the legacy YOUR_API_KEY constant available until 4.0 acft_maybe_define_legacy_api_key(); // stop the background Google Fonts refresh; saved data is removed in uninstall.php register_deactivation_hook( __FILE__, 'acft_deactivate' ); // class_exists check endif;