Plugin rename
This commit is contained in:
@@ -16,10 +16,10 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||
* @param int $activity_id The ID of the activity to update. 0 for new activity.
|
||||
* @return int|false The ID of the saved/updated activity, or false on failure.
|
||||
*/
|
||||
function mystat_save_activity_data( array $data, int $activity_id = 0 ) {
|
||||
function statpress_save_activity_data( array $data, int $activity_id = 0 ) {
|
||||
global $wpdb;
|
||||
|
||||
$table_activities = $wpdb->prefix . 'mystat_activities';
|
||||
$table_activities = $wpdb->prefix . 'statpress_activities';
|
||||
|
||||
// Helper to convert empty strings to NULL for the database.
|
||||
$null_if_empty = function( $value ) {
|
||||
|
||||
@@ -9,7 +9,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||
* @param string $gpx_url The URL of the GPX file.
|
||||
* @return array An array containing 'points' for the map and 'elevation_profile'.
|
||||
*/
|
||||
function mystat_parse_gpx_data( $gpx_url ) {
|
||||
function statpress_parse_gpx_data( $gpx_url ) {
|
||||
if ( empty( $gpx_url ) ) {
|
||||
return array();
|
||||
}
|
||||
@@ -26,7 +26,7 @@ function mystat_parse_gpx_data( $gpx_url ) {
|
||||
}
|
||||
|
||||
// --- Privacy Zone ---
|
||||
$privacy_options = get_option( 'mystat_privacy_options' );
|
||||
$privacy_options = get_option( 'statpress_privacy_options' );
|
||||
$privacy_enabled = ! empty( $privacy_options['latitude'] ) && ! empty( $privacy_options['longitude'] ) && ! empty( $privacy_options['radius'] );
|
||||
$privacy_center_lat = $privacy_enabled ? (float) $privacy_options['latitude'] : 0;
|
||||
$privacy_center_lon = $privacy_enabled ? (float) $privacy_options['longitude'] : 0;
|
||||
|
||||
@@ -9,7 +9,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||
* @param array $mimes Allowed mime types.
|
||||
* @return array Modified mime types.
|
||||
*/
|
||||
function mystat_add_gpx_mime_type( $mimes ) {
|
||||
function statpress_add_gpx_mime_type( $mimes ) {
|
||||
$mimes['gpx'] = 'application/gpx+xml';
|
||||
return $mimes;
|
||||
}
|
||||
@@ -24,7 +24,7 @@ function mystat_add_gpx_mime_type( $mimes ) {
|
||||
* @param array $mimes Mime types.
|
||||
* @return array Modified file data.
|
||||
*/
|
||||
function mystat_fix_gpx_upload_permission( $data, $file, $filename, $mimes ) {
|
||||
function statpress_fix_gpx_upload_permission( $data, $file, $filename, $mimes ) {
|
||||
if ( strtolower( pathinfo( $filename, PATHINFO_EXTENSION ) ) === 'gpx' ) {
|
||||
$data['ext'] = 'gpx';
|
||||
$data['type'] = 'application/gpx+xml';
|
||||
|
||||
Reference in New Issue
Block a user