null, ), $atts ) ); $html = apply_filters( ATTMGR::PLUGIN_ID.'_shortcode_weekly', $atts, $content ); return $html; } /** * Schedule for a week of all staff */ public function weekly_all( $atts, $content = null ) { global $attmgr; extract( shortcode_atts( array( ), $atts ) ); $html = apply_filters( ATTMGR::PLUGIN_ID.'_shortcode_weekly_all', $atts, $content ); return $html; } /** * Schedule for a month of all staff */ public function monthly_all( $atts, $content = null ) { global $attmgr; extract( shortcode_atts( array( ), $atts ) ); $html = apply_filters( ATTMGR::PLUGIN_ID.'_shortcode_monthly_all', $atts, $content ); return $html; } /** * Monthly all schedule */ public function monthly_all_schedule( $atts, $content = null ) { global $attmgr, $wpdb; extract( shortcode_atts( array( 'start' => 0, // 0:Sun, 1:Mon, ... 6:Sut 'name_key' => 'display_name', ), $atts ) ); ob_start(); $staff = ATTMGR_User::get_all_staff(); if ( empty( $staff ) ) { printf( '
| %s | '."\n", ATTMGR_Calendar::dow_lower( $w ), $date ); } $head = sprintf( '
|---|
| '."\n".'%s | %s | '."\n", $time ); } $portrait = null; $portrait = ATTMGR_Function::get_portrait( $portrait, $s ); $name = $s->data[ $name_key ]; if ( ! empty( $s->data[ATTMGR::PLUGIN_ID.'_mypage_id'] ) ) { $name = sprintf( '%s', get_permalink( $s->data[ATTMGR::PLUGIN_ID.'_mypage_id'] ), $name ); } $body .= sprintf( '
| %s%s | %s