function __construct($parent) { parent::__construct($parent); $this->name = 'wysiwyg'; $this->title = __("Wysiwyg Editor", 'acf'); add_action('acf_head-input', array($this, 'acf_head')); }
function __construct($parent) { parent::__construct($parent); $this->name = 'flexible_content'; $this->title = __("Flexible Content", 'acf'); add_action('admin_head', array($this, 'admin_head_field')); }
function __construct($parent) { parent::__construct($parent); $this->name = 'relationship'; $this->title = __("Relationship", 'acf'); add_action('wp_ajax_acf_get_relationship_results', array($this, 'acf_get_relationship_results')); }
function __construct($parent) { parent::__construct($parent); $this->parent = $parent; $this->name = 'widget_template_relationship'; $this->title = __('Widget Template Relationship', 'acf'); }
/** * Class Constructor - Instantiates a new Taxonomy Field * @param Acf $parent Parent Acf class */ public function __construct($parent) { //Call parent constructor parent::__construct($parent); //Get the textdomain from the Helper class $this->l10n_domain = ACF_Taxonomy_Field_Helper::L10N_DOMAIN; //Base directory of this field $this->base_dir = rtrim(dirname(realpath(__FILE__)), DIRECTORY_SEPARATOR); //Build the base relative uri by searching backwards until we encounter the wordpress ABSPATH //This may not work if the $base_dir contains a symlink outside of the WordPress ABSPATH $root = array_pop(explode(DIRECTORY_SEPARATOR, rtrim(realpath(ABSPATH), DIRECTORY_SEPARATOR))); $path_parts = explode(DIRECTORY_SEPARATOR, $this->base_dir); $parts = array(); while ($part = array_pop($path_parts)) { if ($part == $root) { break; } array_unshift($parts, $part); } $this->base_uri_rel = '/' . implode('/', $parts); $this->base_uri_abs = get_site_url(null, $this->base_uri_rel); $this->name = 'taxonomy-field'; $this->title = __('Taxonomy', $this->l10n_domain); add_action('admin_print_scripts', array(&$this, 'admin_print_scripts'), 12, 0); add_action('admin_print_styles', array(&$this, 'admin_print_styles'), 12, 0); }
function __construct($parent) { parent::__construct($parent); $this->name = 'wysiwyg'; $this->title = __("Wysiwyg Editor", 'acf'); add_action('admin_head', array($this, 'add_tiny_mce')); add_filter('wp_default_editor', array($this, 'my_default_editor')); }
function __construct($parent) { parent::__construct($parent); $this->name = 'repeater'; $this->title = __("Repeater", 'acf'); // filters add_filter('acf_save_field-' . $this->name, array($this, 'acf_save_field')); }
function __construct($parent) { parent::__construct($parent); $this->name = 'flexible_content'; $this->title = __("Flexible Content", 'acf'); // filters add_filter('acf_save_field-' . $this->name, array($this, 'acf_save_field')); }
function __construct($parent) { parent::__construct($parent); $this->name = 'wysiwyg'; $this->title = __("Wysiwyg Editor", 'acf'); add_action('acf_head-input', array($this, 'acf_head')); add_filter('acf/fields/wysiwyg/toolbars', array($this, 'toolbars'), 1, 1); }
function __construct() { $this->name = 'acf_google_maps'; $this->label = 'Google Map Address Lookup'; // do not delete! parent::__construct($parent); add_action('save_post', array($this, 'save_lat_lng')); }
function __construct($parent) { parent::__construct($parent); $this->name = 'image'; $this->title = __('Image', 'acf'); add_action('admin_head-media-upload-popup', array($this, 'popup_head')); add_filter('media_send_to_editor', array($this, 'media_send_to_editor'), 15, 2); }
function __construct($parent) { parent::__construct($parent); $this->name = 'file'; $this->title = __('File', 'acf'); add_action('admin_head-media-upload-popup', array($this, 'popup_head')); add_filter('media_send_to_editor', array($this, 'media_send_to_editor'), 15, 2); add_filter('get_media_item_args', array($this, 'allow_img_insertion')); }
function __construct($parent) { // do not delete! parent::__construct($parent); // set name / title $this->name = 'post_type_selector'; $this->label = __('Post Type Selector'); $this->defaults = array('select_type' => 'Checkboxes'); }
function __construct($parent) { // do not delete! parent::__construct($parent); // set name / title $this->name = 'gravity_forms_field'; $this->title = 'Gravity Forms'; $this->defaults = array('multiple' => '0', 'allow_null' => '0'); }
function __construct() { // vars $this->name = 'website'; $this->label = __('Website'); $this->defaults = array('default_value' => '', 'internal_link' => 0, 'website_title' => 0, 'output_format' => 0); // do not delete! parent::__construct(); }
function __construct($parent) { parent::__construct($parent); $this->name = 'image'; $this->title = __('Image', 'acf'); add_action('admin_head-media-upload-popup', array($this, 'popup_head')); add_filter('get_media_item_args', array($this, 'allow_img_insertion')); add_action('wp_ajax_acf_get_preview_image', array($this, 'acf_get_preview_image')); }
function __construct($parent) { parent::__construct($parent); $this->name = 'file'; $this->title = __('File', 'acf'); add_action('admin_head-media-upload-popup', array($this, 'popup_head')); add_action('wp_ajax_acf_select_file', array($this, 'ajax_select_file')); add_filter('get_media_item_args', array($this, 'allow_file_insertion')); }
function __construct($parent) { parent::__construct($parent); $this->name = 'file'; $this->title = __('File', 'acf'); add_action('admin_head-media-upload-popup', array($this, 'popup_head')); add_filter('get_media_item_args', array($this, 'allow_file_insertion')); add_action('acf_head-update_attachment-file', array($this, 'acf_head_update_attachment')); add_action('wp_ajax_acf/fields/file/get_files', array($this, 'ajax_get_files')); }
function __construct($parent) { // do not delete! parent::__construct($parent); // set name / title $this->name = 'users_field'; // variable name (no spaces / special characters / etc) $this->title = __("Users", 'acf'); // field label (Displayed in edit screens) }
function __construct($parent) { parent::__construct($parent); $this->name = 'gallery'; $this->title = __("Gallery", 'acf'); // actions add_action('admin_head-media-upload-popup', array($this, 'popup_head')); add_action('acf_head-update_attachment-gallery', array($this, 'acf_head_update_attachment')); add_action('wp_ajax_acf_get_gallery_list_data', array($this, 'acf_get_gallery_list_data')); }
function __construct($parent) { parent::__construct($parent); $this->name = 'select'; $this->title = __("Select", 'acf'); // filters (for all fields with choices) add_filter('acf_save_field-select', array($this, 'acf_save_field')); add_filter('acf_save_field-checkbox', array($this, 'acf_save_field')); add_filter('acf_save_field-radio', array($this, 'acf_save_field')); }
function __construct($parent) { // do not delete! parent::__construct($parent); // set name / title $this->name = 'post_type_selector'; // variable name (no spaces / special characters / etc) $this->title = __("Post Type Selector", 'acf'); // field label (Displayed in edit screens) }
function __construct($parent) { // do not delete! parent::__construct($parent); // set name / title $this->name = 'date_time_picker'; $this->title = __('Date and Time Picker'); $this->domain = 'acf-field-date-time-picker'; $this->defaults = array('label' => __('Choose Time', $this->domain), 'time_format' => 'hh:mm', 'show_date' => 'true', 'date_format' => 'yy-mm-dd', 'show_week_number' => 'false', 'picker' => 'slider', 'save_as_timestamp' => 'true', 'get_as_timestamp' => 'false'); $this->settings = array('path' => $this->helpers_get_path(__FILE__), 'dir' => $this->helpers_get_dir(__FILE__), 'version' => '2.0.9'); }
function __construct($parent) { // do not delete! parent::__construct($parent); // set name / title $this->name = 'sidebar_selector'; $this->title = __('Sidebar Selector', 'acf'); $this->defaults = array('allow_null' => '1', 'default_value' => ''); // settings $this->settings = array('path' => $this->helpers_get_path(__FILE__), 'dir' => $this->helpers_get_dir(__FILE__), 'version' => '1.0.0'); }
function __construct($parent) { // do not delete! parent::__construct($parent); // set name / title $this->name = 'hidden'; $this->title = __('Hidden'); $this->defaults = array(); // settings $this->settings = array('path' => $this->helpers_get_path(__FILE__), 'dir' => $this->helpers_get_dir(__FILE__), 'version' => '1.0.0'); }
function __construct($parent) { parent::__construct($parent); $this->name = 'image'; $this->title = __('Image', 'acf'); add_action('admin_head-media-upload-popup', array($this, 'popup_head')); add_filter('get_media_item_args', array($this, 'allow_img_insertion')); add_action('acf_head-update_attachment-image', array($this, 'acf_head_update_attachment')); add_action('wp_ajax_acf/fields/image/get_images', array($this, 'ajax_get_images')); //add_filter('image_size_names_choose', array($this, 'image_size_names_choose')); add_action('wp_prepare_attachment_for_js', array($this, 'wp_prepare_attachment_for_js'), 10, 3); }
function __construct($parent) { // do not delete! parent::__construct($parent); // set name / title $this->name = 'leaflet_field'; $this->title = __('Leaflet Field'); $this->defaults = array('lat' => '55.606', 'lng' => '13.002', 'zoom_level' => 13, 'height' => 400, 'api_key' => '', 'map_provider' => 'openstreetmap'); // settings // settings $this->settings = array('path' => $this->helpers_get_path(__FILE__), 'dir' => $this->helpers_get_dir(__FILE__), 'version' => '1.2.1'); }
function __construct($parent) { // do not delete! parent::__construct($parent); // set name / title $this->name = 'wp_wysiwyg'; $this->title = __('WP WYSIWYG'); $this->defaults = array('media_buttons' => 1, 'teeny' => 0, 'dfw' => 1, 'default_value' => ''); // settings // settings $this->settings = array('path' => '', 'dir' => '', 'version' => '1.0.0'); }
/** * Class Constructor - Instantiates a new NGGallery Field */ public function __construct($parent) { parent::__construct($parent); error_log("plugin constuctor"); //Get the textdomain from the Helper class $this->l10n_domain = acf_nggallery_field_plugin::L10N_DOMAIN; $this->name = 'nggallery-field'; $this->category = __("Relational", 'acf'); // Basic, Content, Choice, etc $post_title = !class_exists('nggdb') ? '. ' . __('NextGEN Gallery plugin is not installed or activated!', $this->l10n_domain) : false; $this->title = __('NextGEN Gallery' . $post_title, $this->l10n_domain); $this->label = __('NextGEN Gallery' . $post_title, $this->l10n_domain); $this->defaults = array('input_type' => 'select', 'allow_null' => true, 'input_size' => 5, 'nextgen_type' => 'Galleries and Albums'); }
function __construct($parent) { parent::__construct($parent); // vars $this->name = 'google_font_selector'; $this->label = __('Google Font Selector', 'acf'); $this->category = __("Choice", 'acf'); $this->defaults = array('include_web_safe' => true, 'default_font' => 'Droid Sans', 'interface' => 'advanced'); parent::__construct(); $api_key = defined('ACF_GOOGLE_FONTS_API_KEY') ? ACF_GOOGLE_FONTS_API_KEY : 'AIzaSyDprvtcGk0jQhIAIr0CdW7g57A5eRyesrc'; $this->api_key = $api_key; $this->fonts = $this->get_google_fonts(); $this->web_safe = $this->set_web_safe(); $this->settings = array('path' => apply_filters('acf/helpers/get_path', __FILE__), 'dir' => apply_filters('acf/helpers/get_dir', __FILE__), 'version' => '1.0.0'); add_action('wp_ajax_acfgfs_get_font_data', array($this, 'action_get_font_data')); if (!(defined('ACF_GOOGLE_FONTS_DISABLE_HEADER') && true == ACF_GOOGLE_FONTS_DISABLE_HEADER)) { add_action('wp_head', array($this, 'google_font_request')); } }