本文整理汇总了PHP中acf_Field::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP acf_Field::__construct方法的具体用法?PHP acf_Field::__construct怎么用?PHP acf_Field::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类acf_Field
的用法示例。
在下文中一共展示了acf_Field::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
function __construct($parent)
{
parent::__construct($parent);
$this->name = 'wysiwyg';
$this->title = __("Wysiwyg Editor", 'acf');
add_action('acf_head-input', array($this, 'acf_head'));
}
示例2:
function __construct($parent)
{
parent::__construct($parent);
$this->parent = $parent;
$this->name = 'widget_template_relationship';
$this->title = __('Widget Template Relationship', 'acf');
}
示例3: __construct
/**
* 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);
}
示例4: array
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'));
}
示例5: array
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'));
}
示例6: array
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);
}
示例7: array
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'));
}
示例8: array
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);
}
示例9: array
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'));
}
示例10: array
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');
}
示例11: array
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');
}
示例12: array
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();
}
示例13: array
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'));
}
示例14: array
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'));
}
示例15: array
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'));
}