Alcione Ferreira
Forum Replies Created
-
Forum: Plugins
In reply to: [Daily logo] Historical Daily-Logon?o consegui fazer o commit ent?o segue o código que acrecentei no file daily-logo-utils.php in the end
/** * Render table list all rows to historic */ function daily_logo_fields_table() { ?> <h3>Histórico de Doodles</h3> <center> <table class="wp-list-table" cellspacing="0"> <thead> <tr> <th scope="col" class="label-column"><?php _e( 'Nome', DLP_PREFIX ) ?></th> <th scope="col" class="date-column"><?php _e( 'Data', DLP_PREFIX ) ?></th> <th scope="col" class="label-column"><?php _e( 'Imagem', DLP_PREFIX ) ?></th> </tr> </thead> <tbody id="logo_rows"> <?php // Get rows from database global $wpdb; $table_name = $wpdb->prefix . DLP_DB_TABLE; // Retrieve rows $rows = $wpdb->get_results( ' SELECT * FROM ' . $table_name . ' ORDER BY logo_year_start DESC, logo_month_start DESC, logo_day_start DESC, logo_hour_start DESC, logo_minute_start DESC, logo_year_end DESC, logo_month_end DESC, logo_day_end DESC, logo_hour_end DESC, logo_minute_end DESC' ); // Show rows $i=0; foreach ( $rows as $row ) { $year_start = $row->logo_year_start; $month_start = daily_logo_format_digit_date( $row->logo_month_start ); $day_start = daily_logo_format_digit_date( $row->logo_day_start ); $hour_start = daily_logo_format_digit_date( $row->logo_hour_start ); $minute_start = daily_logo_format_digit_date( $row->logo_minute_start ); $year_end = ( $row->logo_year_end != 0 ) ? $row->logo_year_end : $year_start; $month_end = ( $row->logo_year_end != 0 ) ? daily_logo_format_digit_date( $row->logo_month_end ) : $month_start; $day_end = ( $row->logo_year_end != 0 ) ? daily_logo_format_digit_date( $row->logo_day_end ) : $day_start; $hour_end = ( $row->logo_year_end != 0 ) ? daily_logo_format_digit_date( $row->logo_hour_end ) : DLP_DEFAULT_END_DATE_HOUR; $minute_end = ( $row->logo_year_end != 0 ) ? daily_logo_format_digit_date( $row->logo_minute_end ) : DLP_DEFAULT_END_DATE_MINUTE; echo ('<tr id="logo-' . $row->id . '" ' . ( ( $i % 2 == 0 ) ? 'style="background-color: #39e4ef;"' : '' ) . ' valign="middle"> <td class="label-column">' . $row->logo_name . '</td> <td class="date-column"> ' . $day_start . '/' . $month_start . '/' . $year_start . ' </td> <td class="label-column"> ' . ( ! empty( $row->logo_image ) ? '<img src="' . $row->logo_image . '" alt="' . $row->logo_name . '" class="daily-image" />' : __( '-', DLP_PREFIX ) ) . ' </td> </tr>'); $i++; } ?> </tbody> </table> </center> <?php } add_shortcode('wp_daily_logo_fields_table','daily_logo_fields_table');
Forum: Plugins
In reply to: [Daily logo] Historical Daily-LogoI will send my contribution with a shortcode
Forum: Plugins
In reply to: [Daily logo] Historical Daily-LogoThank’s
I will develop in the plugin to integrate and I will post it here for your appreciation
Att.