ACF_Generous

The core ACF Generous class.

Defined (1)

The class is defined in the following location(s).

/acf-generous.php  
  1. class ACF_Generous { 
  2.  
  3. /** 
  4. * The current version of the plugin. 
  5. * @since 0.1.0 
  6. * @access protected 
  7. * @var string $version The current version of the plugin. 
  8. */ 
  9. protected $version = '0.1.1'; 
  10.  
  11. /** 
  12. * The core functionality of the plugin. 
  13. * @since 0.1.0 
  14. * @access public 
  15. */ 
  16. public function __construct() { 
  17. add_action( 'plugins_loaded', array( $this, 'load' ) ); 
  18.  
  19. /** 
  20. * Check to make sure required dependencies are loaded. 
  21. * @since 0.1.0 
  22. * @access public 
  23. */ 
  24. public function load() { 
  25. if( class_exists( 'WP_Generous' ) ) { 
  26. $this->run(); 
  27.  
  28. /** 
  29. * Run plugin. 
  30. * @since 0.1.0 
  31. * @access private 
  32. */ 
  33. private function run() { 
  34. load_plugin_textdomain( 'acf-generous', false, dirname( plugin_basename(__FILE__) ) . '/languages/' ); 
  35. add_action( 'acf/register_fields', array( $this, 'register_fields_generous_slider' ) ); 
  36. add_action( 'acf/include_field_types', array( $this, 'include_field_types_generous_slider' ) ); 
  37.  
  38. /** 
  39. * ACF v4 settings. 
  40. * @since 0.1.0 
  41. * @access public 
  42. */ 
  43. public function register_fields_generous_slider() { 
  44. include_once('v4/acf-generous-slider.php'); 
  45.  
  46. /** 
  47. * ACF v5 settings. 
  48. * @since 0.1.0 
  49. * @access public 
  50. */ 
  51. public function include_field_types_generous_slider( $version ) { 
  52. include_once('v5/acf-generous-slider.php'); 
  53.