diff --git a/defaults.php b/defaults.php deleted file mode 100644 index 117870a5..00000000 --- a/defaults.php +++ /dev/null @@ -1,14 +0,0 @@ - array( - 'sp_event_team_count' => 2, - ), -); - -foreach( $sp_options as $optiongroupkey => $optiongroup ) { - foreach( $optiongroup as $key => $value ) { - if ( get_option( $key ) === false ) - update_option( $key, $value ); - } -} -?> \ No newline at end of file diff --git a/event.php b/event.php index 6ebfdbe5..d2ec3654 100644 --- a/event.php +++ b/event.php @@ -47,7 +47,7 @@ add_filter( 'gettext', 'sp_event_text_replace', 20, 3 ); function sp_event_meta_init() { remove_meta_box( 'submitdiv', 'sp_event', 'side' ); - add_meta_box( 'submitdiv', __( 'Kick-off', 'sportspress' ), 'post_submit_meta_box', 'sp_event', 'side', 'high' ); + add_meta_box( 'submitdiv', __( 'Event', 'sportspress' ), 'post_submit_meta_box', 'sp_event', 'side', 'high' ); add_meta_box( 'sp_teamdiv', __( 'Teams', 'sportspress' ), 'sp_event_team_meta', 'sp_event', 'normal', 'high' ); add_meta_box( 'sp_articlediv', __( 'Article', 'sportspress' ), 'sp_event_article_meta', 'sp_event', 'normal', 'high' ); } diff --git a/filters.php b/filters.php index 580f5a9f..b4469475 100644 --- a/filters.php +++ b/filters.php @@ -1,5 +1,5 @@ $value ): + $translated_text = str_replace( __( $key ), $value, $translated_text ); + endforeach; + endif; + return $translated_text; +} +add_filter( 'admin_post_thumbnail_html', 'sp_admin_post_thumbnail_html', 10, 2 ); ?> \ No newline at end of file diff --git a/globals.php b/globals.php new file mode 100644 index 00000000..dc97d9a0 --- /dev/null +++ b/globals.php @@ -0,0 +1,36 @@ + array( + 'sp_event_team_count' => 2, + ) +); + +$sportspress_texts = array( + 'sp_team' => array( + 'Enter title here' => __( 'Team', 'sportspress' ), + 'Set featured image' => sprintf( __( 'Add %s', 'sportspress' ), __( 'Logo', 'sportspress' ) ), + 'Set Featured Image' => sprintf( __( 'Add %s', 'sportspress' ), __( 'Logo', 'sportspress' ) ), + 'Parent' => sprintf( __( 'Parent %s', 'sportspress' ), __( 'Team', 'sportspress' ) ), + 'Remove featured image' => sprintf( __( 'Remove %s', 'sportspress' ), __( 'Logo', 'sportspress' ) ) + ), + 'sp_player' => array( + 'Enter title here' => __( 'Name', 'sportspress' ), + 'Set featured image' => sprintf( __( 'Add %s', 'sportspress' ), __( 'Photo', 'sportspress' ) ), + 'Set Featured Image' => sprintf( __( 'Add %s', 'sportspress' ), __( 'Photo', 'sportspress' ) ), + 'Remove featured image' => sprintf( __( 'Remove %s', 'sportspress' ), __( 'Photo', 'sportspress' ) ) + ), + 'sp_staff' => array( + 'Enter title here' => __( 'Name', 'sportspress' ), + 'Set featured image' => sprintf( __( 'Add %s', 'sportspress' ), __( 'Photo', 'sportspress' ) ), + 'Set Featured Image' => sprintf( __( 'Add %s', 'sportspress' ), __( 'Photo', 'sportspress' ) ), + 'Remove featured image' => sprintf( __( 'Remove %s', 'sportspress' ), __( 'Photo', 'sportspress' ) ) + ) +); + +foreach( $sportspress_options as $optiongroupkey => $optiongroup ) { + foreach( $optiongroup as $key => $value ) { + if ( get_option( $key ) === false ) + update_option( $key, $value ); + } +} +?> \ No newline at end of file diff --git a/helpers.php b/helpers.php index b95f66b0..6c80a571 100644 --- a/helpers.php +++ b/helpers.php @@ -12,7 +12,7 @@ if ( ! function_exists( 'sp_get_cpt_labels' ) ) { 'search_items' => sprintf( __( 'Search %s', 'sportspress' ), $name ), 'not_found' => sprintf( __( 'No %s found', 'sportspress' ), $name ), 'not_found_in_trash' => sprintf( __( 'No %s found in trash', 'sportspress' ), $name ), - 'parent_item_colon' => sprintf( __( 'Parent %s:', 'sportspress' ), $singular_name ), + 'parent_item_colon' => sprintf( __( 'Parent %s:', 'sportspress' ), $singular_name ) ); return $labels; } @@ -32,7 +32,7 @@ if ( ! function_exists( 'sp_get_tax_labels' ) ) { 'parent_item' => sprintf( __( 'Parent %s', 'sportspress' ), __( $singular_name, 'sportspress' ) ), 'parent_item_colon' => sprintf( __( 'Parent %s:', 'sportspress' ), __( $singular_name, 'sportspress' ) ), 'search_items' => sprintf( __( 'Search %s', 'sportspress' ), __( $name, 'sportspress' ) ), - 'not_found' => sprintf( __( 'No %s found', 'sportspress' ), __( $name, 'sportspress' ) ), + 'not_found' => sprintf( __( 'No %s found', 'sportspress' ), __( $name, 'sportspress' ) ) ); return $labels; } @@ -125,9 +125,6 @@ if ( ! function_exists( 'sp_team_select_html' ) ) { if ( ! isset( $post_id ) ) global $post_id; ?> -