やろうとしていること
添付写真左にあるメニューをいくつか増やしたいです。
これらはphpによって自動生成されており、コードをどのように変更すればいいのかわからずつまづいております。
わかる方いましたら教えていただきたいです・・・
該当(?)コード
account.php
1<ul> 2 <?php foreach ( UM()->account()->tabs as $id => $info ) { 3 if ( isset( $info['custom'] ) || UM()->options()->get( "account_tab_{$id}" ) == 1 || $id == 'general' ) { ?> 4 5 /**タブメニューの自動生成**/ 6 <li> 7 <a data-tab="<?php echo esc_attr( $id )?>" href="<?php echo esc_url( UM()->account()->tab_link( $id ) ); ?>" class="um-account-link <?php if ( $id == UM()->account()->current_tab ) echo 'current'; ?>"> 8 <?php if ( UM()->mobile()->isMobile() ) { ?> 9 <span class="um-account-icontip uimob800-show" title="<?php echo esc_attr( $info['title'] ); ?>"> 10 <i class="<?php echo esc_attr( $info['icon'] ); ?>"></i> 11 </span> 12 <?php } else { ?> 13 <span class="um-account-icontip uimob800-show um-tip-<?php echo is_rtl() ? 'e' : 'w'; ?>" title="<?php echo esc_attr( $info['title'] ); ?>"> 14 <i class="<?php echo esc_attr( $info['icon'] ); ?>"></i> 15 </span> 16 <?php } ?> 17 18 <span class="um-account-icon uimob800-hide"> 19 <i class="<?php echo esc_attr( $info['icon'] ); ?>"></i> 20 </span> 21 <span class="um-account-title uimob800-hide"><?php echo esc_html( $info['title'] ); ?></span> 22 <span class="um-account-arrow uimob800-hide"> 23 <i class="<?php if ( is_rtl() ) { ?>um-faicon-angle-left<?php } else { ?>um-faicon-angle-right<?php } ?>"></i> 24 </span> 25 </a> 26 </li> 27 /**タブメニューの自動生成**/ 28 <?php } 29 } ?> 30</ul>
class
1/** 2 * Get all Account tabs 3 * 4 * @return array 5 */ 6 function get_tabs() { 7 $tabs = array(); 8 $tabs[100]['general'] = array( 9 'icon' => 'um-faicon-user', 10 'title' => __( 'Account', 'ultimate-member' ), 11 'submit_title' => __( 'Update Account', 'ultimate-member' ), 12 ); 13 14 $tabs[200]['password'] = array( 15 'icon' => 'um-faicon-asterisk', 16 'title' => __( 'Change Password', 'ultimate-member' ), 17 'submit_title' => __( 'Update Password', 'ultimate-member' ), 18 ); 19 20 $tabs[300]['privacy'] = array( 21 'icon' => 'um-faicon-lock', 22 'title' => __( 'Privacy', 'ultimate-member' ), 23 'submit_title' => __( 'Update Privacy', 'ultimate-member' ), 24 ); 25 26 $tabs[400]['notifications'] = array( 27 'icon' => 'um-faicon-envelope', 28 'title' => __( 'Notifications', 'ultimate-member' ), 29 'submit_title' => __( 'Update Notifications', 'ultimate-member' ), 30 ); 31 32 //if user cannot delete profile hide delete tab 33 if ( um_user( 'can_delete_profile' ) || um_user( 'can_delete_everyone' ) ) { 34 35 $tabs[99999]['delete'] = array( 36 'icon' => 'um-faicon-trash-o', 37 'title' => __( 'Delete Account', 'ultimate-member' ), 38 'submit_title' => __( 'Delete Account', 'ultimate-member' ), 39 ); 40 41 } 42
あなたの回答
tips
プレビュー