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


PHP FLBuilder::render_settings_field方法代码示例

本文整理汇总了PHP中FLBuilder::render_settings_field方法的典型用法代码示例。如果您正苦于以下问题:PHP FLBuilder::render_settings_field方法的具体用法?PHP FLBuilder::render_settings_field怎么用?PHP FLBuilder::render_settings_field使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FLBuilder的用法示例。


在下文中一共展示了FLBuilder::render_settings_field方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: render_list_field

 /**
  * Render markup for the list field. 
  *
  * @since 1.5.4
  * @param array $lists List data from the API.
  * @param object $settings Saved module settings.
  * @return string The markup for the list field.
  * @access private
  */
 private function render_list_field($lists, $settings)
 {
     ob_start();
     $options = array('' => __('Choose...', 'fl-builder'));
     foreach ($lists as $list) {
         $options[$list['list_id']] = $list['name'];
     }
     FLBuilder::render_settings_field('list_id', array('row_class' => 'fl-builder-service-field-row', 'class' => 'fl-builder-service-list-select', 'type' => 'select', 'label' => _x('List', 'An email list from a third party provider.', 'fl-builder'), 'options' => $options, 'preview' => array('type' => 'none')), $settings);
     return ob_get_clean();
 }
开发者ID:nullality,项目名称:FEWD-SEA-7,代码行数:19,代码来源:class-fl-builder-service-mailpoet.php

示例2: foreach

foreach (FLBuilderLoop::post_types() as $slug => $type) {
    ?>
		<table class="fl-form-table fl-loop-builder-filter fl-loop-builder-<?php 
    echo $slug;
    ?>
-filter" <?php 
    if ($slug == $settings->post_type) {
        echo 'style="display:table;"';
    }
    ?>
>
		<?php 
    // Posts
    FLBuilder::render_settings_field('posts_' . $slug, array('type' => 'suggest', 'action' => 'fl_as_posts', 'data' => $slug, 'label' => $type->label, 'help' => sprintf(__('Enter a comma separated list of %s. Only these %s will be shown.', 'fl-builder'), $type->label, $type->label)), $settings);
    // Taxonomies
    $taxonomies = FLBuilderLoop::taxonomies($slug);
    foreach ($taxonomies as $tax_slug => $tax) {
        FLBuilder::render_settings_field('tax_' . $slug . '_' . $tax_slug, array('type' => 'suggest', 'action' => 'fl_as_terms', 'data' => $tax_slug, 'label' => $tax->label, 'help' => sprintf(__('Enter a comma separated list of %s. Only posts with these %s will be shown.', 'fl-builder'), $tax->label, $tax->label)), $settings);
    }
    ?>
		</table>
	<?php 
}
?>
	<table class="fl-form-table">
	<?php 
// Author
FLBuilder::render_settings_field('users', array('type' => 'suggest', 'action' => 'fl_as_users', 'label' => __('Authors', 'fl-builder'), 'help' => __('Enter a comma separated list of authors usernames. Only posts with these authors will be shown.', 'fl-builder')), $settings);
?>
	</table>
</div>
开发者ID:nullality,项目名称:FEWD-SEA-7,代码行数:31,代码来源:loop-settings.php

示例3: render_account_settings

 /**
  * Render the account settings for a saved connection.
  *
  * @since 1.5.4
  * @param string $service The service id such as "mailchimp".
  * @param string $active The name of the active account, if any.
  * @return string The account settings markup.
  */
 public static function render_account_settings($service, $active = '')
 {
     ob_start();
     $saved_services = FLBuilderModel::get_services();
     $settings = new stdClass();
     $settings->service_account = $active;
     $options = array('' => __('Choose...', 'fl-builder'));
     // Build the account select options.
     foreach ($saved_services[$service] as $account => $data) {
         $options[$account] = $account;
     }
     $options['add_new_account'] = __('Add Account...', 'fl-builder');
     // Render the account select.
     FLBuilder::render_settings_field('service_account', array('row_class' => 'fl-builder-service-account-row', 'class' => 'fl-builder-service-account-select', 'type' => 'select', 'label' => __('Account', 'fl-builder'), 'options' => $options, 'preview' => array('type' => 'none')), $settings);
     // Render additional service fields if we have a saved account.
     if (!empty($active) && isset($saved_services[$service][$active])) {
         $post_data = FLBuilderModel::get_post_data();
         $module = FLBuilderModel::get_module($post_data['node_id']);
         $instance = self::get_service_instance($service);
         $response = $instance->render_fields($active, $module->settings);
         if (!$response['error']) {
             echo $response['html'];
         }
     }
     return ob_get_clean();
 }
开发者ID:meftasadat,项目名称:DSL_SITE,代码行数:34,代码来源:class-fl-builder-services.php

示例4: render_groups_field

 /**
  * Render markup for the groups field. 
  *
  * @since 1.6.0
  * @param string $list_id The ID of the list for this groups.
  * @param array $groups An array of group data.
  * @param object $settings Saved module settings.
  * @return string The markup for the group field.
  * @access private
  */
 private function render_groups_field($list_id, $groups, $settings)
 {
     if (!is_array($groups) || 0 === count($groups)) {
         return;
     }
     ob_start();
     $options = array('' => __('No Group', 'fl-builder'));
     foreach ($groups as $group) {
         foreach ($group['groups'] as $subgroup) {
             $options[$list_id . '_' . $group['id'] . '_' . $subgroup['id']] = $group['name'] . ' - ' . $subgroup['name'];
         }
     }
     FLBuilder::render_settings_field('groups', array('row_class' => 'fl-builder-service-field-row', 'class' => 'fl-builder-mailchimp-group-select', 'type' => 'select', 'label' => _x('Groups', 'MailChimp list group.', 'fl-builder'), 'multi-select' => true, 'options' => $options, 'preview' => array('type' => 'none')), $settings);
     return ob_get_clean();
 }
开发者ID:nullality,项目名称:FEWD-SEA-7,代码行数:25,代码来源:class-fl-builder-service-mailchimp.php

示例5: render_tag_field

 /**
  * Render markup for the tag field. 
  *
  * @since 1.5.8
  * @param object $settings Saved module settings.
  * @return string The markup for the tag field.
  * @access private
  */
 private function render_tag_field($settings)
 {
     ob_start();
     FLBuilder::render_settings_field('list_id', array('row_class' => 'fl-builder-service-field-row', 'class' => 'fl-builder-service-list-select', 'type' => 'text', 'label' => _x('Tag', 'A tag to add to contacts in Hatchbuck when they subscribe.', 'fl-builder'), 'preview' => array('type' => 'none')), $settings);
     return ob_get_clean();
 }
开发者ID:nullality,项目名称:FEWD-SEA-7,代码行数:14,代码来源:class-fl-builder-service-hatchbuck.php

示例6: render_tag_field

 /**
  * Render markup for the tag field. 
  *
  * @since 1.5.4
  * @param object $settings Saved module settings.
  * @return string The markup for the tag field.
  * @access private
  */
 private function render_tag_field($settings)
 {
     ob_start();
     FLBuilder::render_settings_field('list_id', array('row_class' => 'fl-builder-service-field-row', 'class' => 'fl-builder-service-list-select', 'type' => 'text', 'label' => _x('Tags', 'A tag to add to contacts in Drip when they subscribe.', 'fl-builder'), 'help' => __('For multiple tags, separate with comma.', 'fl-builder'), 'preview' => array('type' => 'none')), $settings);
     return ob_get_clean();
 }
开发者ID:nullality,项目名称:FEWD-SEA-7,代码行数:14,代码来源:class-fl-builder-service-drip.php

示例7: unset

<div class="fl-builder-service-settings">
	<table class="fl-form-table">
		<?php 
// Get the service type.
$service_type = null;
if (isset($section['services']) && $section['services'] != 'all') {
    $service_type = $section['services'];
}
// Get the service data.
$services = FLBuilderServices::get_services_data($service_type);
// Remove services that don't meet the requirements.
if (isset($services['mailpoet']) && !class_exists('WYSIJA')) {
    unset($services['mailpoet']);
}
// Build the select options.
$options = array('' => __('Choose...', 'fl-builder'));
foreach ($services as $key => $service) {
    $options[$key] = $service['name'];
}
// Render the service select.
FLBuilder::render_settings_field('service', array('row_class' => 'fl-builder-service-select-row', 'class' => 'fl-builder-service-select', 'type' => 'select', 'label' => __('Service', 'fl-builder'), 'options' => $options, 'preview' => array('type' => 'none')), $settings);
?>
	</table>
</div>
开发者ID:nullality,项目名称:FEWD-SEA-7,代码行数:24,代码来源:service-settings.php

示例8: render_list_field

 /**
  * Render markup for the list field. 
  *
  * @since 1.5.4
  * @param array $account_data Saved account data.
  * @param object $settings Saved module settings.
  * @return string The markup for the list field.
  * @access private
  */
 private function render_list_field($account_data, $settings)
 {
     $post_data = FLBuilderModel::get_post_data();
     // Get the client ID. Return an empty string if we don't have one yet.
     if (isset($post_data['client'])) {
         $client_id = $post_data['client'];
     } else {
         if (isset($settings->client_id)) {
             $client_id = $settings->client_id;
         } else {
             return '';
         }
     }
     // Get the list data.
     $api = new CS_REST_Clients($client_id, $account_data);
     $lists = $api->get_lists();
     // Render the list field.
     ob_start();
     $options = array('' => __('Choose...', 'fl-builder'));
     foreach ($lists->response as $list) {
         $options[$list->ListID] = $list->Name;
     }
     FLBuilder::render_settings_field('list_id', array('row_class' => 'fl-builder-service-field-row', 'class' => 'fl-builder-service-list-select', 'type' => 'select', 'label' => _x('List', 'An email list from a third party provider.', 'fl-builder'), 'options' => $options, 'preview' => array('type' => 'none')), $settings);
     return ob_get_clean();
 }
开发者ID:nullality,项目名称:FEWD-SEA-7,代码行数:34,代码来源:class-fl-builder-service-campaign-monitor.php

示例9: foreach

                    // Section Title
                    ?>
                            
							<h3 class="fl-builder-settings-title"><?php 
                    echo $section['title'];
                    ?>
</h3>
							<?php 
                }
                ?>
							
							<table class="fl-form-table">
								<?php 
                foreach ($section['fields'] as $name => $field) {
                    // Fields
                    FLBuilder::render_settings_field($name, $field, $settings);
                }
                ?>
							</table>
					
						<?php 
            }
            ?>
					
					</div>
					<?php 
        }
        ?>
					
				<?php 
    }
开发者ID:karthikakamalanathan,项目名称:wp-cookieLawInfo,代码行数:31,代码来源:settings.php

示例10: render_list_field

 /**
  * Render markup for the list field. 
  *
  * @since 1.5.4
  * @param array $lists List data from the API.
  * @param object $settings Saved module settings.
  * @return string The markup for the list field.
  * @access private
  */
 private function render_list_field($groups, $settings)
 {
     ob_start();
     $options = array('' => __('Choose...', 'fl-builder'));
     foreach ($groups as $group) {
         $options[$group['id']] = $group['name'];
     }
     FLBuilder::render_settings_field('list_id', array('row_class' => 'fl-builder-service-field-row', 'class' => 'fl-builder-service-list-select', 'type' => 'select', 'multi-select' => true, 'label' => _x('Group', 'A list of subscribers group from a Mailrelay account.', 'fl-builder'), 'options' => $options, 'preview' => array('type' => 'none')), $settings);
     return ob_get_clean();
 }
开发者ID:nullality,项目名称:FEWD-SEA-7,代码行数:19,代码来源:class-fl-builder-service-mailrelay.php

示例11: render_connect_settings

 /**
  * Renders the markup for the connection settings.
  *
  * @since 1.6.0
  * @return string The connection settings markup.
  */
 public function render_connect_settings()
 {
     ob_start();
     FLBuilder::render_settings_field('email', array('row_class' => 'fl-builder-service-connect-row', 'class' => 'fl-builder-service-connect-input', 'type' => 'text', 'label' => __('Email Address', 'fl-builder'), 'preview' => array('type' => 'none')));
     return ob_get_clean();
 }
开发者ID:nullality,项目名称:FEWD-SEA-7,代码行数:12,代码来源:class-fl-builder-service-email-address.php


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