function __construct() { /* * name (string) Single word, no spaces. Underscores allowed */ $this->name = 'smart_button'; /* * label (string) Multiple words, can include spaces, visible when selecting a field type */ $this->label = __('Smart Button'); /* * category (string) basic | content | choice | relational | jquery | layout | CUSTOM GROUP NAME */ $this->category = 'basic'; /* * defaults (array) Array of default settings which are merged into the field object. These are used later in settings */ $this->defaults = array(); /* * l10n (array) Array of strings that are used in JavaScript. This allows JS strings to be translated in PHP and loaded via: * var message = acf._e('FIELD_NAME', 'error'); */ $this->l10n = array('error' => __('Error! Please enter a higher value', 'acf-smart-button')); $this->settings = array('path' => apply_filters('acf/helpers/get_path', __FILE__), 'dir' => apply_filters('acf/helpers/get_dir', __FILE__), 'version' => '1.0.0'); // do not delete! parent::__construct(); }
/** * __construct * * @since 1.0.0 */ function __construct() { // Vars global $wp_filesystem; if (empty($wp_filesystem)) { require_once ABSPATH . '/wp-admin/includes/file.php'; WP_Filesystem(); } $this->name = 'fonticonpicker'; $this->label = __('Icon Picker', 'acf'); $this->category = __("jQuery", 'acf'); $this->defaults = array('allow_null' => 0); $this->l10n = array(); parent::__construct(); // Settings $this->settings = array('dir' => get_template_directory_uri() . '/inc/includes/acf-fonticonpicker', 'path' => get_template_directory() . '/inc/includes/acf-fonticonpicker', 'config' => get_template_directory() . '/inc/includes/acf-fonticonpicker', 'icons' => get_template_directory_uri() . '/inc/includes/acf-fonticonpicker/icons/style.css', 'version' => '1.0.0'); // Apply a filter so that you can load icon set from theme $this->settings = apply_filters('acf/acf_field_fonticonpicker/settings', $this->settings); // Enqueue icons style in the frontend add_action('wp_enqueue_scripts', array($this, 'frontend_enqueue')); // Load icons list from the icons JSON file if (is_admin()) { $json_file = trailingslashit($this->settings['config']) . '/icons/selection.json'; if ($wp_filesystem->exists($json_file)) { $json_content = $wp_filesystem->get_contents($json_file); if (!$json_content) { return new WP_Error('reading_error', 'Error when reading file'); } $this->json_content = json_decode($json_content, true); } } }
function __construct() { $this->name = 'qtranslate_textarea'; $this->label = __("Text Area", 'acf'); $this->category = __("qTranslate", 'acf'); acf_field::__construct(); }
function __construct() { /* * name (string) Single word, no spaces. Underscores allowed */ $this->name = 'link_picker'; /* * label (string) Multiple words, can include spaces, visible when selecting a field type */ $this->label = __('Link Picker', 'acf-link_picker'); /* * category (string) basic | content | choice | relational | jquery | layout | CUSTOM GROUP NAME */ $this->category = 'choice'; /* * defaults (array) Array of default settings which are merged into the field object. These are used later in settings */ $this->defaults = array(); /* * l10n (array) Array of strings that are used in JavaScript. This allows JS strings to be translated in PHP and loaded via: * var message = acf._e('link_picker', 'error'); */ $this->l10n = array('yes' => __('Yes'), 'no' => __('No'), 'edit_link' => __('Edit Link', 'acf-link_picker'), 'insert_link' => __('Insert Link', 'acf-link_picker')); // do not delete! parent::__construct(); }
function __construct() { /* * name (string) Single word, no spaces. Underscores allowed */ $this->name = 'multi-taxonomy-chooser'; /* * label (string) Multiple words, can include spaces, visible when selecting a field type */ $this->label = __('Multi Taxonomy Chooser', 'acf-multi-taxonomy-chooser'); /* * category (string) basic | content | choice | relational | jquery | layout | CUSTOM GROUP NAME */ $this->category = 'choice'; /* * defaults (array) Array of default settings which are merged into the field object. These are used later in settings */ $this->defaults = array('choices' => array(), 'allow_null' => 0, 'multiple' => 0, 'ui' => 0, 'ajax' => 0, 'type_value' => 1, 'data_type' => 1); /* * l10n (array) Array of strings that are used in JavaScript. This allows JS strings to be translated in PHP and loaded via: * var message = acf._e('multi-taxonomy-chooser', 'error'); */ $this->l10n = array('error' => __('Error! Please enter a higher value', 'acf-multi-taxonomy-chooser')); // do not delete! parent::__construct(); }
function __construct() { /* * name (string) Single word, no spaces. Underscores allowed */ $this->name = 'image_area_selection'; /* * label (string) Multiple words, can include spaces, visible when selecting a field type */ $this->label = __('Image Area Selection', 'acf-image_area_selection'); /* * category (string) basic | content | choice | relational | jquery | layout | CUSTOM GROUP NAME */ $this->category = 'jquery'; /* * defaults (array) Array of default settings which are merged into the field object. These are used later in settings */ $this->defaults = array('image_field_class' => ''); /* * l10n (array) Array of strings that are used in JavaScript. This allows JS strings to be translated in PHP and loaded via: * var message = acf._e('image_area_selection', 'error'); */ $this->l10n = array('edit' => __("Edit Selection", 'acf'), 'confirm' => __("Confirm Selection", 'acf'), 'cancel' => __("Cancel", 'acf')); // do not delete! parent::__construct(); }
/** * Set everything up */ function __construct() { /** * Name of field */ $this->name = 'widget_area'; /** * label visible when selecting a field type */ $this->label = __('Widget Area', 'acf_widget_area'); /** * category (string) basic | content | choice | relational | jquery | layout | CUSTOM GROUP NAME */ $this->category = 'content'; /** * defaults (array) Array of default settings which are merged into the field object. */ $this->defaults = array(); /** * l10n (array) Array of strings that are used in JavaScript. This allows JS strings to be translated in PHP and loaded via: * var message = acf._e('FIELD_NAME', 'error'); */ $this->l10n = array(); // do not delete! parent::__construct(); }
/** * __construct * * This function will setup the field type data * * @date 5/03/2014 * @since 5.0.0 * * @param $settings */ function __construct($settings) { /* * name (string) Single word, no spaces. Underscores allowed */ $this->name = 'custom_font_icons'; /* * label (string) Multiple words, can include spaces, visible when selecting a field type */ $this->label = __('Custom Font Icons', 'acf-custom_font_icons'); /* * category (string) basic | content | choice | relational | jquery | layout | CUSTOM GROUP NAME */ $this->category = 'basic'; /* * defaults (array) Array of default settings which are merged into the field object. These are used later in settings */ $this->defaults = array('class_prefix' => "fa"); /* * l10n (array) Array of strings that are used in JavaScript. This allows JS strings to be translated in PHP and loaded via: * var message = acf._e('custom_font_icons', 'error'); */ $this->l10n = array('error' => __('Error! Please enter a higher value', 'acf-custom_font_icons')); /* * settings (array) Store plugin settings (url, path, version) as a reference for later use with assets */ $this->settings = $settings; // do not delete! parent::__construct(); }
function __construct() { // $test = get_field( 'test_term_select', $_GET['post'] ); // echo 'shit<pre>'; // print_r( $test ); // echo '</pre>'; /* * name (string) Single word, no spaces. Underscores allowed */ $this->name = 'taxonomy-chooser'; /* * label (string) Multiple words, can include spaces, visible when selecting a field type */ $this->label = __('Term and Taxonomy Chooser', 'acf-taxonomy-chooser'); /* * category (string) basic | content | choice | relational | jquery | layout | CUSTOM GROUP NAME */ $this->category = 'choice'; /* * defaults (array) Array of default settings which are merged into the field object. These are used later in settings */ $this->defaults = array('choices' => array(), 'tax_type' => 0, 'allow_null' => 0, 'ui' => 0, 'ajax' => 0, 'type_value' => 1, 'multiple' => 0); // Notes: 'multiple' used to be associated with a 'select multiple values field' also /* * l10n (array) Array of strings that are used in JavaScript. This allows JS strings to be translated in PHP and loaded via: * var message = acf._e('taxonomy-chooser', 'error'); */ $this->l10n = array('error' => __('Error! Please enter a higher value', 'acf-taxonomy-chooser')); // do not delete! parent::__construct(); }
function __construct() { /* * name (string) Single word, no spaces. Underscores allowed */ $this->name = 'address_map'; /* * label (string) Multiple words, can include spaces, visible when selecting a field type */ $this->label = __('Address Map', 'acf-address_map'); /* * category (string) basic | content | choice | relational | jquery | layout | CUSTOM GROUP NAME */ $this->category = 'jQuery'; /* * defaults (array) Array of default settings which are merged into the field object. These are used later in settings */ $this->default_values = array('center_lat' => '47.6256211', 'center_lng' => '-122.3529964', 'zoom' => '14'); /* * l10n (array) Array of strings that are used in JavaScript. This allows JS strings to be translated in PHP and loaded via: * var message = acf._e('address_map', 'error'); */ $this->l10n = array('locating' => __("Locating", 'acf'), 'browser_support' => __("Sorry, this browser does not support geolocation", 'acf')); // do not delete! parent::__construct(); }
function __construct() { // vars $this->name = 'wysiwyg'; $this->label = __("Wysiwyg Editor", 'acf'); $this->category = 'content'; $this->defaults = array('tabs' => 'all', 'toolbar' => 'full', 'media_upload' => 1, 'default_value' => ''); // Create an acf version of the_content filter (acf_the_content) if (!empty($GLOBALS['wp_embed'])) { add_filter('acf_the_content', array($GLOBALS['wp_embed'], 'run_shortcode'), 8); add_filter('acf_the_content', array($GLOBALS['wp_embed'], 'autoembed'), 8); } add_filter('acf_the_content', 'capital_P_dangit', 11); add_filter('acf_the_content', 'wptexturize'); add_filter('acf_the_content', 'convert_smilies'); add_filter('acf_the_content', 'convert_chars'); // not found in WP 4.4 add_filter('acf_the_content', 'wpautop'); add_filter('acf_the_content', 'shortcode_unautop'); //add_filter( 'acf_the_content', 'prepend_attachment' ); should only be for the_content (causes double image on attachment page) if (function_exists('wp_make_content_images_responsive')) { add_filter('acf_the_content', 'wp_make_content_images_responsive'); // added in WP 4.4 } add_filter('acf_the_content', 'do_shortcode', 11); // actions add_action('acf/input/admin_footer', array($this, 'input_admin_footer')); // do not delete! parent::__construct(); }
function __construct() { /* * name (string) Single word, no spaces. Underscores allowed */ $this->name = 'focal_point'; /* * label (string) Multiple words, can include spaces, visible when selecting a field type */ $this->label = __('Focal Point', 'acf-focal_point'); /* * category (string) basic | content | choice | relational | jquery | layout | CUSTOM GROUP NAME */ $this->category = 'jquery'; /* * defaults (array) Array of default settings which are merged into the field object. These are used later in settings */ $this->defaults = array('save_format' => 'tag', 'preview_size' => 'large', 'image_size' => 'large'); /* * l10n (array) Array of strings that are used in JavaScript. This allows JS strings to be translated in PHP and loaded via: * var message = acf._e('focal_point', 'error'); */ $this->l10n = array(); // do not delete! parent::__construct(); }
function __construct() { /* * name (string) Single word, no spaces. Underscores allowed */ $this->name = 'image_crop'; /* * label (string) Multiple words, can include spaces, visible when selecting a field type */ $this->label = __('Image with user-crop', 'acf-image_crop'); /* * category (string) basic | content | choice | relational | jquery | layout | CUSTOM GROUP NAME */ $this->category = 'content'; /* * defaults (array) Array of default settings which are merged into the field object. These are used later in settings */ $this->defaults = array('force_crop' => 'no', 'crop_type' => 'hard', 'preview_size' => 'medium', 'save_format' => 'id', 'save_in_media_library' => 'yes', 'target_size' => 'thumbnail', 'library' => 'all', 'retina_mode' => 'no'); $this->options = get_option('acf_image_crop_settings'); // add ajax action to be able to retrieve full image size via javascript add_action('wp_ajax_acf_image_crop_get_image_size', array(&$this, 'crop_get_image_size')); add_action('wp_ajax_acf_image_crop_perform_crop', array(&$this, 'perform_crop')); // add filter to media query function to hide cropped images from media library add_filter('ajax_query_attachments_args', array($this, 'filterMediaQuery')); // Register extra fields on the media settings page on admin_init add_action('admin_init', array($this, 'registerSettings')); /* * l10n (array) Array of strings that are used in JavaScript. This allows JS strings to be translated in PHP and loaded via: * var message = acf._e('image_crop', 'error'); */ $this->l10n = array('width_should_be' => __('Width should be at least: ', 'acf-image_crop'), 'height_should_be' => __('Height should be at least: ', 'acf-image_crop'), 'selected_width' => __('Selected image width: ', 'acf-image_crop'), 'selected_height' => __('Selected image height: ', 'acf-image_crop'), 'size_warning' => __('Warning: The selected image is smaller than the required size!', 'acf-image_crop'), 'crop_error' => __('Sorry, an error occurred when trying to crop your image:')); // do not delete! acf_field::__construct(); //parent::__construct(); }
function __construct() { /* * name (string) Single word, no spaces. Underscores allowed */ $this->name = 'icon_font'; /* * label (string) Multiple words, can include spaces, visible when selecting a field type */ $this->label = __('Icon Font', 'acf-icon_font'); /* * category (string) basic | content | choice | relational | jquery | layout | CUSTOM GROUP NAME */ $this->category = 'basic'; /* * defaults (array) Array of default settings which are merged into the field object. These are used later in settings */ $this->defaults = array(); /* * l10n (array) Array of strings that are used in JavaScript. This allows JS strings to be translated in PHP and loaded via: * var message = acf._e('icon_font', 'error'); */ $this->l10n = array('error' => __('Error! Please select another value', 'acf-icon_font')); $this->settings = array('path' => dirname(__FILE__), 'dir' => $this->helpers_get_dir(__FILE__), 'version' => '1.0'); $this->selectedIcon = null; $fontInfo = file_get_contents($this->settings['path'] . '/font-info.json'); $fontInfo = json_decode($fontInfo); $this->iconNames = $fontInfo->iconClasses; // do not delete! parent::__construct(); }
function __construct() { /* * name (string) Single word, no spaces. Underscores allowed */ $this->name = 'Range'; /* * label (string) Multiple words, can include spaces, visible when selecting a field type */ $this->label = __('Range', 'acf-range'); /* * category (string) basic | content | choice | relational | jquery | layout | CUSTOM GROUP NAME */ $this->category = 'jQuery'; /* * defaults (array) Array of default settings which are merged into the field object. These are used later in settings */ $this->defaults = array('font_size' => 14, 'slider_type' => 'default', 'min' => 0, 'max' => 100, 'default_value_1' => 0, 'default_value_2' => 100, 'step' => 1, 'title' => __('Range', 'acf'), 'separate' => '-', 'prepend' => '', 'append' => ''); /* * l10n (array) Array of strings that are used in JavaScript. This allows JS strings to be translated in PHP and loaded via: * var message = acf._e('FIELD_NAME', 'error'); */ $this->l10n = array('error' => __('Error! Please enter a higher value', 'acf-range')); // do not delete! parent::__construct(); $this->settings = array('path' => apply_filters('acf/helpers/get_path', __FILE__), 'dir' => apply_filters('acf/helpers/get_dir', __FILE__), 'version' => '1.1.4'); }
function __construct() { // vars $this->name = 'wysiwyg'; $this->label = __("Wysiwyg Editor", 'acf'); $this->category = __("Content", 'acf'); $this->defaults = array('toolbar' => 'full', 'media_upload' => 'yes', 'default_value' => ''); // Create an acf version of the_content filter (acf_the_content) if (isset($GLOBALS['wp_embed'])) { add_filter('acf_the_content', array($GLOBALS['wp_embed'], 'run_shortcode'), 8); add_filter('acf_the_content', array($GLOBALS['wp_embed'], 'autoembed'), 8); } add_filter('acf_the_content', 'capital_P_dangit', 11); add_filter('acf_the_content', 'wptexturize'); add_filter('acf_the_content', 'convert_smilies'); add_filter('acf_the_content', 'convert_chars'); add_filter('acf_the_content', 'wpautop'); add_filter('acf_the_content', 'shortcode_unautop'); //add_filter( 'acf_the_content', 'prepend_attachment' ); *should only be for the_content (causes double image on attachment page) add_filter('acf_the_content', 'do_shortcode', 11); // do not delete! parent::__construct(); // filters add_filter('acf/fields/wysiwyg/toolbars', array($this, 'toolbars'), 1, 1); add_filter('mce_external_plugins', array($this, 'mce_external_plugins'), 20, 1); }
function __construct() { /* * name (string) Single word, no spaces. Underscores allowed */ $this->name = 'location'; /* * label (string) Multiple words, can include spaces, visible when selecting a field type */ $this->label = __('Post location', 'acf-location'); /* * category (string) basic | content | choice | relational | jquery | layout | CUSTOM GROUP NAME */ $this->category = 'basic'; /* * defaults (array) Array of default settings which are merged into the field object. These are used later in settings */ $this->defaults = array('font_size' => 14); /* * l10n (array) Array of strings that are used in JavaScript. This allows JS strings to be translated in PHP and loaded via: * var message = acf._e('location', 'error'); */ $this->l10n = array('error' => __('Error! Please enter a higher value', 'acf-location')); // do not delete! parent::__construct(); }
function __construct() { // vars $this->name = 'gallery'; $this->label = __("Gallery", 'acf'); $this->category = 'content'; $this->defaults = array('preview_size' => 'thumbnail', 'library' => 'all', 'min' => 0, 'max' => 0); $this->l10n = array('select' => __("Add Image to Gallery", 'acf'), 'edit' => __("Edit Image", 'acf'), 'update' => __("Update Image", 'acf'), 'uploadedTo' => __("uploaded to this post", 'acf'), 'max' => __("Maximum selection reached", 'acf'), 'tmpl' => '<div data-id="<%= id %>" class="acf-gallery-attachment acf-soh"> <input type="hidden" value="<%= id %>" name="<%= name %>[]"> <div class="padding"> <img alt="" src="<%= url %>"> </div> <div class="actions acf-soh-target"> <a class="acf-icon dark" data-name="remove-attachment-button" data-id="<%= id %>" href="#"> <i class="acf-sprite-delete"></i> </a> </div> </div>'); // actions add_action('wp_ajax_acf/fields/gallery/get_attachment', array($this, 'ajax_get_attachment')); add_action('wp_ajax_nopriv_acf/fields/gallery/get_attachment', array($this, 'ajax_get_attachment')); add_action('wp_ajax_acf/fields/gallery/update_attachment', array($this, 'ajax_update_attachment')); add_action('wp_ajax_nopriv_acf/fields/gallery/update_attachment', array($this, 'ajax_update_attachment')); add_action('wp_ajax_acf/fields/gallery/get_sort_order', array($this, 'ajax_get_sort_order')); add_action('wp_ajax_nopriv_acf/fields/gallery/get_sort_order', array($this, 'ajax_get_sort_order')); // do not delete! parent::__construct(); }
function __construct() { /* * name (string) Single word, no spaces. Underscores allowed */ $this->name = 'strict_wysiwyg'; /* * label (string) Multiple words, can include spaces, visible when selecting a field type */ $this->label = __('Strict WYSIWYG Editor', 'acf-strict_wysiwyg'); /* * category (string) basic | content | choice | relational | jquery | layout | CUSTOM GROUP NAME */ $this->category = 'content'; /* * defaults (array) Array of default settings which are merged into the field object. These are used later in settings */ $this->defaults = array('simplify' => false, 'no_return' => false, 'disable_toolbar' => false); /* * l10n (array) Array of strings that are used in JavaScript. This allows JS strings to be translated in PHP and loaded via: * var message = acf._e('strict_wysiwyg', 'error'); */ $this->l10n = array('error' => __('Error! Please enter a higher value', 'acf-strict_wysiwyg')); // do not delete! parent::__construct(); }
function __construct() { // vars $this->name = 'post_object'; $this->label = __("Post Object", 'acf'); // do not delete! parent::__construct(); }
function __construct() { // vars $this->name = 'dummy'; $this->label = __('Dummy'); // do not delete! parent::__construct(); }
function __construct() { $this->name = 'advanced_taxonomy_selector'; $this->label = __('Advanced Taxonomy Selector', 'acf-advanced_taxonomy_selector'); $this->category = 'Relational'; $this->defaults = array('taxonomies' => '', 'data_type' => 'terms', 'field_type' => 'multiselect', 'allow_null' => true, 'post_type' => false, 'return_value' => 'term_id'); parent::__construct(); }
public function __construct($logger) { $this->name = "hubapi_content_picker"; $this->label = __("Hub API Content Picker", "acf-{$this->name}"); $this->category = "content"; $this->defaults = array(); parent::__construct(); }
function __construct() { // vars $this->name = 'acf_cf7'; $this->label = __('Contact Form 7'); // do not delete! parent::__construct(); }
function __construct() { // vars $this->name = 'page_link'; $this->label = __("Page Link", 'acf'); // do not delete! parent::__construct(); }
function __construct() { // vars $this->name = 'layer_slider'; $this->label = __('Layer Slider'); // do not delete! parent::__construct(); }
function __construct() { // vars $this->name = 'message'; $this->label = __("Message", 'acf'); // do not delete! parent::__construct(); }
/** * __construct() * * This function will setup the field type data * * @type function * @date 5/03/2014 * @since 5.0.0 * * @param n/a * @return n/a */ function __construct() { $this->name = 'gravity_forms_field'; $this->label = __('Gravity Forms'); $this->category = __('Relational', 'acf'); $this->defaults = array('allow_multiple' => 0, 'allow_null' => 0); parent::__construct(); }
function __construct() { // vars $this->name = 'channel_rtmp_url'; $this->label = __("RTMP URL", 'acf'); // do not delete! parent::__construct(); }
function __construct() { $this->name = 'tablepress_field'; $this->label = __('TablePress', 'acf-tablepress'); $this->category = __("Relational", 'acf'); $this->defaults = array('allow_null' => 0, 'return_format' => 'table_id'); parent::__construct(); }