Plugin Directory

Changeset 2968572


Ignore:
Timestamp:
09/19/2023 06:45:06 AM (2 years ago)
Author:
mtreherne
Message:

Release of Version 3.6

Location:
eh-gms-feed
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • eh-gms-feed/tags/3.6/eh-gms-feed.php

    r2964754 r2968572  
    44 * Plugin URI: https://wordpress.org/plugins/eh-gms-feed/
    55 * Description: Show fixtures, results and tables from England Hockey GMS
    6  * Version: 3.5
     6 * Version: 3.6
    77 * Author: Matthew Treherne
    88 * Author URI: https://profiles.wordpress.org/mtreherne
  • eh-gms-feed/tags/3.6/includes/main-class.php

    r2964754 r2968572  
    268268            }
    269269            $html .= $this->process_matches($competition->fixtures);
    270             if (!$this->filter_match) $html .= '<tr><td colspan="'.count($this->fixture_data).'">No '.$this->display_name.' found</td></tr>';
     270            if (!$this->filter_match) $html .= '<tr><td colspan="'.count($this->fixture_data).'">No fixtures found</td></tr>';
    271271            $html .= '</tbody></table>';
    272             $html .= '<div class="gms-footnote">'.($this->team_link ? sprintf(esc_html__( '[Team %1$s%4$s for %2$s also found at%5$s %3$s]', 'eh-gms-feed'), $this->display_name, $competition->competitionName, '<a href="'.$this->team_link.'" target="_blank">England Hockey Link</a>', '<span class="gms-nomobile">', '</span>') : '').'</div>';
    273         }
    274         return $html ?: '<p>'.sprintf(esc_html__( 'No %s were found that matched the criteria.', 'eh-gms-feed' ), $this->display_name).'</p>';
     272            $html .= '<div class="gms-footnote">'.($this->team_link ? sprintf(esc_html__( '[Team %1$s%4$s for %2$s also found at%5$s %3$s]', 'eh-gms-feed'), 'fixtures', $competition->competitionName, '<a href="'.$this->team_link.'" target="_blank">England Hockey Link</a>', '<span class="gms-nomobile">', '</span>') : '').'</div>';
     273        }
     274        return $html ?: '<p>'.sprintf(esc_html__( 'No %s were found that matched the criteria.', 'eh-gms-feed' ), 'fixtures').'</p>';
    275275    }
    276276
     
    310310                }
    311311            }
    312             if (!$this->filter_match) $html .= '<tr><td colspan="'.count($this->fixture_data).'">No '.$this->display_name.' found</td></tr>';
     312            if (!$this->filter_match) $html .= '<tr><td colspan="'.count($this->fixture_data).'">No fixtures found</td></tr>';
    313313            $html .= '</tbody></table>';
    314             $html .= '<div class="gms-footnote">'.($this->club_link ? sprintf(esc_html__( '[Club%3$s match day %1$s also found at%4$s %2$s]', 'eh-gms-feed' ), $this->display_name, '<a href="'.$this->club_link.'" target="_blank">England Hockey Link</a>', '<span class="gms-nomobile">', '</span>') : '').'</div>';
     314            $html .= '<div class="gms-footnote">'.($this->club_link ? sprintf(esc_html__( '[Club%3$s match day %1$s also found at%4$s %2$s]', 'eh-gms-feed' ), 'fixtures', '<a href="'.$this->club_link.'" target="_blank">England Hockey Link</a>', '<span class="gms-nomobile">', '</span>') : '').'</div>';
    315315        }
    316316        return $html;
     
    325325            if (!$this->club_link) $this->club_link = $this->get_link('club', $team->clubUrlSlug);
    326326        }
    327         if (!$this->filter_match) $html .= '<tr><td colspan=2>No '.$this->display_name.' found</td></tr>';
    328         $html .= '</tbody></table><div class="gms-footnote">'.($this->club_link ? sprintf(esc_html__( '[Club %1$s%3$s also found at%4$s %2$s]', 'eh-gms-feed' ), $this->display_name, '<a href="'.$this->club_link.'" target="_blank">England Hockey Link</a>', '<span class="gms-nomobile">', '</span>') : '').'</div>';
     327        if (!$this->filter_match) $html .= '<tr><td colspan=2>No teams found</td></tr>';
     328        $html .= '</tbody></table><div class="gms-footnote">'.($this->club_link ? sprintf(esc_html__( '[Club %1$s%3$s also found at%4$s %2$s]', 'eh-gms-feed' ), 'teams', '<a href="'.$this->club_link.'" target="_blank">England Hockey Link</a>', '<span class="gms-nomobile">', '</span>') : '').'</div>';
    329329        return $html;
    330330    }
     
    341341        foreach ($tables as $table_name) {
    342342            $this->table_name = $table_name;
    343             $this->display_name = ($table_name == 'combined') ? 'fixtures' : $table_name;
     343            $this->display_name = ($table_name == 'combined') ? 'results' : $table_name;
    344344            $this->fixture_data = ['Date' => 'fixtureDate', 'Time' => 'fixtureTime', 'Home Team' => ['homeTeam','teamName'], 'Score' => ['homeTeamScore', 'awayTeamScore'], 'Away Team' => ['awayTeam','teamName'], 'Venue' => 'venue'];
    345345            if ($table_name == 'fixtures') unset($this->fixture_data['Score']);
  • eh-gms-feed/tags/3.6/includes/settings.php

    r2958570 r2968572  
    2121    public function __construct($basename) {
    2222        $this->settings = get_option(self::OPTION_NAME) ?? null;
    23         $this->default_ajax = $this->settings['default_ajax'] ?? null;
    24         $this->default_css = $this->settings['default_css'] ?? null;
    25         $this->default_transient_expiry = $this->settings['transient_expiry'] ?? null;
    26         $this->default_club_id = $this->settings['club_id'] ?? null;
     23        if (isset($this->settings['default_ajax'])) $this->default_ajax = $this->settings['default_ajax'];
     24        if (isset($this->settings['default_css'])) $this->default_css = $this->settings['default_css'];
     25        if (isset($this->settings['transient_expiry'])) $this->default_transient_expiry = $this->settings['transient_expiry'];
     26        if (isset($this->settings['club_id'])) $this->default_club_id = $this->settings['club_id'];
    2727        if (is_admin() && ( !defined( 'DOING_AJAX' ) || !DOING_AJAX ) ) {
    2828            add_action( 'admin_init', array( $this, 'settings_init' ) );
  • eh-gms-feed/tags/3.6/readme.txt

    r2964754 r2968572  
    55Tested up to: 6.2
    66Requires PHP: 5.3
    7 Stable tag: 3.5
     7Stable tag: 3.6
    88License: GPLv2
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    6363== Changelog ==
    6464
     65= 3.6 =
     66* Fix to default settings
     67* Fix to class for combined fixtures and results
     68
    6569= 3.5 =
    6670* Deal with previous season competition in dynamic filter
  • eh-gms-feed/trunk/eh-gms-feed.php

    r2964754 r2968572  
    44 * Plugin URI: https://wordpress.org/plugins/eh-gms-feed/
    55 * Description: Show fixtures, results and tables from England Hockey GMS
    6  * Version: 3.5
     6 * Version: 3.6
    77 * Author: Matthew Treherne
    88 * Author URI: https://profiles.wordpress.org/mtreherne
  • eh-gms-feed/trunk/includes/main-class.php

    r2964754 r2968572  
    268268            }
    269269            $html .= $this->process_matches($competition->fixtures);
    270             if (!$this->filter_match) $html .= '<tr><td colspan="'.count($this->fixture_data).'">No '.$this->display_name.' found</td></tr>';
     270            if (!$this->filter_match) $html .= '<tr><td colspan="'.count($this->fixture_data).'">No fixtures found</td></tr>';
    271271            $html .= '</tbody></table>';
    272             $html .= '<div class="gms-footnote">'.($this->team_link ? sprintf(esc_html__( '[Team %1$s%4$s for %2$s also found at%5$s %3$s]', 'eh-gms-feed'), $this->display_name, $competition->competitionName, '<a href="'.$this->team_link.'" target="_blank">England Hockey Link</a>', '<span class="gms-nomobile">', '</span>') : '').'</div>';
    273         }
    274         return $html ?: '<p>'.sprintf(esc_html__( 'No %s were found that matched the criteria.', 'eh-gms-feed' ), $this->display_name).'</p>';
     272            $html .= '<div class="gms-footnote">'.($this->team_link ? sprintf(esc_html__( '[Team %1$s%4$s for %2$s also found at%5$s %3$s]', 'eh-gms-feed'), 'fixtures', $competition->competitionName, '<a href="'.$this->team_link.'" target="_blank">England Hockey Link</a>', '<span class="gms-nomobile">', '</span>') : '').'</div>';
     273        }
     274        return $html ?: '<p>'.sprintf(esc_html__( 'No %s were found that matched the criteria.', 'eh-gms-feed' ), 'fixtures').'</p>';
    275275    }
    276276
     
    310310                }
    311311            }
    312             if (!$this->filter_match) $html .= '<tr><td colspan="'.count($this->fixture_data).'">No '.$this->display_name.' found</td></tr>';
     312            if (!$this->filter_match) $html .= '<tr><td colspan="'.count($this->fixture_data).'">No fixtures found</td></tr>';
    313313            $html .= '</tbody></table>';
    314             $html .= '<div class="gms-footnote">'.($this->club_link ? sprintf(esc_html__( '[Club%3$s match day %1$s also found at%4$s %2$s]', 'eh-gms-feed' ), $this->display_name, '<a href="'.$this->club_link.'" target="_blank">England Hockey Link</a>', '<span class="gms-nomobile">', '</span>') : '').'</div>';
     314            $html .= '<div class="gms-footnote">'.($this->club_link ? sprintf(esc_html__( '[Club%3$s match day %1$s also found at%4$s %2$s]', 'eh-gms-feed' ), 'fixtures', '<a href="'.$this->club_link.'" target="_blank">England Hockey Link</a>', '<span class="gms-nomobile">', '</span>') : '').'</div>';
    315315        }
    316316        return $html;
     
    325325            if (!$this->club_link) $this->club_link = $this->get_link('club', $team->clubUrlSlug);
    326326        }
    327         if (!$this->filter_match) $html .= '<tr><td colspan=2>No '.$this->display_name.' found</td></tr>';
    328         $html .= '</tbody></table><div class="gms-footnote">'.($this->club_link ? sprintf(esc_html__( '[Club %1$s%3$s also found at%4$s %2$s]', 'eh-gms-feed' ), $this->display_name, '<a href="'.$this->club_link.'" target="_blank">England Hockey Link</a>', '<span class="gms-nomobile">', '</span>') : '').'</div>';
     327        if (!$this->filter_match) $html .= '<tr><td colspan=2>No teams found</td></tr>';
     328        $html .= '</tbody></table><div class="gms-footnote">'.($this->club_link ? sprintf(esc_html__( '[Club %1$s%3$s also found at%4$s %2$s]', 'eh-gms-feed' ), 'teams', '<a href="'.$this->club_link.'" target="_blank">England Hockey Link</a>', '<span class="gms-nomobile">', '</span>') : '').'</div>';
    329329        return $html;
    330330    }
     
    341341        foreach ($tables as $table_name) {
    342342            $this->table_name = $table_name;
    343             $this->display_name = ($table_name == 'combined') ? 'fixtures' : $table_name;
     343            $this->display_name = ($table_name == 'combined') ? 'results' : $table_name;
    344344            $this->fixture_data = ['Date' => 'fixtureDate', 'Time' => 'fixtureTime', 'Home Team' => ['homeTeam','teamName'], 'Score' => ['homeTeamScore', 'awayTeamScore'], 'Away Team' => ['awayTeam','teamName'], 'Venue' => 'venue'];
    345345            if ($table_name == 'fixtures') unset($this->fixture_data['Score']);
  • eh-gms-feed/trunk/includes/settings.php

    r2958570 r2968572  
    2121    public function __construct($basename) {
    2222        $this->settings = get_option(self::OPTION_NAME) ?? null;
    23         $this->default_ajax = $this->settings['default_ajax'] ?? null;
    24         $this->default_css = $this->settings['default_css'] ?? null;
    25         $this->default_transient_expiry = $this->settings['transient_expiry'] ?? null;
    26         $this->default_club_id = $this->settings['club_id'] ?? null;
     23        if (isset($this->settings['default_ajax'])) $this->default_ajax = $this->settings['default_ajax'];
     24        if (isset($this->settings['default_css'])) $this->default_css = $this->settings['default_css'];
     25        if (isset($this->settings['transient_expiry'])) $this->default_transient_expiry = $this->settings['transient_expiry'];
     26        if (isset($this->settings['club_id'])) $this->default_club_id = $this->settings['club_id'];
    2727        if (is_admin() && ( !defined( 'DOING_AJAX' ) || !DOING_AJAX ) ) {
    2828            add_action( 'admin_init', array( $this, 'settings_init' ) );
  • eh-gms-feed/trunk/readme.txt

    r2964754 r2968572  
    55Tested up to: 6.2
    66Requires PHP: 5.3
    7 Stable tag: 3.5
     7Stable tag: 3.6
    88License: GPLv2
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    6363== Changelog ==
    6464
     65= 3.6 =
     66* Fix to default settings
     67* Fix to class for combined fixtures and results
     68
    6569= 3.5 =
    6670* Deal with previous season competition in dynamic filter
Note: See TracChangeset for help on using the changeset viewer.