当前位置: 首页>>代码示例>>PHP>>正文


PHP acf_Field::__construct方法代码示例

本文整理汇总了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'));
 }
开发者ID:robjcordes,项目名称:nexnewwp,代码行数:7,代码来源:wysiwyg.php

示例2:

 function __construct($parent)
 {
     parent::__construct($parent);
     $this->parent = $parent;
     $this->name = 'widget_template_relationship';
     $this->title = __('Widget Template Relationship', 'acf');
 }
开发者ID:troubletribbles,项目名称:dr_bootstrap,代码行数:7,代码来源:widget_template_relationship.php

示例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);
 }
开发者ID:radist2s,项目名称:acf-taxonomy-field,代码行数:30,代码来源:taxonomy-field.php

示例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'));
 }
开发者ID:niko-lgdcom,项目名称:barrows,代码行数:8,代码来源:wysiwyg.php

示例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'));
 }
开发者ID:masayukiando,项目名称:wordpress-event-search,代码行数:8,代码来源:repeater.php

示例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);
 }
开发者ID:subhadip-sahoo,项目名称:wp-project2,代码行数:8,代码来源:wysiwyg.php

示例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'));
 }
开发者ID:felipegenuino,项目名称:rtaonline-novo,代码行数:8,代码来源:main.php

示例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);
 }
开发者ID:netconstructor,项目名称:advanced-custom-fields,代码行数:8,代码来源:image.php

示例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'));
 }
开发者ID:esecamalich,项目名称:Lettres-Studio,代码行数:9,代码来源:file.php

示例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');
 }
开发者ID:david-treblig,项目名称:acf-post-type-selector,代码行数:9,代码来源:post-type-selector-v3.php

示例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');
 }
开发者ID:RCMmedia,项目名称:rubicon,代码行数:9,代码来源:gravity_forms-v3.php

示例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();
 }
开发者ID:fullthoughtcc,项目名称:wp-presenter,代码行数:9,代码来源:website_url_v4.php

示例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'));
 }
开发者ID:xuandungpy,项目名称:vuong,代码行数:9,代码来源:image.php

示例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'));
 }
开发者ID:rigelstpierre,项目名称:Everlovin-Press,代码行数:9,代码来源:file.php

示例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'));
 }
开发者ID:masayukiando,项目名称:wordpress-event-search,代码行数:10,代码来源:file.php


注:本文中的acf_Field::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。