Changeset 3178877
- Timestamp:
- 10/30/2024 02:39:55 PM (16 months ago)
- Location:
- label-grid-tools/trunk
- Files:
-
- 7 edited
-
README.txt (modified) (2 diffs)
-
admin/class-gate-entries-table.php (modified) (7 diffs)
-
admin/class-system-logs-table.php (modified) (14 diffs)
-
labelgrid-tools.php (modified) (2 diffs)
-
public/class-labelgrid-tools-public.php (modified) (1 diff)
-
public/templates/lite_gate.php (modified) (2 diffs)
-
public/templates/lite_release.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
label-grid-tools/trunk/README.txt
r3101912 r3178877 2 2 Contributors: labelgrid 3 3 Donate link: https://labelgrid.com 4 Tags: record label, artist, music, musician, releases , songs, tracks, labelgrid, spotify api, free download, pre-save,download gate, free music4 Tags: record label, artist, music, musician, releases 5 5 Requires at least: 5.0.0 6 Tested up to: 6. 56 Tested up to: 6.7 7 7 Stable tag: /trunk/ 8 8 Requires PHP: 8.0 … … 82 82 == Changelog == 83 83 84 = 1.3.59 = 85 * Fix vulnerabilities in admin for Cross Site Scripting (XSS) (OWASP A3: Injection (2021)) 86 84 87 = 1.3.58 = 85 88 * Fix issue from LabelGrid content update where the content (release/artist) wasn't correctly updated after being re-imported from LabelGrid Catalog -
label-grid-tools/trunk/admin/class-gate-entries-table.php
r2503520 r3178877 35 35 36 36 $this->table_name = LabelGrid_Tools::lgt_prefixTableName('gate_entries', true); 37 38 39 40 41 add_action( 'init', 'func_export_entries' ); 42 43 37 38 39 40 41 add_action('init', 'func_export_entries'); 44 42 } 45 43 … … 82 80 return $item['created_at']; 83 81 case 'type': 84 if ($item['type']==0) $type='Gate';85 else $type ='Pre-Save';82 if ($item['type'] == 0) $type = 'Gate'; 83 else $type = 'Pre-Save'; 86 84 return $type; 87 85 default: … … 147 145 function column_cb($item) 148 146 { 149 return sprintf('<input type="checkbox" name="%1$s[]" value="%2$s" />', 150 /*$1%s*/ $this->_args['singular'], // Let's simply repurpose the table's singular label ("movie") 151 /* $2%s */ 152 $item['id'] // The value of the checkbox should be the record's id 147 return sprintf( 148 '<input type="checkbox" name="%1$s[]" value="%2$s" />', 149 /*$1%s*/ 150 $this->_args['singular'], // Let's simply repurpose the table's singular label ("movie") 151 /* $2%s */ 152 $item['id'] // The value of the checkbox should be the record's id 153 153 ); 154 154 } … … 313 313 $query = "SELECT * FROM `" . $wpdb->prefix . $this->table_name . "` WHERE 1=1 "; 314 314 315 // Sanitize and validate `gate-filter` as an integer ID 315 316 if (isset($_GET['gate-filter'])) { 316 $query = $query . " AND `gate_id`='" . esc_sql($_GET['gate-filter']) . "'"; 317 } 318 317 $gate_filter = absint($_GET['gate-filter']); // Ensure it's a positive integer 318 if ($gate_filter > 0) { // Only add to query if it's a valid ID 319 $query .= " AND `gate_id`='" . esc_sql($gate_filter) . "'"; 320 } 321 } 322 323 // Sanitize and validate `type-filter` as an integer ID 319 324 if (isset($_GET['type-filter'])) { 320 $query = $query . " AND `type`='" . esc_sql($_GET['type-filter']) . "'"; 321 } 322 323 $query = $query . ' ORDER BY id DESC'; 324 325 $type_filter = absint($_GET['type-filter']); // Ensure it's a positive integer 326 if ($type_filter > 0) { // Only add to query if it's a valid ID 327 $query .= " AND `type`='" . esc_sql($type_filter) . "'"; 328 } 329 } 330 331 $query .= ' ORDER BY id DESC'; 325 332 $sql_results = $wpdb->get_results($query); 326 333 327 $data = array(); 328 // loop through all requests to build possible array 334 $data = []; 329 335 foreach ($sql_results as $row) { 330 // $product_ids[] = $row->product_id;331 332 336 $entry['id'] = $row->id; 333 337 $entry['created_at'] = $row->created_at; 334 $entry['email'] = $row->email;335 $entry['gate_id'] = $row->gate_id;336 $entry['session_id'] = $row->session_id;337 $entry['type'] = $row->type;338 $entry['connected_services'] = $row->connected_services;338 $entry['email'] = esc_html($row->email); // Escape output 339 $entry['gate_id'] = esc_html($row->gate_id); // Escape output 340 $entry['session_id'] = esc_html($row->session_id); // Escape output 341 $entry['type'] = esc_html($row->type); // Escape output 342 $entry['connected_services'] = esc_html($row->connected_services); // Escape output 339 343 340 344 $data[] = $entry; 341 345 } 342 343 // var_dump($data);344 346 345 347 return $data; … … 502 504 } 503 505 504 return ($order === 'asc') ? $result : - $result; // Send final sort direction to usort506 return ($order === 'asc') ? $result : -$result; // Send final sort direction to usort 505 507 } 506 508 … … 510 512 511 513 if ($which == "top") { 512 ?>513 <div class="alignleft actions bulkactions">514 <?php515 516 $args = array(517 'post_type' => 'gate_download',518 'posts_per_page' => -1519 );520 $loop = new WP_Query($args);521 if ($loop->have_posts()) :522 523 if(isset($_GET['type-filter'])) $log_url = '&type-filter='.$_GET['type-filter'].'&gate-filter=';524 else $log_url = '&gate-filter=';525 514 ?> 515 <div class="alignleft actions bulkactions"> 516 <?php 517 518 $args = array( 519 'post_type' => 'gate_download', 520 'posts_per_page' => -1 521 ); 522 $loop = new WP_Query($args); 523 if ($loop->have_posts()) : 524 525 if (isset($_GET['type-filter'])) $log_url = '&type-filter=' . $_GET['type-filter'] . '&gate-filter='; 526 else $log_url = '&gate-filter='; 527 526 528 ?> 527 <select name="gate-filter" class="lg-gate-filter"> 528 <option value=""><?php _e('All Gates', LabelGrid_Tools::$plugin_name); ?></option> 529 <?php 530 531 while ($loop->have_posts()) : 532 $loop->the_post(); 533 $selected = ''; 534 if (isset($_GET['gate-filter']) && $_GET['gate-filter'] == get_the_ID()) { 535 $selected = ' selected = "selected"'; 529 <select name="gate-filter" class="lg-gate-filter"> 530 <option value=""><?php _e('All Gates', LabelGrid_Tools::$plugin_name); ?></option> 531 <?php 532 533 while ($loop->have_posts()) : 534 $loop->the_post(); 535 $selected = ''; 536 if (isset($_GET['gate-filter']) && $_GET['gate-filter'] == get_the_ID()) { 537 $selected = ' selected = "selected"'; 538 } 539 ?> 540 <option value="<?php echo $log_url . get_the_ID(); ?>" <?php echo $selected; ?>><?php the_title(); ?></option> 541 <?php 542 endwhile; 543 544 ?> 545 </select> 546 <?php 547 548 endif; 549 550 wp_reset_postdata(); 551 552 553 $type = array( 554 0 => 'Gate', 555 1 => 'Pre-Save' 556 ); 557 558 559 560 if (isset($_GET['gate-filter'])) $status_url = '&gate-filter=' . $_GET['gate-filter'] . '&type-filter='; 561 else $status_url = '&type-filter='; 562 563 ?> 564 <select name="type-filter" class="lg-type-filter"> 565 <option value=""><?php _e('All Types', LabelGrid_Tools::$plugin_name); ?></option> 566 <?php 567 foreach ($type as $id => $name) { 568 $selected = ''; 569 if (isset($_GET['type-filter']) && (int)$_GET['type-filter'] == $id) { 570 $selected = ' selected = "selected"'; 571 } 572 ?> 573 <option value="<?php echo $status_url . $id; ?>" <?php echo $selected; ?>><?php echo $name; ?></option> 574 <?php 536 575 } 537 576 ?> 538 <option value="<?php echo $log_url . get_the_ID(); ?>" <?php echo $selected; ?>><?php the_title(); ?></option> 539 <?php 540 endwhile 541 ; 542 543 ?> 544 </select> 545 <?php 546 547 endif; 548 549 wp_reset_postdata(); 550 551 552 $type=array( 553 0=>'Gate', 554 1=>'Pre-Save' 555 ); 556 557 558 559 if(isset($_GET['gate-filter'])) $status_url = '&gate-filter='.$_GET['gate-filter'].'&type-filter='; 560 else $status_url = '&type-filter='; 561 562 ?> 563 <select name="type-filter" class="lg-type-filter"> 564 <option value=""><?php _e('All Types', LabelGrid_Tools::$plugin_name); ?></option> 565 <?php 566 foreach ($type as $id => $name) { 567 $selected = ''; 568 if (isset($_GET['type-filter']) && (int)$_GET['type-filter'] == $id) { 569 $selected = ' selected = "selected"'; 570 } 571 ?> 572 <option value="<?php echo $status_url . $id; ?>" <?php echo $selected; ?>><?php echo $name; ?></option> 573 <?php 574 } 575 ?> 576 </select> 577 578 579 <input type="submit" name="export_entries" id="export_entries" class="button button-primary" value="Export to CSV" /> 580 581 </div> 577 </select> 578 579 580 <input type="submit" name="export_entries" id="export_entries" class="button button-primary" value="Export to CSV" /> 581 582 </div> 582 583 <?php 583 584 } … … 586 587 } 587 588 } 588 589 590 591 589 } -
label-grid-tools/trunk/admin/class-system-logs-table.php
r2503520 r3178877 95 95 { 96 96 switch ($column_name) { 97 // case 'rating':98 // case 'director':97 // case 'rating': 98 // case 'director': 99 99 case 'id': 100 100 case 'action': … … 171 171 function column_cb($item) 172 172 { 173 return sprintf('<input type="checkbox" name="%1$s[]" value="%2$s" />', 174 /*$1%s*/ $this->_args['singular'], // Let's simply repurpose the table's singular label ("movie") 175 /* $2%s */ 176 $item['id'] // The value of the checkbox should be the record's id 173 return sprintf( 174 '<input type="checkbox" name="%1$s[]" value="%2$s" />', 175 /*$1%s*/ 176 $this->_args['singular'], // Let's simply repurpose the table's singular label ("movie") 177 /* $2%s */ 178 $item['id'] // The value of the checkbox should be the record's id 177 179 ); 178 180 } … … 198 200 $columns = array( 199 201 'cb' => '<input type="checkbox" />', // Render a checkbox instead of text 200 // 'title' => 'Title',201 // 'rating' => 'Rating',202 // 'director' => 'Director'202 // 'title' => 'Title', 203 // 'rating' => 'Rating', 204 // 'director' => 'Director' 203 205 'id' => 'ID', 204 206 'time' => 'Date', … … 329 331 global $wpdb; 330 332 $query = "SELECT * FROM `" . $wpdb->prefix . $this->table_name . "` WHERE 1=1 "; 331 if (! empty($_GET['log-filter'])) { 332 $query = $query . " AND `channel`='" . esc_sql($_GET['log-filter']) . "'"; 333 } 334 if (! empty($_GET['level-filter'])) { 335 $query = $query . " AND `level`='" . esc_sql($_GET['level-filter']) . "'"; 336 } 337 $query = $query . ' ORDER BY id DESC'; 338 333 334 // Sanitize `log-filter` as text 335 if (!empty($_GET['log-filter'])) { 336 $log_filter = sanitize_text_field($_GET['log-filter']); // Sanitize text input 337 $query .= " AND `channel`='" . esc_sql($log_filter) . "'"; 338 } 339 340 // Sanitize and validate `level-filter` as a number 341 if (!empty($_GET['level-filter'])) { 342 $level_filter = absint($_GET['level-filter']); // Ensure it's a positive integer 343 if ($level_filter >= 0) { // Only add to query if it's a valid level 344 $query .= " AND `level`='" . esc_sql($level_filter) . "'"; 345 } 346 } 347 348 $query .= ' ORDER BY id DESC'; 339 349 $sql_results = $wpdb->get_results($query); 340 350 341 $data = array(); 342 // loop through all requests to build possible array 351 $data = []; 343 352 foreach ($sql_results as $row) { 344 // $product_ids[] = $row->product_id; 345 346 if (isset($_REQUEST['log_action']) && "" != $_REQUEST['log_action'] && $_REQUEST['log_action'] != strtolower(str_replace(' ', '-', $row->action))) { 353 if ( 354 isset($_REQUEST['log_action']) && $_REQUEST['log_action'] !== "" && 355 strtolower(str_replace(' ', '-', $row->action)) !== $_REQUEST['log_action'] 356 ) { 347 357 continue; 348 358 } 349 359 350 360 $entry['id'] = $row->id; 351 $entry['time'] = $row->time; 352 // $entry['user'] = $row->user; 353 // $entry['action'] = $row->action; 354 // $entry['message'] = $row->message; 355 // $entry['timestamp'] = $row->unix_timestamp; 356 $entry['channel'] = $row->channel; 357 $entry['level'] = $row->level; 358 $entry['message'] = $row->message; 361 $entry['time'] = esc_html($row->time); // Escape output 362 $entry['channel'] = esc_html($row->channel); // Escape output 363 $entry['level'] = esc_html($row->level); // Escape output 364 $entry['message'] = esc_html($row->message); // Escape output 359 365 360 366 $data[] = $entry; 361 367 } 362 368 363 // var_dump($data);364 365 369 return $data; 366 370 } 371 367 372 368 373 /** … … 426 431 */ 427 432 $this->process_bulk_action(); 428 433 429 434 /** 430 435 * Instead of querying a database, we're going to fetch the example data … … 437 442 * be able to use your precisely-queried data immediately. 438 443 */ 439 444 440 445 $data = $this->load_data(); 441 446 442 447 usort($data, array( 443 448 $this, 444 449 'usort_reorder' 445 450 )); 446 451 447 452 /** 448 453 * ********************************************************************* … … 459 464 * ******************************************************************** 460 465 */ 461 466 462 467 /** 463 468 * REQUIRED for pagination. … … 467 472 */ 468 473 $current_page = $this->get_pagenum(); 469 474 470 475 /** 471 476 * REQUIRED for pagination. … … 476 481 */ 477 482 $total_items = count($data); 478 483 479 484 /** 480 485 * The WP_List_Table class does not handle pagination for us, so we need … … 484 489 */ 485 490 $data = array_slice($data, (($current_page - 1) * $per_page), $per_page); 486 491 487 492 /** 488 493 * REQUIRED. … … 491 496 */ 492 497 $this->items = $data; 493 498 494 499 /** 495 500 * REQUIRED. … … 502 507 )); 503 508 } 504 509 505 510 /** 506 511 * This checks for sorting input and sorts the data in our array accordingly. … … 515 520 $orderby = (! empty($_REQUEST['orderby'])) ? $_REQUEST['orderby'] : 'id'; // If no sort, default to title 516 521 $order = (! empty($_REQUEST['order'])) ? $_REQUEST['order'] : 'desc'; // If no order, default to asc 517 522 518 523 if (is_numeric($a[$orderby]) && is_numeric($b[$orderby])) { 519 524 $result = bccomp($a[$orderby], $b[$orderby]); // Determine sort order … … 521 526 $result = strcmp($a[$orderby], $b[$orderby]); // Determine sort order 522 527 } 523 524 return ($order === 'asc') ? $result : - $result; // Send final sort direction to usort525 } 526 528 529 return ($order === 'asc') ? $result : -$result; // Send final sort direction to usort 530 } 531 527 532 function extra_tablenav($which) 528 533 { 529 534 global $wpdb; 530 535 531 536 if ($which == "top") { 532 ?> 533 <div class="alignleft actions bulkactions"> 534 <?php 535 $log_channels = $wpdb->get_results('SELECT DISTINCT channel FROM `' . $wpdb->prefix . $this->table_name . '` order by channel asc', ARRAY_A); 536 if ($log_channels) { 537 538 if(!empty($_GET['level-filter'])) $log_url = '&level-filter='.$_GET['level-filter'].'&log-filter='; 539 else $log_url = '&log-filter='; 540 541 ?> 542 <select name="log-filter" class="lg-log-filter-cat"> 543 <option value=""><?php _e('All Channels', LabelGrid_Tools::$plugin_name); ?></option> 537 ?> 538 <div class="alignleft actions bulkactions"> 544 539 <?php 545 foreach ($log_channels as $channel) { 546 $selected = ''; 547 if (isset($_GET['log-filter']) && $_GET['log-filter'] == $channel['channel']) { 548 $selected = ' selected = "selected"'; 549 } 550 ?> 551 <option value="<?php echo $log_url . $channel['channel']; ?>" <?php echo $selected; ?>><?php echo $channel['channel']; ?></option> 552 <?php 540 $log_channels = $wpdb->get_results('SELECT DISTINCT channel FROM `' . $wpdb->prefix . $this->table_name . '` order by channel asc', ARRAY_A); 541 if ($log_channels) { 542 543 if (!empty($_GET['level-filter'])) $log_url = '&level-filter=' . $_GET['level-filter'] . '&log-filter='; 544 else $log_url = '&log-filter='; 545 546 ?> 547 <select name="log-filter" class="lg-log-filter-cat"> 548 <option value=""><?php _e('All Channels', LabelGrid_Tools::$plugin_name); ?></option> 549 <?php 550 foreach ($log_channels as $channel) { 551 $selected = ''; 552 if (isset($_GET['log-filter']) && $_GET['log-filter'] == $channel['channel']) { 553 $selected = ' selected = "selected"'; 554 } 555 ?> 556 <option value="<?php echo $log_url . $channel['channel']; ?>" <?php echo $selected; ?>><?php echo $channel['channel']; ?></option> 557 <?php 558 } 559 ?> 560 </select> 561 <?php 562 } 563 564 $log_status = array( 565 100 => 'debug', 566 200 => 'info', 567 250 => 'notice', 568 300 => 'warning', 569 400 => 'error', 570 500 => 'critical', 571 550 => 'alert', 572 600 => 'emergency' 573 ); 574 575 if ($log_status) { 576 577 if (isset($_GET['log-filter'])) $status_url = '&log-filter=' . $_GET['log-filter'] . '&level-filter='; 578 else $status_url = '&level-filter='; 579 580 ?> 581 <select name="level-filter" class="lg-level-filter-cat"> 582 <option value=""><?php _e('All Levels', LabelGrid_Tools::$plugin_name); ?></option> 583 <?php 584 foreach ($log_status as $id => $name) { 585 $selected = ''; 586 if (!empty($_GET['level-filter']) && $_GET['level-filter'] == $id) { 587 $selected = ' selected = "selected"'; 588 } 589 ?> 590 <option value="<?php echo $status_url . $id; ?>" <?php echo $selected; ?>><?php echo $name; ?></option> 591 <?php 592 } 593 ?> 594 </select> 595 <?php 553 596 } 554 597 ?> 555 </select> 556 <?php 557 } 558 559 $log_status=array( 560 100=>'debug', 561 200=>'info', 562 250=>'notice', 563 300=>'warning', 564 400=>'error', 565 500=>'critical', 566 550=>'alert', 567 600=>'emergency' 568 ); 569 570 if ($log_status) { 571 572 if(isset($_GET['log-filter'])) $status_url = '&log-filter='.$_GET['log-filter'].'&level-filter='; 573 else $status_url = '&level-filter='; 574 575 ?> 576 <select name="level-filter" class="lg-level-filter-cat"> 577 <option value=""><?php _e('All Levels', LabelGrid_Tools::$plugin_name); ?></option> 578 <?php 579 foreach ($log_status as $id => $name) { 580 $selected = ''; 581 if (!empty($_GET['level-filter']) && $_GET['level-filter'] == $id) { 582 $selected = ' selected = "selected"'; 583 } 584 ?> 585 <option value="<?php echo $status_url . $id; ?>" <?php echo $selected; ?>><?php echo $name; ?></option> 586 <?php 587 } 588 ?> 589 </select> 590 <?php 591 } 592 ?> 593 </div> 598 </div> 594 599 <?php 595 600 } -
label-grid-tools/trunk/labelgrid-tools.php
r3101912 r3178877 15 15 * Plugin Name: LabelGrid Tools 16 16 * Description: LabelGrid Tools is an advanced plugin for Record Labels, Artists, and Distributors that allow to showcase music releases with ease providing advanced promotional and pre-release tools. 17 * Version: 1.3.5 817 * Version: 1.3.59 18 18 * Author: LabelGrid 19 19 * Author URI: https://labelgrid.com … … 34 34 * Rename this for your plugin and update it as you release new versions. 35 35 */ 36 define('LGT_PLUGIN_VERSION', '1.3.5 8');36 define('LGT_PLUGIN_VERSION', '1.3.59'); 37 37 38 38 /** -
label-grid-tools/trunk/public/class-labelgrid-tools-public.php
r3101912 r3178877 392 392 } 393 393 if (!empty($release_data['show_artist_bandsintown']) && $release_data['show_artist_bandsintown'] != 'no') { 394 $html .= '<div id="bandsintown_events_box"><script charset="utf-8" src="https://widget.bandsintown.com/main.min.js"></script><a class="bit-widget-initializer" data-artist-name="' . get_the_title() . '" data-display-local-dates="false" data-display-past-dates="false" data-auto-style="false" data-text-color="#000000" data-link-color="#be1e2d" data-background-color="rgba(0,0,0,0)" data-display-limit="5" data-display-start-time="false" data-link-text-color="#FFFFFF" data-display-lineup="false" data-display-play-my-city="false" data-separator-color="rgba(124,124,124,0.25)"></a></div>'; 394 // Conditionally enqueue the Bandsintown widget script 395 wp_enqueue_script( 396 'bandsintown-widget', 397 'https://widget.bandsintown.com/main.min.js', 398 [], 399 null, 400 true // Load in the footer 401 ); 402 403 // Output the HTML for the widget 404 $html .= '<div id="bandsintown_events_box">'; 405 $html .= '<a class="bit-widget-initializer" data-artist-name="' . esc_attr(get_the_title()) . '" data-display-local-dates="false" data-display-past-dates="false" data-auto-style="false" data-text-color="#000000" data-link-color="#be1e2d" data-background-color="rgba(0,0,0,0)" data-display-limit="5" data-display-start-time="false" data-link-text-color="#FFFFFF" data-display-lineup="false" data-display-play-my-city="false" data-separator-color="rgba(124,124,124,0.25)"></a>'; 406 $html .= '</div>'; 395 407 } 396 408 -
label-grid-tools/trunk/public/templates/lite_gate.php
r2544660 r3178877 14 14 $release_wp_id = get_the_ID(); 15 15 $release_image = get_post_meta($release_wp_id, '_lgt_release_image', true); 16 if (empty($release_image)) $release_image = get_post_meta($release_wp_id, '_lgt_gate_cover_image', true); 16 if (empty($release_image)) { 17 $release_image = get_post_meta($release_wp_id, '_lgt_gate_cover_image', true); 18 } 17 19 $artwork_medium = wp_get_attachment_image_src($release_image, 'lgt_artwork_medium'); 18 20 $category = wp_get_object_terms($release_wp_id, 'record_label', array( … … 26 28 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 27 29 <meta name="viewport" content="width=device-width, initial-scale=1.0"> 28 <?php wp_head(); ?>30 <?php wp_head(); ?> 29 31 </head> 30 32 <body id="lg_lite_page"> 31 <div id="lg_custom_background"> 32 <?php echo '<img src="' . $artwork_medium[0] . '" alt="' . get_the_title() . '" title="' . get_the_title() .'">'; ?> 33 </div> 34 <main id="lg_content_release" class="release_detail release_lite"> 35 <div class="release_box_content"> 36 <div class="release_title"> 37 <h1><?php echo get_the_title();?></h1> <?php if(!empty($category[0])) echo __('Released by ', 'labelgrid-tools').$category[0];?> 38 </div> 39 <div class="artwork"> 40 <?php echo '<img src="' . $artwork_medium[0] . '" alt="' . get_the_title() . '" title="' . get_the_title() .'">'; ?> 41 </div> 42 <div class="release_links"><div id="releaselinks"> 43 <?php echo do_shortcode( '[labelgrid-gate-button gate-id="' . $release_wp_id . '" ]' ); ?> 44 </div></div> 45 </div> 46 </main> 47 <?php wp_footer(); ?> 33 <div id="lg_custom_background"> 34 <?php echo '<img src="' . esc_url($artwork_medium[0]) . '" alt="' . esc_attr(get_the_title()) . '" title="' . esc_attr(get_the_title()) . '">'; ?> 35 </div> 36 <main id="lg_content_release" class="release_detail release_lite"> 37 <div class="release_box_content"> 38 <div class="release_title"> 39 <h1><?php echo esc_html(get_the_title()); ?></h1> 40 <?php 41 if (!empty($category[0])) { 42 echo esc_html(__('Released by ', 'labelgrid-tools')) . esc_html($category[0]); 43 } 44 ?> 45 </div> 46 <div class="artwork"> 47 <?php echo '<img src="' . esc_url($artwork_medium[0]) . '" alt="' . esc_attr(get_the_title()) . '" title="' . esc_attr(get_the_title()) . '">'; ?> 48 </div> 49 <div class="release_links"> 50 <div id="releaselinks"> 51 <?php echo do_shortcode('[labelgrid-gate-button gate-id="' . esc_attr($release_wp_id) . '" ]'); ?> 52 </div> 53 </div> 54 </div> 55 </main> 56 <?php wp_footer(); ?> 48 57 </body> 49 58 </html> -
label-grid-tools/trunk/public/templates/lite_release.php
r2544660 r3178877 14 14 $release_wp_id = get_the_ID(); 15 15 $release_image = get_post_meta($release_wp_id, '_lgt_release_image', true); 16 if (empty($release_image)) $release_image = get_post_meta($release_wp_id, '_lgt_gate_cover_image', true); 16 if (empty($release_image)) { 17 $release_image = get_post_meta($release_wp_id, '_lgt_gate_cover_image', true); 18 } 17 19 $artwork_medium = wp_get_attachment_image_src($release_image, 'lgt_artwork_medium'); 18 20 $category = wp_get_object_terms($release_wp_id, 'record_label', array( … … 26 28 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 27 29 <meta name="viewport" content="width=device-width, initial-scale=1.0"> 28 <?php wp_head(); ?>30 <?php wp_head(); ?> 29 31 </head> 30 32 <body id="lg_lite_page"> 31 <div id="lg_custom_background"> 32 <?php echo '<img src="' . $artwork_medium[0] . '" alt="' . get_the_title() . '" title="' . get_the_title() .'">'; ?> 33 </div> 34 <main id="lg_content_release" class="release_detail release_lite"> 35 <div class="release_box_content"> 36 <div class="release_title"> 37 <h1><?php echo get_the_title();?></h1> <?php if(!empty($category[0])) echo __('Released by ', 'labelgrid-tools').$category[0];?> 38 </div> 39 <div class="artwork"> 40 <?php echo '<img src="' . $artwork_medium[0] . '" alt="' . get_the_title() . '" title="' . get_the_title() .'">'; ?> 41 </div> 42 <div class="release_links"> 43 <?php echo do_shortcode( '[labelgrid-release-links]' ); ?> 44 </div> 45 </div> 46 </main> 47 <?php wp_footer(); ?> 33 <div id="lg_custom_background"> 34 <?php echo '<img src="' . esc_url($artwork_medium[0]) . '" alt="' . esc_attr(get_the_title()) . '" title="' . esc_attr(get_the_title()) . '">'; ?> 35 </div> 36 <main id="lg_content_release" class="release_detail release_lite"> 37 <div class="release_box_content"> 38 <div class="release_title"> 39 <h1><?php echo esc_html(get_the_title()); ?></h1> 40 <?php 41 if (!empty($category[0])) { 42 echo esc_html(__('Released by ', 'labelgrid-tools')) . esc_html($category[0]); 43 } 44 ?> 45 </div> 46 <div class="artwork"> 47 <?php echo '<img src="' . esc_url($artwork_medium[0]) . '" alt="' . esc_attr(get_the_title()) . '" title="' . esc_attr(get_the_title()) . '">'; ?> 48 </div> 49 <div class="release_links"> 50 <?php echo do_shortcode('[labelgrid-release-links]'); ?> 51 </div> 52 </div> 53 </main> 54 <?php wp_footer(); ?> 48 55 </body> 49 56 </html>
Note: See TracChangeset
for help on using the changeset viewer.