當前位置: 首頁>>代碼示例>>PHP>>正文


PHP FrmAppHelper::get_menu_name方法代碼示例

本文整理匯總了PHP中FrmAppHelper::get_menu_name方法的典型用法代碼示例。如果您正苦於以下問題:PHP FrmAppHelper::get_menu_name方法的具體用法?PHP FrmAppHelper::get_menu_name怎麽用?PHP FrmAppHelper::get_menu_name使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在FrmAppHelper的用法示例。


在下文中一共展示了FrmAppHelper::get_menu_name方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: menu

 public static function menu()
 {
     FrmAppHelper::maybe_add_permissions();
     if (!current_user_can('frm_view_forms')) {
         return;
     }
     $menu_name = FrmAppHelper::get_menu_name();
     add_menu_page('Formidable', $menu_name, 'frm_view_forms', 'formidable', 'FrmFormsController::route', '', self::get_menu_position());
 }
開發者ID:uwmadisoncals,項目名稱:Cluster-Plugins,代碼行數:9,代碼來源:FrmAppController.php

示例2: insert_form_button

    /**
     * Inserts Formidable button
     * Hook exists since 2.5.0
     *
     * @since 2.0.15
     */
    public static function insert_form_button()
    {
        if (current_user_can('frm_view_forms')) {
            $menu_name = FrmAppHelper::get_menu_name();
            $content = '<a href="#TB_inline?width=50&height=50&inlineId=frm_insert_form" class="thickbox button add_media frm_insert_form" title="' . esc_attr__('Add forms and content', 'formidable') . '">
				<span class="frm-buttons-icon wp-media-buttons-icon"></span> ' . $menu_name . '</a>';
            echo wp_kses_post($content);
        }
    }
開發者ID:hugocica,項目名稱:locomotiva-2016,代碼行數:15,代碼來源:FrmFormsController.php

示例3: update_hidden_cols

 public static function update_hidden_cols($meta_id, $object_id, $meta_key, $meta_value)
 {
     $menu_name = FrmAppHelper::get_menu_name();
     $sanitized = sanitize_title($menu_name);
     $this_page_name = 'manage' . $sanitized . '_page_formidable-entriescolumnshidden';
     if ($meta_key != $this_page_name) {
         return;
     }
     global $frm_vars;
     if (!isset($frm_vars['prev_hidden_cols']) || !$frm_vars['prev_hidden_cols']) {
         return;
         //don't continue if there's no previous value
     }
     foreach ($meta_value as $mk => $mv) {
         //remove blank values
         if (empty($mv)) {
             unset($meta_value[$mk]);
         }
     }
     $cur_form_prefix = reset($meta_value);
     $cur_form_prefix = explode('_', $cur_form_prefix);
     $cur_form_prefix = $cur_form_prefix[0];
     $save = false;
     foreach ((array) $frm_vars['prev_hidden_cols'] as $prev_hidden) {
         if (empty($prev_hidden) || in_array($prev_hidden, $meta_value)) {
             //don't add blank cols or process included cols
             continue;
         }
         $form_prefix = explode('_', $prev_hidden);
         $form_prefix = $form_prefix[0];
         if ($form_prefix == $cur_form_prefix) {
             //don't add back columns that are meant to be hidden
             continue;
         }
         $meta_value[] = $prev_hidden;
         $save = true;
         unset($form_prefix);
     }
     if ($save) {
         $user = wp_get_current_user();
         update_user_option($user->ID, $this_page_name, $meta_value, true);
     }
 }
開發者ID:uwmadisoncals,項目名稱:Cluster-Plugins,代碼行數:43,代碼來源:FrmEntriesController.php


注:本文中的FrmAppHelper::get_menu_name方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。