This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class JM_Portfolio_Blocks { | |
protected $loader; | |
protected $directory_location; | |
public function __construct() { | |
$this->directory_location = str_replace( '/blocks/', '', dirname( __FILE__ ) ); | |
} | |
public function jm_portfolio_add_scripts() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function open_cup_edit_game_details( $game ) { | |
?> | |
<div class="game-details"> | |
<h2><?php esc_html_e( 'Game Information', 'sports-bench' ); ?></h2> | |
<div class="field one-column"> | |
<label for="game-status"><?php esc_html_e( 'Status', 'sports-bench' ); ?></label> | |
<select id="game-status" name="game_status"> | |
<option value="" <?php selected( $game['game_status'], '' ); ?>><?php esc_html_e( 'Select a Status', 'sports-bench' ); ?></option> | |
<option value="scheduled" <?php selected( $game['game_status'], 'scheduled' ); ?>><?php esc_html_e( 'Scheduled', 'sports-bench' ); ?></option> | |
<option value="in_progress" <?php selected( $game['game_status'], 'in_progress' ); ?>><?php esc_html_e( 'In Progress', 'sports-bench' ); ?></option> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php class Sports_Bench_Team_REST_Controller extends WP_REST_Controller { | |
/** | |
* Register the routes for the objects of the controller. | |
*/ | |
public function register_routes() { | |
$namespace = 'sportsbench'; | |
$base = 'teams'; | |
register_rest_route( $namespace, '/' . $base, array( | |
array( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* WP_Rig\WP_Rig\Theme class | |
* | |
* @package wp_rig | |
*/ | |
namespace WP_Rig\WP_Rig; | |
use InvalidArgumentException; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* WP_Rig\WP_Rig\Categories\Component class | |
* | |
* @package wp_rig | |
* | |
* This file should be inside your /inc/Categories directory. | |
*/ | |
namespace WP_Rig\WP_Rig\Categories; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wp_localize_script( | |
'sportsbench-blocks-js', | |
'sportsbench_globals', | |
[ | |
'rest_url' => esc_url( rest_url() ), | |
'nonce' => wp_create_nonce( 'wp_rest' ), | |
'sport' => get_option( 'sports-bench-sport' ) | |
]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Sports-bench-team-rest-controller.php | |
* | |
* Creates a REST API controller for teams | |
* | |
* @package Sports Bench | |
* | |
* @author Jacob Martella | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery( function() { | |
$( ".sports-bench-playoff-modal" ).dialog({ | |
autoOpen: false, | |
show: { | |
effect: "blind", | |
duration: 1000 | |
}, | |
hide: { | |
effect: "explode", | |
duration: 1000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wp_enqueue_script( 'jquery' ); | |
wp_enqueue_script( 'jquery-ui-dialog' ); | |
wp_enqueue_style( '//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function sports_bench_do_playoff_series_modal( $html, $series, $team_one, $team_one_name, $team_two, $team_two_name, $game_numbers ) { | |
$html .= '<div class="reveal sports-bench-playoff-modal" id="series-' . $series->series_id . '" data-reveal>'; | |
$html .= '<table class="series-modal-top">'; | |
$html .= '<tr>'; | |
$html .= '<td class="modal-logo">' . $team_one->get_team_photo( 'team-logo' ) . '</td>'; | |
$html .= '<td class="modal-team-name team-one-name">' . $team_one_name . '</td>'; | |
$html .= '<td class="modal-score">' . $series->get_series_score() . '</td>'; | |
$html .= '<td class="modal-team-name team-two-name">' . $team_two_name . '</td>'; | |
$html .= '<td class="modal-logo">' . $team_two->get_team_photo( 'team-logo' ) . '</td>'; | |
$html .= '</tr>'; |
NewerOlder