Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* override jeg_get_author_option to avoid warning error */
- function jeg_get_author_option( $value = null ) {
- $result = array();
- $options = array_flip( jnews_get_all_author() );
- if ( empty( $options ) ) {
- if ( $value ) {
- $values = explode( ',', $value );
- foreach ( $values as $val ) {
- if ( ! empty( $val ) ) {
- $user = get_userdata( $val );
- $result[] = array(
- 'value' => $val,
- 'text' => $user->display_name,
- );
- }
- }
- }
- } else {
- foreach ( $options as $key => $label ) {
- $result[] = array(
- 'value' => $key,
- 'text' => $label,
- );
- }
- }
- return $result;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement