プロフィールの年月日について
-
Buddypress2.0.1のプロフィール項目で誕生日のプルダウン項目が日・月・年と成っているのを
日本人に分かりやすいように年・月・日としたいのですが、グーグルで検索を掛けても旧Verし
かヒットせず困っています。BPのサポートフォーラムで下記のアドバイスを頂きましたが私の理解力が足らず意味が理解で
きません。If you’re talking about the extended xprofile datebox field, the builder class BP_XProfile_Field_Type_Datebox of the xprofile datebox field is in bp-xprofiles-class.php:1459(bp 2.0.1)
You can overwite this class with your own for reflecting your needs. The technique (add your own class to…) to use is explained on the Codex
If you’re meaning another date, you have to be more precise !
You’ll find also a global date setting in your wordpress admin.
多分、bp-xprofiles-class.phpの1459行を弄れば良いのかと思ったんですがその部分のコードが下記のように成っています。
/** * Constructor for the datebox field type * * @since BuddyPress (2.0.0) */ public function __construct() { parent::__construct(); $this->category = _x( 'Single Fields', 'xprofile field type category', 'buddypress' ); $this->name = _x( 'Date Selector', 'xprofile field type', 'buddypress' ); $this->set_format( '/^\d{4}-\d{1,2}-\d{1,2} 00:00:00$/', 'replace' ); // "Y-m-d 00:00:00" do_action( 'bp_xprofile_field_type_datebox', $this );
旧Ver見たいに
<select <?php echo $year_html; ?>> <?php bp_the_profile_field_options( array( 'type' => 'year', 'user_id' => $user_id ) ); ?> </select> <select <?php echo $month_html; ?>> <?php bp_the_profile_field_options( array( 'type' => 'month', 'user_id' => $user_id ) ); ?> </select> <select <?php echo $day_html; ?>> <?php bp_the_profile_field_options( array( 'type' => 'day', 'user_id' => $user_id ) ); ?> </select>
すれば良いと単純に思っていたんですが・・・
アドバイスとお願い致します!
- トピック「プロフィールの年月日について」には新たに返信することはできません。