<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                ``` add_action( 'show_user_profile', 'restrict_user_form' ); add_action( 'edit_user_profile', 'restrict_user_form' ); function restrict_user_form( $user ) { if ( ! current_user_can('add_users')) return false; $args = array( 'show_option_all' => '', 'show_option_none' => '未選擇', 'orderby' => 'ID', 'order' => 'ASC', 'show_count' => 0, 'hide_empty' => 0, 'child_of' => 0, 'exclude' => '', 'echo' => 1, 'selected' => get_user_meta( $user->ID, '_access', true), 'hierarchical' => 0, 'name' => 'allow', 'id' => '', 'class' => 'postform', 'depth' => 0, 'tab_index' => 0, 'taxonomy' => 'category', 'hide_if_empty' => false, 'walker' => '' );?> <h3>限制該用戶只能投稿到分類</h3> <table class="form-table"> <tr> <th><label for="access">選擇分類:</label></th> <td> <?php wp_dropdown_categories($args);?> <br /> <span class="description">用于限制投稿者的分類目錄</span> </td> </tr> </table> <?php } add_action( 'personal_options_update', 'restrict_save_data' ); add_action( 'edit_user_profile_update', 'restrict_save_data' ); function restrict_save_data( $user_id ) { if ( ! current_user_can( 'add_users' ) ) return false; update_user_meta( $user_id, '_access', $_POST['allow'] ); } // check if the user loggin in is author and be restricted function is_restrict() { if ( get_user_meta(get_current_user_id(), '_access', true) > 0 ) return true; else return false; } add_action( 'save_post', 'save_restrict_post' ); function save_restrict_post( $post_id ) { if ( ! wp_is_post_revision( $post_id ) && is_restrict() ) { remove_action('save_post', 'save_restrict_post'); wp_set_post_categories( $post_id, get_user_meta( get_current_user_id() , '_access', true) ); add_action('save_post', 'save_restrict_post'); } } add_action( 'edit_form_after_title', 'restrict_warning' ); function restrict_warning( $post_data = false ) { if (is_restrict()) { $c = get_user_meta( get_current_user_id() , '_access', true); $data = get_category($c); echo 'You are allowing to post to category: <strong>'. $data->name .'</strong><br /><br />'; } } function restrict_remove_meta_boxes() { if (is_restrict() ) remove_meta_box('categorydiv', 'post', 'normal'); } add_action( 'admin_menu', 'restrict_remove_meta_boxes' ); ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看