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


PHP ICL_AdminNotifier::display_instant_message方法代码示例

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


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

示例1: build_content_dashboard_documents_options


//.........这里部分代码省略.........
                            <?php 
            if ($lang['code'] == $this->translation_filter['from_lang']) {
                continue;
            }
            $radio_prefix_html = '<input type="radio" name="tr_action[' . $lang['code'] . ']" ';
            ?>
                            <tr>
                                <td><strong><?php 
            echo $lang['display_name'];
            ?>
</strong></td>
                                <td>
                                    <label>
                                        <?php 
            echo $radio_prefix_html;
            ?>
 value="1" <?php 
            echo $translate_checked;
            ?>
/>
                                        <?php 
            _e('Translate', 'wpml-translation-management');
            ?>
                                    </label>
                                </td>
                                <td>
                                    <label>
                                        <?php 
            echo $radio_prefix_html;
            ?>
 value="2" <?php 
            echo $duplicate_checked;
            ?>
/>
                                        <?php 
            _e('Duplicate content', 'wpml-translation-management');
            ?>
                                    </label>
                                </td>
                                <td>
                                    <label>
                                        <?php 
            echo $radio_prefix_html;
            ?>
 value="0" <?php 
            echo $do_nothing_checked;
            ?>
/>
                                        <?php 
            _e('Do nothing', 'wpml-translation-management');
            ?>
                                    </label>
                                </td>
                            </tr>
                        <?php 
        }
        ?>
                        </tbody>
                    </table>
                    <br/>

                    <input name="iclnonce" type="hidden" value="<?php 
        echo wp_create_nonce('pro-translation-icl');
        ?>
"/>
                    <?php 
        $tm_jobs_submit_disabled = disabled(empty($this->selected_languages) && empty($this->selected_posts), true, false);
        $tm_jobs_submit_caption = __('Add to translation basket', 'wpml-translation-management');
        ?>
                    <input id="icl_tm_jobs_submit" class="button-primary" type="submit" value="<?php 
        echo $tm_jobs_submit_caption;
        ?>
" <?php 
        echo $tm_jobs_submit_disabled;
        ?>
 />

                    <div id="icl_dup_ovr_warn" class="icl_dup_ovr_warn" style="display:none;">
                        <?php 
        $dup_message = '<p>';
        $dup_message .= __('Any existing content (translations) will be overwritten when creating duplicates.', 'wpml-translation-management');
        $dup_message .= '</p>';
        $dup_message .= '<p>';
        $dup_message .= __("When duplicating content, please first duplicate parent pages to maintain the site's hierarchy.", 'wpml-translation-management');
        $dup_message .= '</p>';
        ICL_AdminNotifier::display_instant_message($dup_message, 'error');
        ?>
                    </div>
                    <div style="width: 45%; margin: auto; position: relative; top: -30px;">
                        <?php 
        ICL_AdminNotifier::display_messages('translation-dashboard-under-translation-options');
        ICL_AdminNotifier::remove_message('items_added_to_basket');
        ?>
                    </div>
                </td>
            </tr>
            </tbody>
        </table>
    <?php 
    }
开发者ID:tlandn,项目名称:akvo-sites-zz-template,代码行数:101,代码来源:wpml-tm-menus.class.php

示例2: build_header_content

 public function build_header_content()
 {
     if (!$this->active_service) {
         $no_service_selected_information = '<p>';
         $no_service_selected_information .= '<strong>';
         $no_service_selected_information .= __('No Translation Service selected: you can only use local translators.', 'wpml-translation-management');
         $no_service_selected_information .= '</strong>';
         $no_service_selected_information .= '</p>';
         $no_service_selected_information .= '<p>';
         $no_service_selected_information .= __('If you wish to use a translation service for your content, please select one from the available services.', 'wpml-translation-management');
         $no_service_selected_information .= '</p>';
         ICL_AdminNotifier::display_instant_message($no_service_selected_information, 'information');
     }
 }
开发者ID:ryuqing,项目名称:cake,代码行数:14,代码来源:wpml-translator-settings.class.php

示例3: translation_service_authentication

 function translation_service_authentication()
 {
     $active_service = TranslationProxy::get_current_service();
     $custom_fields = TranslationProxy::get_custom_fields($active_service->id);
     $auth_content[] = '<div class="js-service-authentication">';
     $auth_content[] = '<ul>';
     if (TranslationProxy::service_requires_authentication($active_service)) {
         $auth_content[] = '<input type="hidden" name="service_id" id="service_id" value="' . $active_service->id . '" />';
         $custom_fields_data = TranslationProxy::get_custom_fields_data();
         if (!$custom_fields_data) {
             $auth_content[] = '<li>';
             $auth_content[] = '<p>';
             $auth_content[] = sprintf(__('%s is active, but requires authentication data.', 'wpml-translation-management'), $active_service->name);
             $auth_content[] = '</p>';
             $auth_content[] = '</li>';
             $auth_content[] = '<li>';
             $auth_content[] = '<strong>';
             $auth_content[] = '<a href="#" class="js-authenticate-service" data-id="' . $active_service->id . '" data-custom-fields="' . esc_attr(wp_json_encode($custom_fields)) . '">';
             $auth_content[] = __('Click here to authenticate.', 'wpml-translation-management');
             $auth_content[] = '</a>';
             $auth_content[] = '</strong>';
             $auth_content[] = wp_nonce_field('authenticate_service', 'authenticate_service_nonce', true, false);
             $auth_content[] = '<input type="hidden" name="custom_fields_serialized" id="custom_fields_serialized" value="" />';
             $auth_content[] = '</li>';
         } else {
             $auth_content[] = '<li>';
             $auth_content[] = '<p>';
             $auth_content[] = sprintf(__('%s is authorized.', 'wpml-translation-management'), $active_service->name) . '&nbsp;';
             $auth_content[] = '</p>';
             $auth_content[] = '</li>';
             $auth_content[] = '<li>';
             $auth_content[] = '<strong>';
             $auth_content[] = '<a href="#" class="js-invalidate-service" data-id="' . $active_service->id . '" data-custom-fields="' . esc_attr(wp_json_encode($custom_fields)) . '">';
             $auth_content[] = __('Click here to de-authorize.', 'wpml-translation-management');
             $auth_content[] = '</a>';
             $auth_content[] = '</strong>';
             $auth_content[] = wp_nonce_field('invalidate_service', 'invalidate_service_nonce', true, false);
             $auth_content[] = '</li>';
         }
     }
     if (!defined('WPML_TP_DEFAULT_SUID')) {
         $auth_content[] = '<li>';
         $auth_content[] = '<strong>';
         $auth_content[] = '<a href="#" class="js-deactivate-service" data-id="' . $active_service->id . '" data-custom-fields="' . esc_attr(wp_json_encode($custom_fields)) . '">';
         $auth_content[] = __('Click here to deactivate.', 'wpml-translation-management');
         $auth_content[] = '</a>';
         $auth_content[] = '</strong>';
         $auth_content[] = '</li>';
     }
     $auth_content[] = '</ul>';
     $auth_content[] = '</div>';
     $auth_content_full = implode("\n", $auth_content);
     ICL_AdminNotifier::display_instant_message($auth_content_full);
 }
开发者ID:ryuqing,项目名称:cake,代码行数:54,代码来源:wpml-translation-management.class.php

示例4: display_source_lang_locked_message

 private function display_source_lang_locked_message()
 {
     if ($this->source_language_code && isset($this->active_languages[$this->source_language_code])) {
         $language_name = $this->active_languages[$this->source_language_code]['display_name'];
         $basket_locked_string = '<p>';
         $basket_locked_string .= sprintf(__('Language filtering has been disabled because you already have items in %s in the basket.', 'wpml-translation-management'), $language_name);
         $basket_locked_string .= '<br/>';
         $basket_locked_string .= __('To re-enable it, please empty the basket or send it for translation.', 'wpml-translation-management');
         $basket_locked_string .= '</p>';
         ICL_AdminNotifier::display_instant_message($basket_locked_string, 'information-inline');
     }
 }
开发者ID:aarongillett,项目名称:B22-151217,代码行数:12,代码来源:wpml-tm-dashboard-display-filter.class.php

示例5: translation_service_authentication

 function translation_service_authentication()
 {
     $active_service = TranslationProxy::get_current_service();
     $custom_fields = TranslationProxy::get_custom_fields($active_service->id);
     $auth_content[] = '<div class="js-service-authentication">';
     $auth_content[] = '<ul>';
     if (TranslationProxy::service_requires_authentication($active_service)) {
         $auth_content[] = '<input type="hidden" name="service_id" id="service_id" value="' . $active_service->id . '" />';
         $custom_fields_data = TranslationProxy::get_custom_fields_data();
         if (!$custom_fields_data) {
             $authorization_message = sprintf(__('To send content to translation by %1$s, you need to have an account in %1$s and enter here your authentication details.', 'wpml-translation-management'), $active_service->name);
             $js_action = 'js-authenticate-service';
             $authorization_button = __('Authenticate', 'wpml-translation-management');
             $authorization_button_class = 'button-primary';
             $nonce_field = wp_nonce_field('authenticate_service', 'authenticate_service_nonce', true, false);
         } else {
             $authorization_message = sprintf(__('%s is authorized.', 'wpml-translation-management'), $active_service->name) . '&nbsp;';
             $js_action = 'js-invalidate-service';
             $authorization_button = __('De-authorize', 'wpml-translation-management');
             $authorization_button_class = 'button-secondary';
             $nonce_field = wp_nonce_field('invalidate_service', 'invalidate_service_nonce', true, false);
         }
         $auth_content[] = '<li>';
         $auth_content[] = '<p>';
         $auth_content[] = $authorization_message;
         $auth_content[] = '</p>';
         $auth_content[] = '</li>';
         $auth_content[] = '<li>';
         $auth_content[] = '<a href="#" class="' . $js_action . ' ' . $authorization_button_class . '" data-id="' . $active_service->id . '" data-custom-fields="' . esc_attr(wp_json_encode($custom_fields)) . '">';
         $auth_content[] = $authorization_button;
         $auth_content[] = '</a>';
         $auth_content[] = $nonce_field;
         $auth_content[] = '<input type="hidden" name="custom_fields_serialized" id="custom_fields_serialized" value="" />';
     }
     if (!TranslationProxy::get_tp_default_suid()) {
         $auth_content[] = '<a href="#" class="js-deactivate-service button-secondary" data-id="' . $active_service->id . '" data-custom-fields="' . esc_attr(wp_json_encode($custom_fields)) . '">';
         $auth_content[] = __('Deactivate', 'wpml-translation-management');
         $auth_content[] = '</a>';
     }
     if (isset($active_service->doc_url) && $active_service->doc_url) {
         $auth_content[] = '<a href="' . $active_service->doc_url . '" target="_blank">' . __('Documentation', 'wpml-translation-management') . '</a>';
     }
     $auth_content[] = '</li>';
     $auth_content[] = '</ul>';
     $auth_content[] = '</div>';
     $auth_content_full = implode("\n", $auth_content);
     ICL_AdminNotifier::display_instant_message($auth_content_full);
 }
开发者ID:studiopengpeng,项目名称:ASCOMETAL,代码行数:48,代码来源:class-wpml-translation-management.php

示例6: display_instant_message

 public function display_instant_message($message, $type = 'information', $class = false, $return = false, $fadeout = false)
 {
     return ICL_AdminNotifier::display_instant_message($message, $type, $class, $return, $fadeout);
 }
开发者ID:SayenkoDesign,项目名称:ividf,代码行数:4,代码来源:class-wpml-admin-notifier.php

示例7: icl_local_edit_translator_form

    /**
     * Add/edit local translator form
     *
     * @param string $action add|edit
     * @param int|object $selected_translator
     *
     * @return mixed
     */
    private function icl_local_edit_translator_form($action = 'add', $selected_translator = 0)
    {
        $blog_users_nt = TranslationManagement::get_blog_not_translators();
        $output = '';
        $return['name'] = __('Local', 'wpml-translation-management');
        $return['description'] = __('Your own translators', 'wpml-translation-management');
        if ($action === 'add' && empty($blog_users_nt)) {
            $alert_message = '<p>';
            $alert_message .= __('All WordPress users are already translators. To add more translators, first create accounts for them.', 'wpml-translation-management');
            $alert_message .= '</p>';
            $return['content'] = '';
            $return['messages'] = ICL_AdminNotifier::display_instant_message($alert_message, 'information', false, true);
            return $return;
        }
        $output .= '<div id="icl_tm_add_user_errors">
        <span class="icl_tm_no_to">' . __('Select user.', 'wpml-translation-management') . '</span>
    </div>
    <input type="hidden" name="icl_tm_action" value="' . $action . '_translator" />' . wp_nonce_field($action . '_translator', $action . '_translator_nonce', true, false);
        if (!$selected_translator) {
            $output .= '<input type="hidden" id="icl_tm_selected_user" name="user_id" />';
            $output .= '<input type="text" id="icl_quick_src_users" placeholder="' . esc_attr__('search', 'wpml-translation-management') . '" />';
            $output .= '&nbsp;<span id="icl_user_src_nf"></span>';
            $output .= '<img style="display:none;margin-left:3px;" src="' . esc_url(admin_url('images/wpspin_light.gif')) . '" class="waiting" alt="" />';
            $output .= '<p>' . __('To add translators, they must first have accounts in WordPress. Translators can have any editing privileges, including subscriber.') . '</p>';
        } else {
            $output .= '<span class="updated fade" style="padding:4px">' . sprintf(__('Editing language pairs for <strong>%s</strong>', 'wpml-translation-management'), esc_html($selected_translator->display_name) . ' (' . $selected_translator->user_login . ')') . '</span>';
            $output .= '<input type="hidden" name="user_id" value="' . $selected_translator->ID . '" />';
        }
        if ($selected_translator) {
            $output .= '<br />

      <div class="icl_tm_lang_pairs"';
            if ($selected_translator) {
                $output .= ' style="display:block"';
            }
            $output .= '>
          <ul>';
            $languages = $this->get_translation_languages();
            foreach ($languages as $from_lang) {
                $lang_from_selected = false;
                if ($selected_translator && 0 < @count($selected_translator->language_pairs[$from_lang['code']])) {
                    $lang_from_selected = true;
                }
                $output .= '<li class="js-icl-tm-lang-from';
                if ($lang_from_selected) {
                    $output .= ' js-lang-from-selected';
                }
                $output .= '">';
                $output .= '<label><input class="icl_tm_from_lang" type="checkbox"';
                if ($lang_from_selected) {
                    $output .= ' checked="checked"';
                }
                $output .= ' />&nbsp;';
                $output .= sprintf(__('From %s', 'wpml-translation-management'), $from_lang['display_name']) . '</label>
              <div class="icl_tm_lang_pairs_to"';
                if ($selected_translator && 0 < @count($selected_translator->language_pairs[$from_lang['code']])) {
                    $output .= ' style="display:block"';
                }
                $output .= '>
                  <small>' . __('to', 'wpml-translation-management') . '</small>
                  <ul>';
                foreach ($languages as $to_lang) {
                    if ($from_lang['code'] === $to_lang['code']) {
                        continue;
                    }
                    $lang_selected = false;
                    if ($selected_translator->ID && isset($selected_translator->language_pairs[$from_lang['code']][$to_lang['code']])) {
                        $lang_selected = true;
                    }
                    $output .= '<li class="js-icl-tm-lang-pair';
                    if ($lang_selected) {
                        $output .= ' js-lang-pair-selected';
                    }
                    $output .= '">
                      <label><input class="icl_tm_to_lang" type="checkbox" name="lang_pairs[' . $from_lang['code'] . '][' . $to_lang['code'] . ']" value="1"';
                    if ($lang_selected) {
                        $output .= ' checked="checked"';
                    }
                    $output .= ' />&nbsp;';
                    $output .= $to_lang['display_name'] . '</label>&nbsp;
                      </li>';
                }
                $output .= '</ul>
              </div>
              </li>';
            }
            $output .= '</ul>';
            $output .= '</div><input class="button-primary" type="submit" value="';
            $output .= $selected_translator ? esc_attr(__('Update', 'wpml-translation-management')) : esc_attr(__('Add as translator', 'wpml-translation-management'));
            $output .= '" />&nbsp;<input type="submit" value="' . __('Cancel', 'wpml-translation-management') . '" name="cancel" class="button-secondary" onclick="history.go(-1); return false;" />';
        }
        $return['content'] = $output;
//.........这里部分代码省略.........
开发者ID:Junaid-Farid,项目名称:gocnex,代码行数:101,代码来源:wpml-translator-settings.class.php


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