56
+              "aot": true,
57
+              "extractLicenses": true,
58
+              "vendorChunk": false,
59
+              "buildOptimizer": true,
60
+              "budgets": [
61
+                {
62
+                  "type": "initial",
63
+                  "maximumWarning": "2mb",
64
+                  "maximumError": "5mb"
65
+                }
66
+              ]
67
+            },
68
+            "ci": {
69
+              "progress": false
70
+            }
71
+          }
72
+        },
73
+        "serve": {
74
+          "builder": "@angular-devkit/build-angular:dev-server",
75
+          "options": {
76
+            "browserTarget": "app:build"
77
+          },
78
+          "configurations": {
79
+            "production": {
80
+              "browserTarget": "app:build:production"
81
+            },
82
+            "ci": {
83
+              "progress": false
84
+            }
85
+          }
86
+        },
87
+        "extract-i18n": {
88
+          "builder": "@angular-devkit/build-angular:extract-i18n",
89
+          "options": {
90
+            "browserTarget": "app:build"
91
+          }
92
+        },
93
+        "test": {
94
+          "builder": "@angular-devkit/build-angular:karma",
95
+          "options": {
96
+            "main": "src/test.ts",
97
+            "polyfills": "src/polyfills.ts",
98
+            "tsConfig": "tsconfig.spec.json",
99
+            "karmaConfig": "karma.conf.js",
100
+            "styles": [],
101
+            "scripts": [],
102
+            "assets": [
103
+              {
104
+                "glob": "favicon.ico",
105
+                "input": "src/",
106
+                "output": "/"
107
+              },
108
+              {
109
+                "glob": "**/*",
110
+                "input": "src/assets",
111
+                "output": "/assets"
112
+              }
113
+            ]
114
+          },
115
+          "configurations": {
116
+            "ci": {
117
+              "progress": false,
118
+              "watch": false
119
+            }
120
+          }
121
+        },
122
+        "lint": {
123
+          "builder": "@angular-eslint/builder:lint",
124
+          "options": {
125
+            "lintFilePatterns": [
126
+              "src/**/*.ts",
127
+              "src/**/*.html"
128
+            ]
129
+          }
130
+        },
131
+        "e2e": {
132
+          "builder": "@angular-devkit/build-angular:protractor",
133
+          "options": {
134
+            "protractorConfig": "e2e/protractor.conf.js",
135
+            "devServerTarget": "app:serve"
136
+          },
137
+          "configurations": {
138
+            "production": {
139
+              "devServerTarget": "app:serve:production"
140
+            },
141
+            "ci": {
142
+              "devServerTarget": "app:serve:ci"
143
+            }
144
+          }
145
+        },
146
+        "ionic-cordova-build": {
147
+          "builder": "@ionic/angular-toolkit:cordova-build",
148
+          "options": {
149
+            "browserTarget": "app:build"
150
+          },
151
+          "configurations": {
152
+            "production": {
153
+              "browserTarget": "app:build:production"
154
+            }
155
+          }
156
+        },
157
+        "ionic-cordova-serve": {
158
+          "builder": "@ionic/angular-toolkit:cordova-serve",
159
+          "options": {
160
+            "cordovaBuildTarget": "app:ionic-cordova-build",
161
+            "devServerTarget": "app:serve"
162
+          },
163
+          "configurations": {
164
+            "production": {
165
+              "cordovaBuildTarget": "app:ionic-cordova-build:production",
166
+              "devServerTarget": "app:serve:production"
167
+            }
168
+          }
169
+        }
170
+      }
171
+    }
172
+  },
173
+  "cli": {
174
+    "analytics": false,
175
+    "defaultCollection": "@ionic/angular-toolkit"
176
+  },
177
+  "schematics": {
178
+    "@ionic/angular-toolkit:component": {
179
+      "styleext": "scss"
180
+    },
181
+    "@ionic/angular-toolkit:page": {
182
+      "styleext": "scss"
183
+    }
184
+  }
185
+}

+ 10 - 0
capacitor.config.ts

@@ -0,0 +1,10 @@
1
+import { CapacitorConfig } from '@capacitor/cli';
2
+
3
+const config: CapacitorConfig = {
4
+  appId: 'io.ionic.starter',
5
+  appName: 'Tune2Win',
6
+  webDir: 'www',
7
+  bundledWebRuntime: false
8
+};
9
+
10
+export default config;

+ 37 - 0
e2e/protractor.conf.js

@@ -0,0 +1,37 @@
1
+// @ts-check
2
+// Protractor configuration file, see link for more information
3
+// https://github.com/angular/protractor/blob/master/lib/config.ts
4
+
5
+const { SpecReporter, StacktraceOption } = require('jasmine-spec-reporter');
6
+
7
+/**
8
+ * @type { import("protractor").Config }
9
+ */
10
+exports.config = {
11
+  allScriptsTimeout: 11000,
12
+  specs: [
13
+    './src/**/*.e2e-spec.ts'
14
+  ],
15
+  capabilities: {
16
+    browserName: 'chrome'
17
+  },
18
+  directConnect: true,
19
+  SELENIUM_PROMISE_MANAGER: false,
20
+  baseUrl: 'http://localhost:4200/',
21
+  framework: 'jasmine',
22
+  jasmineNodeOpts: {
23
+    showColors: true,
24
+    defaultTimeoutInterval: 30000,
25
+    print: function() {}
26
+  },
27
+  onPrepare() {
28
+    require('ts-node').register({
29
+      project: require('path').join(__dirname, './tsconfig.json')
30
+    });
31
+    jasmine.getEnv().addReporter(new SpecReporter({
32
+      spec: {
33
+        displayStacktrace: StacktraceOption.PRETTY
34
+      }
35
+    }));
36
+  }
37
+};

+ 14 - 0
e2e/src/app.e2e-spec.ts

@@ -0,0 +1,14 @@
1
+import { AppPage } from './app.po';
2
+
3
+describe('new App', () => {
4
+  let page: AppPage;
5
+
6
+  beforeEach(() => {
7
+    page = new AppPage();
8
+  });
9
+
10
+  it('should display welcome message', () => {
11
+    page.navigateTo();
12
+    expect(page.getPageTitle()).toContain('Tab 1');
13
+  });
14
+});

+ 11 - 0
e2e/src/app.po.ts

@@ -0,0 +1,11 @@
1
+import { browser, by, element } from 'protractor';
2
+
3
+export class AppPage {
4
+  navigateTo() {
5
+    return browser.get('/');
6
+  }
7
+
8
+  getPageTitle() {
9
+    return element(by.css('ion-title')).getText();
10
+  }
11
+}

+ 12 - 0
e2e/tsconfig.json

@@ -0,0 +1,12 @@
1
+{
2
+  "extends": "../tsconfig.json",
3
+  "compilerOptions": {
4
+    "outDir": "../out-tsc/e2e",
5
+    "module": "commonjs",
6
+    "target": "es2018",
7
+    "types": [
8
+      "jasmine",
9
+      "node"
10
+    ]
11
+  }
12
+}

+ 7 - 0
ionic.config.json

@@ -0,0 +1,7 @@
1
+{
2
+  "name": "Tune2Win",
3
+  "integrations": {
4
+    "capacitor": {}
5
+  },
6
+  "type": "angular"
7
+}

+ 9 - 0
ios/.gitignore

@@ -0,0 +1,9 @@
1
+App/build
2
+App/Pods
3
+App/Podfile.lock
4
+App/App/public
5
+DerivedData
6
+xcuserdata
7
+
8
+# Cordova plugins for Capacitor
9
+capacitor-cordova-ios-plugins

+ 416 - 0
ios/App/App.xcodeproj/project.pbxproj

@@ -0,0 +1,416 @@
1
+// !$*UTF8*$!
2
+{
3
+	archiveVersion = 1;
4
+	classes = {
5
+	};
6
+	objectVersion = 48;
7
+	objects = {
8
+
9
+/* Begin PBXBuildFile section */
10
+		1EDEF1D527C21110006F183C /* HealthKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1EDEF1D427C21110006F183C /* HealthKit.framework */; };
11
+		2FAD9763203C412B000D30F8 /* config.xml in Resources */ = {isa = PBXBuildFile; fileRef = 2FAD9762203C412B000D30F8 /* config.xml */; };
12
+		50379B232058CBB4000EE86E /* capacitor.config.json in Resources */ = {isa = PBXBuildFile; fileRef = 50379B222058CBB4000EE86E /* capacitor.config.json */; };
13
+		504EC3081FED79650016851F /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 504EC3071FED79650016851F /* AppDelegate.swift */; };
14
+		504EC30D1FED79650016851F /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 504EC30B1FED79650016851F /* Main.storyboard */; };
15
+		504EC30F1FED79650016851F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 504EC30E1FED79650016851F /* Assets.xcassets */; };
16
+		504EC3121FED79650016851F /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 504EC3101FED79650016851F /* LaunchScreen.storyboard */; };
17
+		50B271D11FEDC1A000F3C39B /* public in Resources */ = {isa = PBXBuildFile; fileRef = 50B271D01FEDC1A000F3C39B /* public */; };
18
+		A084ECDBA7D38E1E42DFC39D /* Pods_App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AF277DCFFFF123FFC6DF26C7 /* Pods_App.framework */; };
19
+/* End PBXBuildFile section */
20
+
21
+/* Begin PBXFileReference section */
22
+		1EDEF1D327C21110006F183C /* App.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = App.entitlements; sourceTree = "<group>"; };
23
+		1EDEF1D427C21110006F183C /* HealthKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = HealthKit.framework; path = System/Library/Frameworks/HealthKit.framework; sourceTree = SDKROOT; };
24
+		2FAD9762203C412B000D30F8 /* config.xml */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = config.xml; sourceTree = "<group>"; };
25
+		50379B222058CBB4000EE86E /* capacitor.config.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = capacitor.config.json; sourceTree = "<group>"; };
26
+		504EC3041FED79650016851F /* App.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = App.app; sourceTree = BUILT_PRODUCTS_DIR; };
27
+		504EC3071FED79650016851F /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
28
+		504EC30C1FED79650016851F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
29
+		504EC30E1FED79650016851F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
30
+		504EC3111FED79650016851F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
31
+		504EC3131FED79650016851F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
32
+		50B271D01FEDC1A000F3C39B /* public */ = {isa = PBXFileReference; lastKnownFileType = folder; path = public; sourceTree = "<group>"; };
33
+		AF277DCFFFF123FFC6DF26C7 /* Pods_App.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_App.framework; sourceTree = BUILT_PRODUCTS_DIR; };
34
+		AF51FD2D460BCFE21FA515B2 /* Pods-App.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-App.release.xcconfig"; path = "Pods/Target Support Files/Pods-App/Pods-App.release.xcconfig"; sourceTree = "<group>"; };
35
+		FC68EB0AF532CFC21C3344DD /* Pods-App.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-App.debug.xcconfig"; path = "Pods/Target Support Files/Pods-App/Pods-App.debug.xcconfig"; sourceTree = "<group>"; };
36
+/* End PBXFileReference section */
37
+
38
+/* Begin PBXFrameworksBuildPhase section */
39
+		504EC3011FED79650016851F /* Frameworks */ = {
40
+			isa = PBXFrameworksBuildPhase;
41
+			buildActionMask = 2147483647;
42
+			files = (
43
+				A084ECDBA7D38E1E42DFC39D /* Pods_App.framework in Frameworks */,
44
+				1EDEF1D527C21110006F183C /* HealthKit.framework in Frameworks */,
45
+			);
46
+			runOnlyForDeploymentPostprocessing = 0;
47
+		};
48
+/* End PBXFrameworksBuildPhase section */
49
+
50
+/* Begin PBXGroup section */
51
+		27E2DDA53C4D2A4D1A88CE4A /* Frameworks */ = {
52
+			isa = PBXGroup;
53
+			children = (
54
+				1EDEF1D427C21110006F183C /* HealthKit.framework */,
55
+				AF277DCFFFF123FFC6DF26C7 /* Pods_App.framework */,
56
+			);
57
+			name = Frameworks;
58
+			sourceTree = "<group>";
59
+		};
60
+		504EC2FB1FED79650016851F = {
61
+			isa = PBXGroup;
62
+			children = (
63
+				504EC3061FED79650016851F /* App */,
64
+				504EC3051FED79650016851F /* Products */,
65
+				7F8756D8B27F46E3366F6CEA /* Pods */,
66
+				27E2DDA53C4D2A4D1A88CE4A /* Frameworks */,
67
+			);
68
+			sourceTree = "<group>";
69
+		};
70
+		504EC3051FED79650016851F /* Products */ = {
71
+			isa = PBXGroup;
72
+			children = (
73
+				504EC3041FED79650016851F /* App.app */,
74
+			);
75
+			name = Products;
76
+			sourceTree = "<group>";
77
+		};
78
+		504EC3061FED79650016851F /* App */ = {
79
+			isa = PBXGroup;
80
+			children = (
81
+				1EDEF1D327C21110006F183C /* App.entitlements */,
82
+				50379B222058CBB4000EE86E /* capacitor.config.json */,
83
+				504EC3071FED79650016851F /* AppDelegate.swift */,
84
+				504EC30B1FED79650016851F /* Main.storyboard */,
85
+				504EC30E1FED79650016851F /* Assets.xcassets */,
86
+				504EC3101FED79650016851F /* LaunchScreen.storyboard */,
87
+				504EC3131FED79650016851F /* Info.plist */,
88
+				2FAD9762203C412B000D30F8 /* config.xml */,
89
+				50B271D01FEDC1A000F3C39B /* public */,
90
+			);
91
+			path = App;
92
+			sourceTree = "<group>";
93
+		};
94
+		7F8756D8B27F46E3366F6CEA /* Pods */ = {
95
+			isa = PBXGroup;
96
+			children = (
97
+				FC68EB0AF532CFC21C3344DD /* Pods-App.debug.xcconfig */,
98
+				AF51FD2D460BCFE21FA515B2 /* Pods-App.release.xcconfig */,
99
+			);
100
+			name = Pods;
101
+			sourceTree = "<group>";
102
+		};
103
+/* End PBXGroup section */
104
+
105
+/* Begin PBXNativeTarget section */
106
+		504EC3031FED79650016851F /* App */ = {
107
+			isa = PBXNativeTarget;
108
+			buildConfigurationList = 504EC3161FED79650016851F /* Build configuration list for PBXNativeTarget "App" */;
109
+			buildPhases = (
110
+				6634F4EFEBD30273BCE97C65 /* [CP] Check Pods Manifest.lock */,
111
+				504EC3001FED79650016851F /* Sources */,
112
+				504EC3011FED79650016851F /* Frameworks */,
113
+				504EC3021FED79650016851F /* Resources */,
114
+				9592DBEFFC6D2A0C8D5DEB22 /* [CP] Embed Pods Frameworks */,
115
+			);
116
+			buildRules = (
117
+			);
118
+			dependencies = (
119
+			);
120
+			name = App;
121
+			productName = App;
122
+			productReference = 504EC3041FED79650016851F /* App.app */;
123
+			productType = "com.apple.product-type.application";
124
+		};
125
+/* End PBXNativeTarget section */
126
+
127
+/* Begin PBXProject section */
128
+		504EC2FC1FED79650016851F /* Project object */ = {
129
+			isa = PBXProject;
130
+			attributes = {
131
+				LastSwiftUpdateCheck = 0920;
132
+				LastUpgradeCheck = 0920;
133
+				TargetAttributes = {
134
+					504EC3031FED79650016851F = {
135
+						CreatedOnToolsVersion = 9.2;
136
+						LastSwiftMigration = 1100;
137
+						ProvisioningStyle = Automatic;
138
+					};
139
+				};
140
+			};
141
+			buildConfigurationList = 504EC2FF1FED79650016851F /* Build configuration list for PBXProject "App" */;
142
+			compatibilityVersion = "Xcode 8.0";
143
+			developmentRegion = en;
144
+			hasScannedForEncodings = 0;
145
+			knownRegions = (
146
+				en,
147
+				Base,
148
+			);
149
+			mainGroup = 504EC2FB1FED79650016851F;
150
+			productRefGroup = 504EC3051FED79650016851F /* Products */;
151
+			projectDirPath = "";
152
+			projectRoot = "";
153
+			targets = (
154
+				504EC3031FED79650016851F /* App */,
155
+			);
156
+		};
157
+/* End PBXProject section */
158
+
159
+/* Begin PBXResourcesBuildPhase section */
160
+		504EC3021FED79650016851F /* Resources */ = {
161
+			isa = PBXResourcesBuildPhase;
162
+			buildActionMask = 2147483647;
163
+			files = (
164
+				504EC3121FED79650016851F /* LaunchScreen.storyboard in Resources */,
165
+				50B271D11FEDC1A000F3C39B /* public in Resources */,
166
+				504EC30F1FED79650016851F /* Assets.xcassets in Resources */,
167
+				50379B232058CBB4000EE86E /* capacitor.config.json in Resources */,
168
+				504EC30D1FED79650016851F /* Main.storyboard in Resources */,
169
+				2FAD9763203C412B000D30F8 /* config.xml in Resources */,
170
+			);
171
+			runOnlyForDeploymentPostprocessing = 0;
172
+		};
173
+/* End PBXResourcesBuildPhase section */
174
+
175
+/* Begin PBXShellScriptBuildPhase section */
176
+		6634F4EFEBD30273BCE97C65 /* [CP] Check Pods Manifest.lock */ = {
177
+			isa = PBXShellScriptBuildPhase;
178
+			buildActionMask = 2147483647;
179
+			files = (
180
+			);
181
+			inputPaths = (
182
+				"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
183
+				"${PODS_ROOT}/Manifest.lock",
184
+			);
185
+			name = "[CP] Check Pods Manifest.lock";
186
+			outputPaths = (
187
+				"$(DERIVED_FILE_DIR)/Pods-App-checkManifestLockResult.txt",
188
+			);
189
+			runOnlyForDeploymentPostprocessing = 0;
190
+			shellPath = /bin/sh;
191
+			shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n    # print error to STDERR\n    echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n    exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
192
+			showEnvVarsInLog = 0;
193
+		};
194
+		9592DBEFFC6D2A0C8D5DEB22 /* [CP] Embed Pods Frameworks */ = {
195
+			isa = PBXShellScriptBuildPhase;
196
+			buildActionMask = 2147483647;
197
+			files = (
198
+			);
199
+			inputPaths = (
200
+			);
201
+			name = "[CP] Embed Pods Frameworks";
202
+			outputPaths = (
203
+			);
204
+			runOnlyForDeploymentPostprocessing = 0;
205
+			shellPath = /bin/sh;
206
+			shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-App/Pods-App-frameworks.sh\"\n";
207
+			showEnvVarsInLog = 0;
208
+		};
209
+/* End PBXShellScriptBuildPhase section */
210
+
211
+/* Begin PBXSourcesBuildPhase section */
212
+		504EC3001FED79650016851F /* Sources */ = {
213
+			isa = PBXSourcesBuildPhase;
214
+			buildActionMask = 2147483647;
215
+			files = (
216
+				504EC3081FED79650016851F /* AppDelegate.swift in Sources */,
217
+			);
218
+			runOnlyForDeploymentPostprocessing = 0;
219
+		};
220
+/* End PBXSourcesBuildPhase section */
221
+
222
+/* Begin PBXVariantGroup section */
223
+		504EC30B1FED79650016851F /* Main.storyboard */ = {
224
+			isa = PBXVariantGroup;
225
+			children = (
226
+				504EC30C1FED79650016851F /* Base */,
227
+			);
228
+			name = Main.storyboard;
229
+			sourceTree = "<group>";
230
+		};
231
+		504EC3101FED79650016851F /* LaunchScreen.storyboard */ = {
232
+			isa = PBXVariantGroup;
233
+			children = (
234
+				504EC3111FED79650016851F /* Base */,
235
+			);
236
+			name = LaunchScreen.storyboard;
237
+			sourceTree = "<group>";
238
+		};
239
+/* End PBXVariantGroup section */
240
+
241
+/* Begin XCBuildConfiguration section */
242
+		504EC3141FED79650016851F /* Debug */ = {
243
+			isa = XCBuildConfiguration;
244
+			buildSettings = {
245
+				ALWAYS_SEARCH_USER_PATHS = NO;
246
+				CLANG_ANALYZER_NONNULL = YES;
247
+				CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
248
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
249
+				CLANG_CXX_LIBRARY = "libc++";
250
+				CLANG_ENABLE_MODULES = YES;
251
+				CLANG_ENABLE_OBJC_ARC = YES;
252
+				CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
253
+				CLANG_WARN_BOOL_CONVERSION = YES;
254
+				CLANG_WARN_COMMA = YES;
255
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
256
+				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
257
+				CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
258
+				CLANG_WARN_EMPTY_BODY = YES;
259
+				CLANG_WARN_ENUM_CONVERSION = YES;
260
+				CLANG_WARN_INFINITE_RECURSION = YES;
261
+				CLANG_WARN_INT_CONVERSION = YES;
262
+				CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
263
+				CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
264
+				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
265
+				CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
266
+				CLANG_WARN_STRICT_PROTOTYPES = YES;
267
+				CLANG_WARN_SUSPICIOUS_MOVE = YES;
268
+				CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
269
+				CLANG_WARN_UNREACHABLE_CODE = YES;
270
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
271
+				CODE_SIGN_IDENTITY = "iPhone Developer";
272
+				COPY_PHASE_STRIP = NO;
273
+				DEBUG_INFORMATION_FORMAT = dwarf;
274
+				ENABLE_STRICT_OBJC_MSGSEND = YES;
275
+				ENABLE_TESTABILITY = YES;
276
+				GCC_C_LANGUAGE_STANDARD = gnu11;
277
+				GCC_DYNAMIC_NO_PIC = NO;
278
+				GCC_NO_COMMON_BLOCKS = YES;
279
+				GCC_OPTIMIZATION_LEVEL = 0;
280
+				GCC_PREPROCESSOR_DEFINITIONS = (
281
+					"DEBUG=1",
282
+					"$(inherited)",
283
+				);
284
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
285
+				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
286
+				GCC_WARN_UNDECLARED_SELECTOR = YES;
287
+				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
288
+				GCC_WARN_UNUSED_FUNCTION = YES;
289
+				GCC_WARN_UNUSED_VARIABLE = YES;
290
+				IPHONEOS_DEPLOYMENT_TARGET = 12.0;
291
+				MTL_ENABLE_DEBUG_INFO = YES;
292
+				ONLY_ACTIVE_ARCH = YES;
293
+				SDKROOT = iphoneos;
294
+				SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
295
+				SWIFT_OPTIMIZATION_LEVEL = "-Onone";
296
+			};
297
+			name = Debug;
298
+		};
299
+		504EC3151FED79650016851F /* Release */ = {
300
+			isa = XCBuildConfiguration;
301
+			buildSettings = {
302
+				ALWAYS_SEARCH_USER_PATHS = NO;
303
+				CLANG_ANALYZER_NONNULL = YES;
304
+				CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
305
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
306
+				CLANG_CXX_LIBRARY = "libc++";
307
+				CLANG_ENABLE_MODULES = YES;
308
+				CLANG_ENABLE_OBJC_ARC = YES;
309
+				CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
310
+				CLANG_WARN_BOOL_CONVERSION = YES;
311
+				CLANG_WARN_COMMA = YES;
312
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
313
+				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
314
+				CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
315
+				CLANG_WARN_EMPTY_BODY = YES;
316
+				CLANG_WARN_ENUM_CONVERSION = YES;
317
+				CLANG_WARN_INFINITE_RECURSION = YES;
318
+				CLANG_WARN_INT_CONVERSION = YES;
319
+				CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
320
+				CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
321
+				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
322
+				CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
323
+				CLANG_WARN_STRICT_PROTOTYPES = YES;
324
+				CLANG_WARN_SUSPICIOUS_MOVE = YES;
325
+				CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
326
+				CLANG_WARN_UNREACHABLE_CODE = YES;
327
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
328
+				CODE_SIGN_IDENTITY = "iPhone Developer";
329
+				COPY_PHASE_STRIP = NO;
330
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
331
+				ENABLE_NS_ASSERTIONS = NO;
332
+				ENABLE_STRICT_OBJC_MSGSEND = YES;
333
+				GCC_C_LANGUAGE_STANDARD = gnu11;
334
+				GCC_NO_COMMON_BLOCKS = YES;
335
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
336
+				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
337
+				GCC_WARN_UNDECLARED_SELECTOR = YES;
338
+				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
339
+				GCC_WARN_UNUSED_FUNCTION = YES;
340
+				GCC_WARN_UNUSED_VARIABLE = YES;
341
+				IPHONEOS_DEPLOYMENT_TARGET = 12.0;
342
+				MTL_ENABLE_DEBUG_INFO = NO;
343
+				SDKROOT = iphoneos;
344
+				SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
345
+				VALIDATE_PRODUCT = YES;
346
+			};
347
+			name = Release;
348
+		};
349
+		504EC3171FED79650016851F /* Debug */ = {
350
+			isa = XCBuildConfiguration;
351
+			baseConfigurationReference = FC68EB0AF532CFC21C3344DD /* Pods-App.debug.xcconfig */;
352
+			buildSettings = {
353
+				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
354
+				CODE_SIGN_ENTITLEMENTS = App/App.entitlements;
355
+				CODE_SIGN_IDENTITY = "Apple Development";
356
+				CODE_SIGN_STYLE = Automatic;
357
+				DEVELOPMENT_TEAM = 5QTJEGL2H2;
358
+				INFOPLIST_FILE = App/Info.plist;
359
+				IPHONEOS_DEPLOYMENT_TARGET = 12.0;
360
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
361
+				OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" \"-DDEBUG\"";
362
+				PRODUCT_BUNDLE_IDENTIFIER = net.simplico.tune2win;
363
+				PRODUCT_NAME = "$(TARGET_NAME)";
364
+				PROVISIONING_PROFILE_SPECIFIER = "";
365
+				SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
366
+				SWIFT_VERSION = 5.0;
367
+				TARGETED_DEVICE_FAMILY = "1,2";
368
+			};
369
+			name = Debug;
370
+		};
371
+		504EC3181FED79650016851F /* Release */ = {
372
+			isa = XCBuildConfiguration;
373
+			baseConfigurationReference = AF51FD2D460BCFE21FA515B2 /* Pods-App.release.xcconfig */;
374
+			buildSettings = {
375
+				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
376
+				CODE_SIGN_ENTITLEMENTS = App/App.entitlements;
377
+				CODE_SIGN_IDENTITY = "Apple Development";
378
+				CODE_SIGN_STYLE = Automatic;
379
+				DEVELOPMENT_TEAM = 5QTJEGL2H2;
380
+				INFOPLIST_FILE = App/Info.plist;
381
+				IPHONEOS_DEPLOYMENT_TARGET = 12.0;
382
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
383
+				PRODUCT_BUNDLE_IDENTIFIER = net.simplico.tune2win;
384
+				PRODUCT_NAME = "$(TARGET_NAME)";
385
+				PROVISIONING_PROFILE_SPECIFIER = "";
386
+				SWIFT_ACTIVE_COMPILATION_CONDITIONS = "";
387
+				SWIFT_VERSION = 5.0;
388
+				TARGETED_DEVICE_FAMILY = "1,2";
389
+			};
390
+			name = Release;
391
+		};
392
+/* End XCBuildConfiguration section */
393
+
394
+/* Begin XCConfigurationList section */
395
+		504EC2FF1FED79650016851F /* Build configuration list for PBXProject "App" */ = {
396
+			isa = XCConfigurationList;
397
+			buildConfigurations = (
398
+				504EC3141FED79650016851F /* Debug */,
399
+				504EC3151FED79650016851F /* Release */,
400
+			);
401
+			defaultConfigurationIsVisible = 0;
402
+			defaultConfigurationName = Release;
403
+		};
404
+		504EC3161FED79650016851F /* Build configuration list for PBXNativeTarget "App" */ = {
405
+			isa = XCConfigurationList;
406
+			buildConfigurations = (
407
+				504EC3171FED79650016851F /* Debug */,
408
+				504EC3181FED79650016851F /* Release */,
409
+			);
410
+			defaultConfigurationIsVisible = 0;
411
+			defaultConfigurationName = Release;
412
+		};
413
+/* End XCConfigurationList section */
414
+	};
415
+	rootObject = 504EC2FC1FED79650016851F /* Project object */;
416
+}

+ 7 - 0
ios/App/App.xcodeproj/project.xcworkspace/contents.xcworkspacedata

@@ -0,0 +1,7 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<Workspace
3
+   version = "1.0">
4
+   <FileRef
5
+      location = "self:App.xcodeproj">
6
+   </FileRef>
7
+</Workspace>

+ 10 - 0
ios/App/App.xcworkspace/contents.xcworkspacedata

@@ -0,0 +1,10 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<Workspace
3
+   version = "1.0">
4
+   <FileRef
5
+      location = "group:App.xcodeproj">
6
+   </FileRef>
7
+   <FileRef
8
+      location = "group:Pods/Pods.xcodeproj">
9
+   </FileRef>
10
+</Workspace>

+ 8 - 0
ios/App/App.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist

@@ -0,0 +1,8 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+<plist version="1.0">
4
+<dict>
5
+	<key>IDEDidComputeMac32BitWarning</key>
6
+	<true/>
7
+</dict>
8
+</plist>

+ 10 - 0
ios/App/App/App.entitlements

@@ -0,0 +1,10 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+<plist version="1.0">
4
+<dict>
5
+	<key>com.apple.developer.healthkit</key>
6
+	<true/>
7
+	<key>com.apple.developer.healthkit.access</key>
8
+	<array/>
9
+</dict>
10
+</plist>

+ 60 - 0
ios/App/App/AppDelegate.swift

@@ -0,0 +1,60 @@
1
+import UIKit
2
+import Capacitor
3
+
4
+@UIApplicationMain
5
+class AppDelegate: UIResponder, UIApplicationDelegate {
6
+
7
+    var window: UIWindow?
8
+
9
+    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
10
+        // Override point for customization after application launch.
11
+        return true
12
+    }
13
+
14
+    func applicationWillResignActive(_ application: UIApplication) {
15
+        // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
16
+        // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
17
+    }
18
+
19
+    func applicationDidEnterBackground(_ application: UIApplication) {
20
+        // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
21
+        // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
22
+    }
23
+
24
+    func applicationWillEnterForeground(_ application: UIApplication) {
25
+        // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
26
+    }
27
+
28
+    func applicationDidBecomeActive(_ application: UIApplication) {
29
+        // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
30
+    }
31
+
32
+    func applicationWillTerminate(_ application: UIApplication) {
33
+        // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
34
+    }
35
+
36
+    func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey: Any] = [:]) -> Bool {
37
+        // Called when the app was launched with a url. Feel free to add additional processing here,
38
+        // but if you want the App API to support tracking app url opens, make sure to keep this call
39
+        return ApplicationDelegateProxy.shared.application(app, open: url, options: options)
40
+    }
41
+
42
+    func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool {
43
+        // Called when the app was launched with an activity, including Universal Links.
44
+        // Feel free to add additional processing here, but if you want the App API to support
45
+        // tracking app url opens, make sure to keep this call
46
+        return ApplicationDelegateProxy.shared.application(application, continue: userActivity, restorationHandler: restorationHandler)
47
+    }
48
+
49
+    override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
50
+        super.touchesBegan(touches, with: event)
51
+
52
+        let statusBarRect = UIApplication.shared.statusBarFrame
53
+        guard let touchPoint = event?.allTouches?.first?.location(in: self.window) else { return }
54
+
55
+        if statusBarRect.contains(touchPoint) {
56
+            NotificationCenter.default.post(name: .capacitorStatusBarTapped, object: nil)
57
+        }
58
+    }
59
+
60
+}

BIN
ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@1x.png


BIN
ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@2x-1.png


BIN
ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@2x.png


BIN
ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@3x.png


BIN
ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@1x.png


BIN
ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@2x-1.png


BIN
ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@2x.png


BIN
ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@3x.png


BIN
ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@1x.png


BIN
ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@2x-1.png


BIN
ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@2x.png


BIN
ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@3x.png


BIN
ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png


BIN
ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-60x60@2x.png


BIN
ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-60x60@3x.png


BIN
ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-76x76@1x.png


BIN
ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-76x76@2x.png


BIN
ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-83.5x83.5@2x.png


+ 116 - 0
ios/App/App/Assets.xcassets/AppIcon.appiconset/Contents.json

@@ -0,0 +1,116 @@
1
+{
2
+  "images" : [
3
+    {
4
+      "size" : "20x20",
5
+      "idiom" : "iphone",
6
+      "filename" : "AppIcon-20x20@2x.png",
7
+      "scale" : "2x"
8
+    },
9
+    {
10
+      "size" : "20x20",
11
+      "idiom" : "iphone",
12
+      "filename" : "AppIcon-20x20@3x.png",
13
+      "scale" : "3x"
14
+    },
15
+    {
16
+      "size" : "29x29",
17
+      "idiom" : "iphone",
18
+      "filename" : "AppIcon-29x29@2x-1.png",
19
+      "scale" : "2x"
20
+    },
21
+    {
22
+      "size" : "29x29",
23
+      "idiom" : "iphone",
24
+      "filename" : "AppIcon-29x29@3x.png",
25
+      "scale" : "3x"
26
+    },
27
+    {
28
+      "size" : "40x40",
29
+      "idiom" : "iphone",
30
+      "filename" : "AppIcon-40x40@2x.png",
31
+      "scale" : "2x"
32
+    },
33
+    {
34
+      "size" : "40x40",
35
+      "idiom" : "iphone",
36
+      "filename" : "AppIcon-40x40@3x.png",
37
+      "scale" : "3x"
38
+    },
39
+    {
40
+      "size" : "60x60",
41
+      "idiom" : "iphone",
42
+      "filename" : "AppIcon-60x60@2x.png",
43
+      "scale" : "2x"
44
+    },
45
+    {
46
+      "size" : "60x60",
47
+      "idiom" : "iphone",
48
+      "filename" : "AppIcon-60x60@3x.png",
49
+      "scale" : "3x"
50
+    },
51
+    {
52
+      "size" : "20x20",
53
+      "idiom" : "ipad",
54
+      "filename" : "AppIcon-20x20@1x.png",
55
+      "scale" : "1x"
56
+    },
57
+    {
58
+      "size" : "20x20",
59
+      "idiom" : "ipad",
60
+      "filename" : "AppIcon-20x20@2x-1.png",
61
+      "scale" : "2x"
62
+    },
63
+    {
64
+      "size" : "29x29",
65
+      "idiom" : "ipad",
66
+      "filename" : "AppIcon-29x29@1x.png",
67
+      "scale" : "1x"
68
+    },
69
+    {
70
+      "size" : "29x29",
71
+      "idiom" : "ipad",
72
+      "filename" : "AppIcon-29x29@2x.png",
73
+      "scale" : "2x"
74
+    },
75
+    {
76
+      "size" : "40x40",
77
+      "idiom" : "ipad",
78
+      "filename" : "AppIcon-40x40@1x.png",
79
+      "scale" : "1x"
80
+    },
81
+    {
82
+      "size" : "40x40",
83
+      "idiom" : "ipad",
84
+      "filename" : "AppIcon-40x40@2x-1.png",
85
+      "scale" : "2x"
86
+    },
87
+    {
88
+      "size" : "76x76",
89
+      "idiom" : "ipad",
90
+      "filename" : "AppIcon-76x76@1x.png",
91
+      "scale" : "1x"
92
+    },
93
+    {
94
+      "size" : "76x76",
95
+      "idiom" : "ipad",
96
+      "filename" : "AppIcon-76x76@2x.png",
97
+      "scale" : "2x"
98
+    },
99
+    {
100
+      "size" : "83.5x83.5",
101
+      "idiom" : "ipad",
102
+      "filename" : "AppIcon-83.5x83.5@2x.png",
103
+      "scale" : "2x"
104
+    },
105
+    {
106
+      "size" : "1024x1024",
107
+      "idiom" : "ios-marketing",
108
+      "filename" : "AppIcon-512@2x.png",
109
+      "scale" : "1x"
110
+    }
111
+  ],
112
+  "info" : {
113
+    "version" : 1,
114
+    "author" : "xcode"
115
+  }
116
+}

+ 6 - 0
ios/App/App/Assets.xcassets/Contents.json

@@ -0,0 +1,6 @@
1
+{
2
+  "info" : {
3
+    "version" : 1,
4
+    "author" : "xcode"
5
+  }
6
+}

+ 23 - 0
ios/App/App/Assets.xcassets/Splash.imageset/Contents.json

@@ -0,0 +1,23 @@
1
+{
2
+  "images" : [
3
+    {
4
+      "idiom" : "universal",
5
+      "filename" : "splash-2732x2732-2.png",
6
+      "scale" : "1x"
7
+    },
8
+    {
9
+      "idiom" : "universal",
10
+      "filename" : "splash-2732x2732-1.png",
11
+      "scale" : "2x"
12
+    },
13
+    {
14
+      "idiom" : "universal",
15
+      "filename" : "splash-2732x2732.png",
16
+      "scale" : "3x"
17
+    }
18
+  ],
19
+  "info" : {
20
+    "version" : 1,
21
+    "author" : "xcode"
22
+  }
23
+}

BIN
ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-1.png


BIN
ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-2.png


BIN
ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732.png


+ 32 - 0
ios/App/App/Base.lproj/LaunchScreen.storyboard

@@ -0,0 +1,32 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17132" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
3
+    <device id="retina4_7" orientation="portrait" appearance="light"/>
4
+    <dependencies>
5
+        <deployment identifier="iOS"/>
6
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17105"/>
7
+        <capability name="System colors in document resources" minToolsVersion="11.0"/>
8
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
9
+    </dependencies>
10
+    <scenes>
11
+        <!--View Controller-->
12
+        <scene sceneID="EHf-IW-A2E">
13
+            <objects>
14
+                <viewController id="01J-lp-oVM" sceneMemberID="viewController">
15
+                    <imageView key="view" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Splash" id="snD-IY-ifK">
16
+                        <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
17
+                        <autoresizingMask key="autoresizingMask"/>
18
+                        <color key="backgroundColor" systemColor="systemBackgroundColor"/>
19
+                    </imageView>
20
+                </viewController>
21
+                <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
22
+            </objects>
23
+            <point key="canvasLocation" x="53" y="375"/>
24
+        </scene>
25
+    </scenes>
26
+    <resources>
27
+        <image name="Splash" width="1366" height="1366"/>
28
+        <systemColor name="systemBackgroundColor">
29
+            <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
30
+        </systemColor>
31
+    </resources>
32
+</document>

+ 19 - 0
ios/App/App/Base.lproj/Main.storyboard

@@ -0,0 +1,19 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14111" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
3
+    <device id="retina4_7" orientation="portrait">
4
+        <adaptation id="fullscreen"/>
5
+    </device>
6
+    <dependencies>
7
+        <deployment identifier="iOS"/>
8
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
9
+    </dependencies>
10
+    <scenes>
11
+        <!--Bridge View Controller-->
12
+        <scene sceneID="tne-QT-ifu">
13
+            <objects>
14
+                <viewController id="BYZ-38-t0r" customClass="CAPBridgeViewController" customModule="Capacitor" sceneMemberID="viewController"/>
15
+                <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
16
+            </objects>
17
+        </scene>
18
+    </scenes>
19
+</document>

+ 64 - 0
ios/App/App/Info.plist

@@ -0,0 +1,64 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+<plist version="1.0">
4
+<dict>
5
+	<key>CFBundleDevelopmentRegion</key>
6
+	<string>en</string>
7
+	<key>CFBundleDisplayName</key>
8
+	<string>Tune2Win</string>
9
+	<key>CFBundleExecutable</key>
10
+	<string>$(EXECUTABLE_NAME)</string>
11
+	<key>CFBundleIdentifier</key>
12
+	<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
13
+	<key>CFBundleInfoDictionaryVersion</key>
14
+	<string>6.0</string>
15
+	<key>CFBundleName</key>
16
+	<string>$(PRODUCT_NAME)</string>
17
+	<key>CFBundlePackageType</key>
18
+	<string>APPL</string>
19
+	<key>CFBundleShortVersionString</key>
20
+	<string>1.0</string>
21
+	<key>CFBundleVersion</key>
22
+	<string>1</string>
23
+	<key>LSRequiresIPhoneOS</key>
24
+	<true/>
25
+	<key>NSAppTransportSecurity</key>
26
+	<dict>
27
+		<key>NSAllowsArbitraryLoads</key>
28
+		<true/>
29
+	</dict>
30
+    <key>NSContactsUsageDescription</key>
31
+    <string>Get Contact for your trainings</string>
32
+    <key>NSCalendarsUsageDescription</key>
33
+    <string>Access Calendar for trainings</string>
34
+	<key>NSHealthClinicalHealthRecordsShareUsageDescription</key>
35
+	<string>Get data for improve athlete</string>
36
+	<key>NSHealthShareUsageDescription</key>
37
+	<string>Get data for improve athlete</string>
38
+	<key>NSHealthUpdateUsageDescription</key>
39
+	<string>Get data for improve athlete</string>
40
+	<key>UILaunchStoryboardName</key>
41
+	<string>LaunchScreen</string>
42
+	<key>UIMainStoryboardFile</key>
43
+	<string>Main</string>
44
+	<key>UIRequiredDeviceCapabilities</key>
45
+	<array>
46
+		<string>armv7</string>
47
+	</array>
48
+	<key>UISupportedInterfaceOrientations</key>
49
+	<array>
50
+		<string>UIInterfaceOrientationPortrait</string>
51
+		<string>UIInterfaceOrientationLandscapeLeft</string>
52
+		<string>UIInterfaceOrientationLandscapeRight</string>
53
+	</array>
54
+	<key>UISupportedInterfaceOrientations~ipad</key>
55
+	<array>
56
+		<string>UIInterfaceOrientationPortrait</string>
57
+		<string>UIInterfaceOrientationPortraitUpsideDown</string>
58
+		<string>UIInterfaceOrientationLandscapeLeft</string>
59
+		<string>UIInterfaceOrientationLandscapeRight</string>
60
+	</array>
61
+	<key>UIViewControllerBasedStatusBarAppearance</key>
62
+	<true/>
63
+</dict>
64
+</plist>

+ 9 - 0
ios/App/App/capacitor.config.json

@@ -0,0 +1,9 @@
1
+{
2
+	"appId": "io.ionic.starter",
3
+	"appName": "Tune2Win",
4
+	"webDir": "www",
5
+	"bundledWebRuntime": false,
6
+	"server": {
7
+		"url": "http://192.168.1.38:8100"
8
+	}
9
+}

+ 14 - 0
ios/App/App/config.xml

@@ -0,0 +1,14 @@
1
+<?xml version='1.0' encoding='utf-8'?>
2
+<widget version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
3
+  <access origin="*" />
4
+  
5
+  <feature name="Calendar">
6
+    <param name="ios-package" value="Calendar"/>
7
+  </feature>
8
+
9
+  <feature name="HealthKit">
10
+    <param name="ios-package" value="HealthKit"/>
11
+  </feature>
12
+
13
+  
14
+</widget>

+ 22 - 0
ios/App/Podfile

@@ -0,0 +1,22 @@
1
+platform :ios, '12.0'
2
+use_frameworks!
3
+
4
+# workaround to avoid Xcode caching of Pods that requires
5
+# Product -> Clean Build Folder after new Cordova plugins installed
6
+# Requires CocoaPods 1.6 or newer
7
+install! 'cocoapods', :disable_input_output_paths => true
8
+
9
+def capacitor_pods
10
+  pod 'Capacitor', :path => '../../node_modules/@capacitor/ios'
11
+  pod 'CapacitorCordova', :path => '../../node_modules/@capacitor/ios'
12
+  pod 'CapacitorApp', :path => '../../node_modules/@capacitor/app'
13
+  pod 'CapacitorHaptics', :path => '../../node_modules/@capacitor/haptics'
14
+  pod 'CapacitorKeyboard', :path => '../../node_modules/@capacitor/keyboard'
15
+  pod 'CapacitorStatusBar', :path => '../../node_modules/@capacitor/status-bar'
16
+  pod 'CordovaPlugins', :path => '../capacitor-cordova-ios-plugins'
17
+end
18
+
19
+target 'App' do
20
+  capacitor_pods
21
+  # Add your Pods here
22
+end

+ 44 - 0
karma.conf.js

@@ -0,0 +1,44 @@
1
+// Karma configuration file, see link for more information
2
+// https://karma-runner.github.io/1.0/config/configuration-file.html
3
+
4
+module.exports = function (config) {
5
+  config.set({
6
+    basePath: '',
7
+    frameworks: ['jasmine', '@angular-devkit/build-angular'],
8
+    plugins: [
9
+      require('karma-jasmine'),
10
+      require('karma-chrome-launcher'),
11
+      require('karma-jasmine-html-reporter'),
12
+      require('karma-coverage'),
13
+      require('@angular-devkit/build-angular/plugins/karma')
14
+    ],
15
+    client: {
16
+      jasmine: {
17
+        // you can add configuration options for Jasmine here
18
+        // the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
19
+        // for example, you can disable the random execution with `random: false`
20
+        // or set a specific seed with `seed: 4321`
21
+      },
22
+      clearContext: false // leave Jasmine Spec Runner output visible in browser
23
+    },
24
+    jasmineHtmlReporter: {
25
+      suppressAll: true // removes the duplicated traces
26
+    },
27
+    coverageReporter: {
28
+      dir: require('path').join(__dirname, './coverage/ngv'),
29
+      subdir: '.',
30
+      reporters: [
31
+        { type: 'html' },
32
+        { type: 'text-summary' }
33
+      ]
34
+    },
35
+    reporters: ['progress', 'kjhtml'],
36
+    port: 9876,
37
+    colors: true,
38
+    logLevel: config.LOG_INFO,
39
+    autoWatch: true,
40
+    browsers: ['Chrome'],
41
+    singleRun: false,
42
+    restartOnFileChange: true
43
+  });
44
+};

Fichier diff supprimé car celui-ci est trop grand
+ 39378 - 0
package-lock.json


+ 75 - 0
package.json

@@ -0,0 +1,75 @@
1
+{
2
+  "name": "Tune2Win",
3
+  "version": "0.0.1",
4
+  "author": "Ionic Framework",
5
+  "homepage": "https://ionicframework.com/",
6
+  "scripts": {
7
+    "ng": "ng",
8
+    "start": "ng serve",
9
+    "build": "ng build",
10
+    "test": "ng test",
11
+    "lint": "ng lint",
12
+    "e2e": "ng e2e"
13
+  },
14
+  "private": true,
15
+  "dependencies": {
16
+    "@angular/common": "~13.0.0",
17
+    "@angular/core": "~13.0.0",
18
+    "@angular/forms": "~13.0.0",
19
+    "@angular/platform-browser": "~13.0.0",
20
+    "@angular/platform-browser-dynamic": "~13.0.0",
21
+    "@angular/router": "~13.0.0",
22
+    "@awesome-cordova-plugins/calendar": "^5.39.1",
23
+    "@awesome-cordova-plugins/health": "^5.39.1",
24
+    "@capacitor/app": "1.1.0",
25
+    "@capacitor/core": "3.4.1",
26
+    "@capacitor/haptics": "1.1.4",
27
+    "@capacitor/ios": "3.4.1",
28
+    "@capacitor/keyboard": "1.2.2",
29
+    "@capacitor/status-bar": "1.0.8",
30
+    "@ionic/angular": "^6.0.0",
31
+    "@ionic/storage-angular": "^3.0.6",
32
+    "chart.js": "^3.7.1",
33
+    "cordova-plugin-calendar": "^5.1.6",
34
+    "cordova-plugin-health": "^2.0.3",
35
+    "date-fns": "^2.28.0",
36
+    "ng2-charts": "^3.0.0-rc.7",
37
+    "rxjs": "~6.6.0",
38
+    "tslib": "^2.2.0",
39
+    "zone.js": "~0.11.4"
40
+  },
41
+  "devDependencies": {
42
+    "@angular-devkit/build-angular": "~13.0.1",
43
+    "@angular-eslint/builder": "~13.0.1",
44
+    "@angular-eslint/eslint-plugin": "~13.0.1",
45
+    "@angular-eslint/eslint-plugin-template": "~13.0.1",
46
+    "@angular-eslint/template-parser": "~13.0.1",
47
+    "@angular/cli": "~13.0.1",
48
+    "@angular/compiler": "~13.0.0",
49
+    "@angular/compiler-cli": "~13.0.0",
50
+    "@angular/language-service": "~13.0.0",
51
+    "@capacitor/cli": "3.4.1",
52
+    "@ionic/angular-toolkit": "^5.0.0",
53
+    "@types/jasmine": "~3.6.0",
54
+    "@types/jasminewd2": "~2.0.3",
55
+    "@types/node": "^12.11.1",
56
+    "@typescript-eslint/eslint-plugin": "5.3.0",
57
+    "@typescript-eslint/parser": "5.3.0",
58
+    "eslint": "^7.6.0",
59
+    "eslint-plugin-import": "2.22.1",
60
+    "eslint-plugin-jsdoc": "30.7.6",
61
+    "eslint-plugin-prefer-arrow": "1.2.2",
62
+    "jasmine-core": "~3.8.0",
63
+    "jasmine-spec-reporter": "~5.0.0",
64
+    "karma": "~6.3.2",
65
+    "karma-chrome-launcher": "~3.1.0",
66
+    "karma-coverage": "~2.0.3",
67
+    "karma-coverage-istanbul-reporter": "~3.0.2",
68
+    "karma-jasmine": "~4.0.0",
69
+    "karma-jasmine-html-reporter": "^1.5.0",
70
+    "protractor": "~7.0.0",
71
+    "ts-node": "~8.3.0",
72
+    "typescript": "~4.4.4"
73
+  },
74
+  "description": "An Ionic project"
75
+}

BIN
resources/icon.png


BIN
resources/ios/icon/icon-1024.png


BIN
resources/ios/icon/icon-108@2x.png


BIN
resources/ios/icon/icon-20.png


BIN
resources/ios/icon/icon-20@2x.png


BIN
resources/ios/icon/icon-20@3x.png


BIN
resources/ios/icon/icon-24@2x.png


BIN
resources/ios/icon/icon-27.5@2x.png


BIN
resources/ios/icon/icon-29.png


BIN
resources/ios/icon/icon-29@2x.png


BIN
resources/ios/icon/icon-29@3x.png


BIN
resources/ios/icon/icon-40.png


BIN
resources/ios/icon/icon-40@2x.png


BIN
resources/ios/icon/icon-40@3x.png


BIN
resources/ios/icon/icon-44@2x.png


BIN
resources/ios/icon/icon-50.png


BIN
resources/ios/icon/icon-50@2x.png


BIN
resources/ios/icon/icon-60.png


BIN
resources/ios/icon/icon-60@2x.png


BIN
resources/ios/icon/icon-60@3x.png


BIN
resources/ios/icon/icon-72.png


BIN
resources/ios/icon/icon-72@2x.png


BIN
resources/ios/icon/icon-76.png


BIN
resources/ios/icon/icon-76@2x.png


BIN
resources/ios/icon/icon-83.5@2x.png


BIN
resources/ios/icon/icon-86@2x.png


BIN
resources/ios/icon/icon-98@2x.png


BIN
resources/ios/icon/icon.png


BIN
resources/ios/icon/icon@2x.png


BIN
resources/ios/splash/Default-1792h~iphone.png


BIN
resources/ios/splash/Default-2436h.png


BIN
resources/ios/splash/Default-2688h~iphone.png


BIN
resources/ios/splash/Default-568h@2x~iphone.png


BIN
resources/ios/splash/Default-667h.png


BIN
resources/ios/splash/Default-736h.png


BIN
resources/ios/splash/Default-Landscape-1792h~iphone.png


BIN
resources/ios/splash/Default-Landscape-2436h.png


BIN
resources/ios/splash/Default-Landscape-2688h~iphone.png


BIN
resources/ios/splash/Default-Landscape-736h.png


BIN
resources/ios/splash/Default-Landscape@2x~ipad.png


BIN
resources/ios/splash/Default-Landscape@~ipadpro.png


BIN
resources/ios/splash/Default-Landscape~ipad.png


BIN
resources/ios/splash/Default-Portrait@2x~ipad.png


BIN
resources/ios/splash/Default-Portrait@~ipadpro.png


BIN
resources/ios/splash/Default-Portrait~ipad.png


BIN
resources/ios/splash/Default@2x~iphone.png


BIN
resources/ios/splash/Default@2x~universal~anyany.png


BIN
resources/ios/splash/Default~iphone.png


+ 0 - 0
resources/splash.png


Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff

tum/whitesports - Gogs: Simplico Git Service

Нет описания

deprecated.php 40KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570
  1. <?php
  2. /**
  3. * Deprecated admin functions from past WordPress versions. You shouldn't use these
  4. * functions and look for the alternatives instead. The functions will be removed
  5. * in a later version.
  6. *
  7. * @package WordPress
  8. * @subpackage Deprecated
  9. */
  10. /*
  11. * Deprecated functions come here to die.
  12. */
  13. /**
  14. * @since 2.1.0
  15. * @deprecated 2.1.0 Use wp_editor()
  16. * @see wp_editor()
  17. */
  18. function tinymce_include() {
  19. _deprecated_function( __FUNCTION__, '2.1.0', 'wp_editor()' );
  20. wp_tiny_mce();
  21. }
  22. /**
  23. * Unused Admin function.
  24. *
  25. * @since 2.0.0
  26. * @deprecated 2.5.0
  27. *
  28. */
  29. function documentation_link() {
  30. _deprecated_function( __FUNCTION__, '2.5.0' );
  31. }
  32. /**
  33. * Calculates the new dimensions for a downsampled image.
  34. *
  35. * @since 2.0.0
  36. * @deprecated 3.0.0 Use wp_constrain_dimensions()
  37. * @see wp_constrain_dimensions()
  38. *
  39. * @param int $width Current width of the image
  40. * @param int $height Current height of the image
  41. * @param int $wmax Maximum wanted width
  42. * @param int $hmax Maximum wanted height
  43. * @return array Shrunk dimensions (width, height).
  44. */
  45. function wp_shrink_dimensions( $width, $height, $wmax = 128, $hmax = 96 ) {
  46. _deprecated_function( __FUNCTION__, '3.0.0', 'wp_constrain_dimensions()' );
  47. return wp_constrain_dimensions( $width, $height, $wmax, $hmax );
  48. }
  49. /**
  50. * Calculated the new dimensions for a downsampled image.
  51. *
  52. * @since 2.0.0
  53. * @deprecated 3.5.0 Use wp_constrain_dimensions()
  54. * @see wp_constrain_dimensions()
  55. *
  56. * @param int $width Current width of the image
  57. * @param int $height Current height of the image
  58. * @return array Shrunk dimensions (width, height).
  59. */
  60. function get_udims( $width, $height ) {
  61. _deprecated_function( __FUNCTION__, '3.5.0', 'wp_constrain_dimensions()' );
  62. return wp_constrain_dimensions( $width, $height, 128, 96 );
  63. }
  64. /**
  65. * Legacy function used to generate the categories checklist control.
  66. *
  67. * @since 0.71
  68. * @deprecated 2.6.0 Use wp_category_checklist()
  69. * @see wp_category_checklist()
  70. *
  71. * @global int $post_ID
  72. *
  73. * @param int $default Unused.
  74. * @param int $parent Unused.
  75. * @param array $popular_ids Unused.
  76. */
  77. function dropdown_categories( $default = 0, $parent = 0, $popular_ids = array() ) {
  78. _deprecated_function( __FUNCTION__, '2.6.0', 'wp_category_checklist()' );
  79. global $post_ID;
  80. wp_category_checklist( $post_ID );
  81. }
  82. /**
  83. * Legacy function used to generate a link categories checklist control.
  84. *
  85. * @since 2.1.0
  86. * @deprecated 2.6.0 Use wp_link_category_checklist()
  87. * @see wp_link_category_checklist()
  88. *
  89. * @global int $link_id
  90. *
  91. * @param int $default Unused.
  92. */
  93. function dropdown_link_categories( $default = 0 ) {
  94. _deprecated_function( __FUNCTION__, '2.6.0', 'wp_link_category_checklist()' );
  95. global $link_id;
  96. wp_link_category_checklist( $link_id );
  97. }
  98. /**
  99. * Get the real filesystem path to a file to edit within the admin.
  100. *
  101. * @since 1.5.0
  102. * @deprecated 2.9.0
  103. * @uses WP_CONTENT_DIR Full filesystem path to the wp-content directory.
  104. *
  105. * @param string $file Filesystem path relative to the wp-content directory.
  106. * @return string Full filesystem path to edit.
  107. */
  108. function get_real_file_to_edit( $file ) {
  109. _deprecated_function( __FUNCTION__, '2.9.0' );
  110. return WP_CONTENT_DIR . $file;
  111. }
  112. /**
  113. * Legacy function used for generating a categories drop-down control.
  114. *
  115. * @since 1.2.0
  116. * @deprecated 3.0.0 Use wp_dropdown_categories()
  117. * @see wp_dropdown_categories()
  118. *
  119. * @param int $currentcat Optional. ID of the current category. Default 0.
  120. * @param int $currentparent Optional. Current parent category ID. Default 0.
  121. * @param int $parent Optional. Parent ID to retrieve categories for. Default 0.
  122. * @param int $level Optional. Number of levels deep to display. Default 0.
  123. * @param array $categories Optional. Categories to include in the control. Default 0.
  124. * @return void|false Void on success, false if no categories were found.
  125. */
  126. function wp_dropdown_cats( $currentcat = 0, $currentparent = 0, $parent = 0, $level = 0, $categories = 0 ) {
  127. _deprecated_function( __FUNCTION__, '3.0.0', 'wp_dropdown_categories()' );
  128. if (!$categories )
  129. $categories = get_categories( array('hide_empty' => 0) );
  130. if ( $categories ) {
  131. foreach ( $categories as $category ) {
  132. if ( $currentcat != $category->term_id && $parent == $category->parent) {
  133. $pad = str_repeat( '&#8211; ', $level );
  134. $category->name = esc_html( $category->name );
  135. echo "\n\t<option value='$category->term_id'";
  136. if ( $currentparent == $category->term_id )
  137. echo " selected='selected'";
  138. echo ">$pad$category->name</option>";
  139. wp_dropdown_cats( $currentcat, $currentparent, $category->term_id, $level +1, $categories );
  140. }
  141. }
  142. } else {
  143. return false;
  144. }
  145. }
  146. /**
  147. * Register a setting and its sanitization callback
  148. *
  149. * @since 2.7.0
  150. * @deprecated 3.0.0 Use register_setting()
  151. * @see register_setting()
  152. *
  153. * @param string $option_group A settings group name. Should correspond to an allowed option key name.
  154. * Default allowed option key names include 'general', 'discussion', 'media',
  155. * 'reading', 'writing', 'misc', 'options', and 'privacy'.
  156. * @param string $option_name The name of an option to sanitize and save.
  157. * @param callable $sanitize_callback A callback function that sanitizes the option's value.
  158. */
  159. function add_option_update_handler( $option_group, $option_name, $sanitize_callback = '' ) {
  160. _deprecated_function( __FUNCTION__, '3.0.0', 'register_setting()' );
  161. register_setting( $option_group, $option_name, $sanitize_callback );
  162. }
  163. /**
  164. * Unregister a setting
  165. *
  166. * @since 2.7.0
  167. * @deprecated 3.0.0 Use unregister_setting()
  168. * @see unregister_setting()
  169. *
  170. * @param string $option_group
  171. * @param string $option_name
  172. * @param callable $sanitize_callback
  173. */
  174. function remove_option_update_handler( $option_group, $option_name, $sanitize_callback = '' ) {
  175. _deprecated_function( __FUNCTION__, '3.0.0', 'unregister_setting()' );
  176. unregister_setting( $option_group, $option_name, $sanitize_callback );
  177. }
  178. /**
  179. * Determines the language to use for CodePress syntax highlighting.
  180. *
  181. * @since 2.8.0
  182. * @deprecated 3.0.0
  183. *
  184. * @param string $filename
  185. **/
  186. function codepress_get_lang( $filename ) {
  187. _deprecated_function( __FUNCTION__, '3.0.0' );
  188. }
  189. /**
  190. * Adds JavaScript required to make CodePress work on the theme/plugin editors.
  191. *
  192. * @since 2.8.0
  193. * @deprecated 3.0.0
  194. **/
  195. function codepress_footer_js() {
  196. _deprecated_function( __FUNCTION__, '3.0.0' );
  197. }
  198. /**
  199. * Determine whether to use CodePress.
  200. *
  201. * @since 2.8.0
  202. * @deprecated 3.0.0
  203. **/
  204. function use_codepress() {
  205. _deprecated_function( __FUNCTION__, '3.0.0' );
  206. }
  207. /**
  208. * Get all user IDs.
  209. *
  210. * @deprecated 3.1.0 Use get_users()
  211. *
  212. * @global wpdb $wpdb WordPress database abstraction object.
  213. *
  214. * @return array List of user IDs.
  215. */
  216. function get_author_user_ids() {
  217. _deprecated_function( __FUNCTION__, '3.1.0', 'get_users()' );
  218. global $wpdb;
  219. if ( !is_multisite() )
  220. $level_key = $wpdb->get_blog_prefix() . 'user_level';
  221. else
  222. $level_key = $wpdb->get_blog_prefix() . 'capabilities'; // WPMU site admins don't have user_levels.
  223. return $wpdb->get_col( $wpdb->prepare("SELECT user_id FROM $wpdb->usermeta WHERE meta_key = %s AND meta_value != '0'", $level_key) );
  224. }
  225. /**
  226. * Gets author users who can edit posts.
  227. *
  228. * @deprecated 3.1.0 Use get_users()
  229. *
  230. * @global wpdb $wpdb WordPress database abstraction object.
  231. *
  232. * @param int $user_id User ID.
  233. * @return array|false List of editable authors. False if no editable users.
  234. */
  235. function get_editable_authors( $user_id ) {
  236. _deprecated_function( __FUNCTION__, '3.1.0', 'get_users()' );
  237. global $wpdb;
  238. $editable = get_editable_user_ids( $user_id );
  239. if ( !$editable ) {
  240. return false;
  241. } else {
  242. $editable = join(',', $editable);
  243. $authors = $wpdb->get_results( "SELECT * FROM $wpdb->users WHERE ID IN ($editable) ORDER BY display_name" );
  244. }
  245. return apply_filters('get_editable_authors', $authors);
  246. }
  247. /**
  248. * Gets the IDs of any users who can edit posts.
  249. *
  250. * @deprecated 3.1.0 Use get_users()
  251. *
  252. * @global wpdb $wpdb WordPress database abstraction object.
  253. *
  254. * @param int $user_id User ID.
  255. * @param bool $exclude_zeros Optional. Whether to exclude zeroes. Default true.
  256. * @return array Array of editable user IDs, empty array otherwise.
  257. */
  258. function get_editable_user_ids( $user_id, $exclude_zeros = true, $post_type = 'post' ) {
  259. _deprecated_function( __FUNCTION__, '3.1.0', 'get_users()' );
  260. global $wpdb;
  261. if ( ! $user = get_userdata( $user_id ) )
  262. return array();
  263. $post_type_obj = get_post_type_object($post_type);
  264. if ( ! $user->has_cap($post_type_obj->cap->edit_others_posts) ) {
  265. if ( $user->has_cap($post_type_obj->cap->edit_posts) || ! $exclude_zeros )
  266. return array($user->ID);
  267. else
  268. return array();
  269. }
  270. if ( !is_multisite() )
  271. $level_key = $wpdb->get_blog_prefix() . 'user_level';
  272. else
  273. $level_key = $wpdb->get_blog_prefix() . 'capabilities'; // WPMU site admins don't have user_levels.
  274. $query = $wpdb->prepare("SELECT user_id FROM $wpdb->usermeta WHERE meta_key = %s", $level_key);
  275. if ( $exclude_zeros )
  276. $query .= " AND meta_value != '0'";
  277. return $wpdb->get_col( $query );
  278. }
  279. /**
  280. * Gets all users who are not authors.
  281. *
  282. * @deprecated 3.1.0 Use get_users()
  283. *
  284. * @global wpdb $wpdb WordPress database abstraction object.
  285. */
  286. function get_nonauthor_user_ids() {
  287. _deprecated_function( __FUNCTION__, '3.1.0', 'get_users()' );
  288. global $wpdb;
  289. if ( !is_multisite() )
  290. $level_key = $wpdb->get_blog_prefix() . 'user_level';
  291. else
  292. $level_key = $wpdb->get_blog_prefix() . 'capabilities'; // WPMU site admins don't have user_levels.
  293. return $wpdb->get_col( $wpdb->prepare("SELECT user_id FROM $wpdb->usermeta WHERE meta_key = %s AND meta_value = '0'", $level_key) );
  294. }
  295. if ( ! class_exists( 'WP_User_Search', false ) ) :
  296. /**
  297. * WordPress User Search class.
  298. *
  299. * @since 2.1.0
  300. * @deprecated 3.1.0 Use WP_User_Query
  301. */
  302. class WP_User_Search {
  303. /**
  304. * {@internal Missing Description}}
  305. *
  306. * @since 2.1.0
  307. * @access private
  308. * @var mixed
  309. */
  310. var $results;
  311. /**
  312. * {@internal Missing Description}}
  313. *
  314. * @since 2.1.0
  315. * @access private
  316. * @var string
  317. */
  318. var $search_term;
  319. /**
  320. * Page number.
  321. *
  322. * @since 2.1.0
  323. * @access private
  324. * @var int
  325. */
  326. var $page;
  327. /**
  328. * Role name that users have.
  329. *
  330. * @since 2.5.0
  331. * @access private
  332. * @var string
  333. */
  334. var $role;
  335. /**
  336. * Raw page number.
  337. *
  338. * @since 2.1.0
  339. * @access private
  340. * @var int|bool
  341. */
  342. var $raw_page;
  343. /**
  344. * Amount of users to display per page.
  345. *
  346. * @since 2.1.0
  347. * @access public
  348. * @var int
  349. */
  350. var $users_per_page = 50;
  351. /**
  352. * {@internal Missing Description}}
  353. *
  354. * @since 2.1.0
  355. * @access private
  356. * @var int
  357. */
  358. var $first_user;
  359. /**
  360. * {@internal Missing Description}}
  361. *
  362. * @since 2.1.0
  363. * @access private
  364. * @var int
  365. */
  366. var $last_user;
  367. /**
  368. * {@internal Missing Description}}
  369. *
  370. * @since 2.1.0
  371. * @access private
  372. * @var string
  373. */
  374. var $query_limit;
  375. /**
  376. * {@internal Missing Description}}
  377. *
  378. * @since 3.0.0
  379. * @access private
  380. * @var string
  381. */
  382. var $query_orderby;
  383. /**
  384. * {@internal Missing Description}}
  385. *
  386. * @since 3.0.0
  387. * @access private
  388. * @var string
  389. */
  390. var $query_from;
  391. /**
  392. * {@internal Missing Description}}
  393. *
  394. * @since 3.0.0
  395. * @access private
  396. * @var string
  397. */
  398. var $query_where;
  399. /**
  400. * {@internal Missing Description}}
  401. *
  402. * @since 2.1.0
  403. * @access private
  404. * @var int
  405. */
  406. var $total_users_for_query = 0;
  407. /**
  408. * {@internal Missing Description}}
  409. *
  410. * @since 2.1.0
  411. * @access private
  412. * @var bool
  413. */
  414. var $too_many_total_users = false;
  415. /**
  416. * {@internal Missing Description}}
  417. *
  418. * @since 2.1.0
  419. * @access private
  420. * @var WP_Error
  421. */
  422. var $search_errors;
  423. /**
  424. * {@internal Missing Description}}
  425. *
  426. * @since 2.7.0
  427. * @access private
  428. * @var string
  429. */
  430. var $paging_text;
  431. /**
  432. * PHP5 Constructor - Sets up the object properties.
  433. *
  434. * @since 2.1.0
  435. *
  436. * @param string $search_term Search terms string.
  437. * @param int $page Optional. Page ID.
  438. * @param string $role Role name.
  439. * @return WP_User_Search
  440. */
  441. function __construct( $search_term = '', $page = '', $role = '' ) {
  442. _deprecated_function( __FUNCTION__, '3.1.0', 'WP_User_Query' );
  443. $this->search_term = wp_unslash( $search_term );
  444. $this->raw_page = ( '' == $page ) ? false : (int) $page;
  445. $this->page = ( '' == $page ) ? 1 : (int) $page;
  446. $this->role = $role;
  447. $this->prepare_query();
  448. $this->query();
  449. $this->do_paging();
  450. }
  451. /**
  452. * PHP4 Constructor - Sets up the object properties.
  453. *
  454. * @since 2.1.0
  455. *
  456. * @param string $search_term Search terms string.
  457. * @param int $page Optional. Page ID.
  458. * @param string $role Role name.
  459. * @return WP_User_Search
  460. */
  461. public function WP_User_Search( $search_term = '', $page = '', $role = '' ) {
  462. self::__construct( $search_term, $page, $role );
  463. }
  464. /**
  465. * Prepares the user search query (legacy).
  466. *
  467. * @since 2.1.0
  468. * @access public
  469. */
  470. public function prepare_query() {
  471. global $wpdb;
  472. $this->first_user = ($this->page - 1) * $this->users_per_page;
  473. $this->query_limit = $wpdb->prepare(" LIMIT %d, %d", $this->first_user, $this->users_per_page);
  474. $this->query_orderby = ' ORDER BY user_login';
  475. $search_sql = '';
  476. if ( $this->search_term ) {
  477. $searches = array();
  478. $search_sql = 'AND (';
  479. foreach ( array('user_login', 'user_nicename', 'user_email', 'user_url', 'display_name') as $col )
  480. $searches[] = $wpdb->prepare( $col . ' LIKE %s', '%' . like_escape($this->search_term) . '%' );
  481. $search_sql .= implode(' OR ', $searches);
  482. $search_sql .= ')';
  483. }
  484. $this->query_from = " FROM $wpdb->users";
  485. $this->query_where = " WHERE 1=1 $search_sql";
  486. if ( $this->role ) {
  487. $this->query_from .= " INNER JOIN $wpdb->usermeta ON $wpdb->users.ID = $wpdb->usermeta.user_id";
  488. $this->query_where .= $wpdb->prepare(" AND $wpdb->usermeta.meta_key = '{$wpdb->prefix}capabilities' AND $wpdb->usermeta.meta_value LIKE %s", '%' . $this->role . '%');
  489. } elseif ( is_multisite() ) {
  490. $level_key = $wpdb->prefix . 'capabilities'; // WPMU site admins don't have user_levels.
  491. $this->query_from .= ", $wpdb->usermeta";
  492. $this->query_where .= " AND $wpdb->users.ID = $wpdb->usermeta.user_id AND meta_key = '{$level_key}'";
  493. }
  494. do_action_ref_array( 'pre_user_search', array( &$this ) );
  495. }
  496. /**
  497. * Executes the user search query.
  498. *
  499. * @since 2.1.0
  500. * @access public
  501. */
  502. public function query() {
  503. global $wpdb;
  504. $this->results = $wpdb->get_col("SELECT DISTINCT($wpdb->users.ID)" . $this->query_from . $this->query_where . $this->query_orderby . $this->query_limit);
  505. if ( $this->results )
  506. $this->total_users_for_query = $wpdb->get_var("SELECT COUNT(DISTINCT($wpdb->users.ID))" . $this->query_from . $this->query_where); // No limit.
  507. else
  508. $this->search_errors = new WP_Error('no_matching_users_found', __('No users found.'));
  509. }
  510. /**
  511. * Prepares variables for use in templates.
  512. *
  513. * @since 2.1.0
  514. * @access public
  515. */
  516. function prepare_vars_for_template_usage() {}
  517. /**
  518. * Handles paging for the user search query.
  519. *
  520. * @since 2.1.0
  521. * @access public
  522. */
  523. public function do_paging() {
  524. if ( $this->total_users_for_query > $this->users_per_page ) { // Have to page the results.
  525. $args = array();
  526. if ( ! empty($this->search_term) )
  527. $args['usersearch'] = urlencode($this->search_term);
  528. if ( ! empty($this->role) )
  529. $args['role'] = urlencode($this->role);
  530. $this->paging_text = paginate_links( array(
  531. 'total' => ceil($this->total_users_for_query / $this->users_per_page),
  532. 'current' => $this->page,
  533. 'base' => 'users.php?%_%',
  534. 'format' => 'userspage=%#%',
  535. 'add_args' => $args
  536. ) );
  537. if ( $this->paging_text ) {
  538. $this->paging_text = sprintf(
  539. /* translators: 1: Starting number of users on the current page, 2: Ending number of users, 3: Total number of users. */
  540. '<span class="displaying-num">' . __( 'Displaying %1$s&#8211;%2$s of %3$s' ) . '</span>%s',
  541. number_format_i18n( ( $this->page - 1 ) * $this->users_per_page + 1 ),
  542. number_format_i18n( min( $this->page * $this->users_per_page, $this->total_users_for_query ) ),
  543. number_format_i18n( $this->total_users_for_query ),
  544. $this->paging_text
  545. );
  546. }
  547. }
  548. }
  549. /**
  550. * Retrieves the user search query results.
  551. *
  552. * @since 2.1.0
  553. * @access public
  554. *
  555. * @return array
  556. */
  557. public function get_results() {
  558. return (array) $this->results;
  559. }
  560. /**
  561. * Displaying paging text.
  562. *
  563. * @see do_paging() Builds paging text.
  564. *
  565. * @since 2.1.0
  566. * @access public
  567. */
  568. function page_links() {
  569. echo $this->paging_text;
  570. }
  571. /**
  572. * Whether paging is enabled.
  573. *
  574. * @see do_paging() Builds paging text.
  575. *
  576. * @since 2.1.0
  577. * @access public
  578. *
  579. * @return bool
  580. */
  581. function results_are_paged() {
  582. if ( $this->paging_text )
  583. return true;
  584. return false;
  585. }
  586. /**
  587. * Whether there are search terms.
  588. *
  589. * @since 2.1.0
  590. * @access public
  591. *
  592. * @return bool
  593. */
  594. function is_search() {
  595. if ( $this->search_term )
  596. return true;
  597. return false;
  598. }
  599. }
  600. endif;
  601. /**
  602. * Retrieves editable posts from other users.
  603. *
  604. * @since 2.3.0
  605. * @deprecated 3.1.0 Use get_posts()
  606. * @see get_posts()
  607. *
  608. * @global wpdb $wpdb WordPress database abstraction object.
  609. *
  610. * @param int $user_id User ID to not retrieve posts from.
  611. * @param string $type Optional. Post type to retrieve. Accepts 'draft', 'pending' or 'any' (all).
  612. * Default 'any'.
  613. * @return array List of posts from others.
  614. */
  615. function get_others_unpublished_posts( $user_id, $type = 'any' ) {
  616. _deprecated_function( __FUNCTION__, '3.1.0' );
  617. global $wpdb;
  618. $editable = get_editable_user_ids( $user_id );
  619. if ( in_array($type, array('draft', 'pending')) )
  620. $type_sql = " post_status = '$type' ";
  621. else
  622. $type_sql = " ( post_status = 'draft' OR post_status = 'pending' ) ";
  623. $dir = ( 'pending' == $type ) ? 'ASC' : 'DESC';
  624. if ( !$editable ) {
  625. $other_unpubs = '';
  626. } else {
  627. $editable = join(',', $editable);
  628. $other_unpubs = $wpdb->get_results( $wpdb->prepare("SELECT ID, post_title, post_author FROM $wpdb->posts WHERE post_type = 'post' AND $type_sql AND post_author IN ($editable) AND post_author != %d ORDER BY post_modified $dir", $user_id) );
  629. }
  630. return apply_filters('get_others_drafts', $other_unpubs);
  631. }
  632. /**
  633. * Retrieve drafts from other users.
  634. *
  635. * @deprecated 3.1.0 Use get_posts()
  636. * @see get_posts()
  637. *
  638. * @param int $user_id User ID.
  639. * @return array List of drafts from other users.
  640. */
  641. function get_others_drafts($user_id) {
  642. _deprecated_function( __FUNCTION__, '3.1.0' );
  643. return get_others_unpublished_posts($user_id, 'draft');
  644. }
  645. /**
  646. * Retrieve pending review posts from other users.
  647. *
  648. * @deprecated 3.1.0 Use get_posts()
  649. * @see get_posts()
  650. *
  651. * @param int $user_id User ID.
  652. * @return array List of posts with pending review post type from other users.
  653. */
  654. function get_others_pending($user_id) {
  655. _deprecated_function( __FUNCTION__, '3.1.0' );
  656. return get_others_unpublished_posts($user_id, 'pending');
  657. }
  658. /**
  659. * Output the QuickPress dashboard widget.
  660. *
  661. * @since 3.0.0
  662. * @deprecated 3.2.0 Use wp_dashboard_quick_press()
  663. * @see wp_dashboard_quick_press()
  664. */
  665. function wp_dashboard_quick_press_output() {
  666. _deprecated_function( __FUNCTION__, '3.2.0', 'wp_dashboard_quick_press()' );
  667. wp_dashboard_quick_press();
  668. }
  669. /**
  670. * Outputs the TinyMCE editor.
  671. *
  672. * @since 2.7.0
  673. * @deprecated 3.3.0 Use wp_editor()
  674. * @see wp_editor()
  675. */
  676. function wp_tiny_mce( $teeny = false, $settings = false ) {
  677. _deprecated_function( __FUNCTION__, '3.3.0', 'wp_editor()' );
  678. static $num = 1;
  679. if ( ! class_exists( '_WP_Editors', false ) )
  680. require_once ABSPATH . WPINC . '/class-wp-editor.php';
  681. $editor_id = 'content' . $num++;
  682. $set = array(
  683. 'teeny' => $teeny,
  684. 'tinymce' => $settings ? $settings : true,
  685. 'quicktags' => false
  686. );
  687. $set = _WP_Editors::parse_settings($editor_id, $set);
  688. _WP_Editors::editor_settings($editor_id, $set);
  689. }
  690. /**
  691. * Preloads TinyMCE dialogs.
  692. *
  693. * @deprecated 3.3.0 Use wp_editor()
  694. * @see wp_editor()
  695. */
  696. function wp_preload_dialogs() {
  697. _deprecated_function( __FUNCTION__, '3.3.0', 'wp_editor()' );
  698. }
  699. /**
  700. * Prints TinyMCE editor JS.
  701. *
  702. * @deprecated 3.3.0 Use wp_editor()
  703. * @see wp_editor()
  704. */
  705. function wp_print_editor_js() {
  706. _deprecated_function( __FUNCTION__, '3.3.0', 'wp_editor()' );
  707. }
  708. /**
  709. * Handles quicktags.
  710. *
  711. * @deprecated 3.3.0 Use wp_editor()
  712. * @see wp_editor()
  713. */
  714. function wp_quicktags() {
  715. _deprecated_function( __FUNCTION__, '3.3.0', 'wp_editor()' );
  716. }
  717. /**
  718. * Returns the screen layout options.
  719. *
  720. * @since 2.8.0
  721. * @deprecated 3.3.0 WP_Screen::render_screen_layout()
  722. * @see WP_Screen::render_screen_layout()
  723. */
  724. function screen_layout( $screen ) {
  725. _deprecated_function( __FUNCTION__, '3.3.0', '$current_screen->render_screen_layout()' );
  726. $current_screen = get_current_screen();
  727. if ( ! $current_screen )
  728. return '';
  729. ob_start();
  730. $current_screen->render_screen_layout();
  731. return ob_get_clean();
  732. }
  733. /**
  734. * Returns the screen's per-page options.
  735. *
  736. * @since 2.8.0
  737. * @deprecated 3.3.0 Use WP_Screen::render_per_page_options()
  738. * @see WP_Screen::render_per_page_options()
  739. */
  740. function screen_options( $screen ) {
  741. _deprecated_function( __FUNCTION__, '3.3.0', '$current_screen->render_per_page_options()' );
  742. $current_screen = get_current_screen();
  743. if ( ! $current_screen )
  744. return '';
  745. ob_start();
  746. $current_screen->render_per_page_options();
  747. return ob_get_clean();
  748. }
  749. /**
  750. * Renders the screen's help.
  751. *
  752. * @since 2.7.0
  753. * @deprecated 3.3.0 Use WP_Screen::render_screen_meta()
  754. * @see WP_Screen::render_screen_meta()
  755. */
  756. function screen_meta( $screen ) {
  757. $current_screen = get_current_screen();
  758. $current_screen->render_screen_meta();
  759. }
  760. /**
  761. * Favorite actions were deprecated in version 3.2. Use the admin bar instead.
  762. *
  763. * @since 2.7.0
  764. * @deprecated 3.2.0 Use WP_Admin_Bar
  765. * @see WP_Admin_Bar
  766. */
  767. function favorite_actions() {
  768. _deprecated_function( __FUNCTION__, '3.2.0', 'WP_Admin_Bar' );
  769. }
  770. /**
  771. * Handles uploading an image.
  772. *
  773. * @deprecated 3.3.0 Use wp_media_upload_handler()
  774. * @see wp_media_upload_handler()
  775. *
  776. * @return null|string
  777. */
  778. function media_upload_image() {
  779. _deprecated_function( __FUNCTION__, '3.3.0', 'wp_media_upload_handler()' );
  780. return wp_media_upload_handler();
  781. }
  782. /**
  783. * Handles uploading an audio file.
  784. *
  785. * @deprecated 3.3.0 Use wp_media_upload_handler()
  786. * @see wp_media_upload_handler()
  787. *
  788. * @return null|string
  789. */
  790. function media_upload_audio() {
  791. _deprecated_function( __FUNCTION__, '3.3.0', 'wp_media_upload_handler()' );
  792. return wp_media_upload_handler();
  793. }
  794. /**
  795. * Handles uploading a video file.
  796. *
  797. * @deprecated 3.3.0 Use wp_media_upload_handler()
  798. * @see wp_media_upload_handler()
  799. *
  800. * @return null|string
  801. */
  802. function media_upload_video() {
  803. _deprecated_function( __FUNCTION__, '3.3.0', 'wp_media_upload_handler()' );
  804. return wp_media_upload_handler();
  805. }
  806. /**
  807. * Handles uploading a generic file.
  808. *
  809. * @deprecated 3.3.0 Use wp_media_upload_handler()
  810. * @see wp_media_upload_handler()
  811. *
  812. * @return null|string
  813. */
  814. function media_upload_file() {
  815. _deprecated_function( __FUNCTION__, '3.3.0', 'wp_media_upload_handler()' );
  816. return wp_media_upload_handler();
  817. }
  818. /**
  819. * Handles retrieving the insert-from-URL form for an image.
  820. *
  821. * @deprecated 3.3.0 Use wp_media_insert_url_form()
  822. * @see wp_media_insert_url_form()
  823. *
  824. * @return string
  825. */
  826. function type_url_form_image() {
  827. _deprecated_function( __FUNCTION__, '3.3.0', "wp_media_insert_url_form('image')" );
  828. return wp_media_insert_url_form( 'image' );
  829. }
  830. /**
  831. * Handles retrieving the insert-from-URL form for an audio file.
  832. *
  833. * @deprecated 3.3.0 Use wp_media_insert_url_form()
  834. * @see wp_media_insert_url_form()
  835. *
  836. * @return string
  837. */
  838. function type_url_form_audio() {
  839. _deprecated_function( __FUNCTION__, '3.3.0', "wp_media_insert_url_form('audio')" );
  840. return wp_media_insert_url_form( 'audio' );
  841. }
  842. /**
  843. * Handles retrieving the insert-from-URL form for a video file.
  844. *
  845. * @deprecated 3.3.0 Use wp_media_insert_url_form()
  846. * @see wp_media_insert_url_form()
  847. *
  848. * @return string
  849. */
  850. function type_url_form_video() {
  851. _deprecated_function( __FUNCTION__, '3.3.0', "wp_media_insert_url_form('video')" );
  852. return wp_media_insert_url_form( 'video' );
  853. }
  854. /**
  855. * Handles retrieving the insert-from-URL form for a generic file.
  856. *
  857. * @deprecated 3.3.0 Use wp_media_insert_url_form()
  858. * @see wp_media_insert_url_form()
  859. *
  860. * @return string
  861. */
  862. function type_url_form_file() {
  863. _deprecated_function( __FUNCTION__, '3.3.0', "wp_media_insert_url_form('file')" );
  864. return wp_media_insert_url_form( 'file' );
  865. }
  866. /**
  867. * Add contextual help text for a page.
  868. *
  869. * Creates an 'Overview' help tab.
  870. *
  871. * @since 2.7.0
  872. * @deprecated 3.3.0 Use WP_Screen::add_help_tab()
  873. * @see WP_Screen::add_help_tab()
  874. *
  875. * @param string $screen The handle for the screen to add help to. This is usually
  876. * the hook name returned by the `add_*_page()` functions.
  877. * @param string $help The content of an 'Overview' help tab.
  878. */
  879. function add_contextual_help( $screen, $help ) {
  880. _deprecated_function( __FUNCTION__, '3.3.0', 'get_current_screen()->add_help_tab()' );
  881. if ( is_string( $screen ) )
  882. $screen = convert_to_screen( $screen );
  883. WP_Screen::add_old_compat_help( $screen, $help );
  884. }
  885. /**
  886. * Get the allowed themes for the current site.
  887. *
  888. * @since 3.0.0
  889. * @deprecated 3.4.0 Use wp_get_themes()
  890. * @see wp_get_themes()
  891. *
  892. * @return WP_Theme[] Array of WP_Theme objects keyed by their name.
  893. */
  894. function get_allowed_themes() {
  895. _deprecated_function( __FUNCTION__, '3.4.0', "wp_get_themes( array( 'allowed' => true ) )" );
  896. $themes = wp_get_themes( array( 'allowed' => true ) );
  897. $wp_themes = array();
  898. foreach ( $themes as $theme ) {
  899. $wp_themes[ $theme->get('Name') ] = $theme;
  900. }
  901. return $wp_themes;
  902. }
  903. /**
  904. * Retrieves a list of broken themes.
  905. *
  906. * @since 1.5.0
  907. * @deprecated 3.4.0 Use wp_get_themes()
  908. * @see wp_get_themes()
  909. *
  910. * @return array
  911. */
  912. function get_broken_themes() {
  913. _deprecated_function( __FUNCTION__, '3.4.0', "wp_get_themes( array( 'errors' => true )" );
  914. $themes = wp_get_themes( array( 'errors' => true ) );
  915. $broken = array();
  916. foreach ( $themes as $theme ) {
  917. $name = $theme->get('Name');
  918. $broken[ $name ] = array(
  919. 'Name' => $name,
  920. 'Title' => $name,
  921. 'Description' => $theme->errors()->get_error_message(),
  922. );
  923. }
  924. return $broken;
  925. }
  926. /**
  927. * Retrieves information on the current active theme.
  928. *
  929. * @since 2.0.0
  930. * @deprecated 3.4.0 Use wp_get_theme()
  931. * @see wp_get_theme()
  932. *
  933. * @return WP_Theme
  934. */
  935. function current_theme_info() {
  936. _deprecated_function( __FUNCTION__, '3.4.0', 'wp_get_theme()' );
  937. return wp_get_theme();
  938. }
  939. /**
  940. * This was once used to display an 'Insert into Post' button.
  941. *
  942. * Now it is deprecated and stubbed.
  943. *
  944. * @deprecated 3.5.0
  945. */
  946. function _insert_into_post_button( $type ) {
  947. _deprecated_function( __FUNCTION__, '3.5.0' );
  948. }
  949. /**
  950. * This was once used to display a media button.
  951. *
  952. * Now it is deprecated and stubbed.
  953. *
  954. * @deprecated 3.5.0
  955. */
  956. function _media_button($title, $icon, $type, $id) {
  957. _deprecated_function( __FUNCTION__, '3.5.0' );
  958. }
  959. /**
  960. * Gets an existing post and format it for editing.
  961. *
  962. * @since 2.0.0
  963. * @deprecated 3.5.0 Use get_post()
  964. * @see get_post()
  965. *
  966. * @param int $id
  967. * @return WP_Post
  968. */
  969. function get_post_to_edit( $id ) {
  970. _deprecated_function( __FUNCTION__, '3.5.0', 'get_post()' );
  971. return get_post( $id, OBJECT, 'edit' );
  972. }
  973. /**
  974. * Gets the default page information to use.
  975. *
  976. * @since 2.5.0
  977. * @deprecated 3.5.0 Use get_default_post_to_edit()
  978. * @see get_default_post_to_edit()
  979. *
  980. * @return WP_Post Post object containing all the default post data as attributes
  981. */
  982. function get_default_page_to_edit() {
  983. _deprecated_function( __FUNCTION__, '3.5.0', "get_default_post_to_edit( 'page' )" );
  984. $page = get_default_post_to_edit();
  985. $page->post_type = 'page';
  986. return $page;
  987. }
  988. /**
  989. * This was once used to create a thumbnail from an Image given a maximum side size.
  990. *
  991. * @since 1.2.0
  992. * @deprecated 3.5.0 Use image_resize()
  993. * @see image_resize()
  994. *
  995. * @param mixed $file Filename of the original image, Or attachment ID.
  996. * @param int $max_side Maximum length of a single side for the thumbnail.
  997. * @param mixed $deprecated Never used.
  998. * @return string Thumbnail path on success, Error string on failure.
  999. */
  1000. function wp_create_thumbnail( $file, $max_side, $deprecated = '' ) {
  1001. _deprecated_function( __FUNCTION__, '3.5.0', 'image_resize()' );
  1002. return apply_filters( 'wp_create_thumbnail', image_resize( $file, $max_side, $max_side ) );
  1003. }
  1004. /**
  1005. * This was once used to display a meta box for the nav menu theme locations.
  1006. *
  1007. * Deprecated in favor of a 'Manage Locations' tab added to nav menus management screen.
  1008. *
  1009. * @since 3.0.0
  1010. * @deprecated 3.6.0
  1011. */
  1012. function wp_nav_menu_locations_meta_box() {
  1013. _deprecated_function( __FUNCTION__, '3.6.0' );
  1014. }
  1015. /**
  1016. * This was once used to kick-off the Core Updater.
  1017. *
  1018. * Deprecated in favor of instantating a Core_Upgrader instance directly,
  1019. * and calling the 'upgrade' method.
  1020. *
  1021. * @since 2.7.0
  1022. * @deprecated 3.7.0 Use Core_Upgrader
  1023. * @see Core_Upgrader
  1024. */
  1025. function wp_update_core($current, $feedback = '') {
  1026. _deprecated_function( __FUNCTION__, '3.7.0', 'new Core_Upgrader();' );
  1027. if ( !empty($feedback) )
  1028. add_filter('update_feedback', $feedback);
  1029. require ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
  1030. $upgrader = new Core_Upgrader();
  1031. return $upgrader->upgrade($current);
  1032. }
  1033. /**
  1034. * This was once used to kick-off the Plugin Updater.
  1035. *
  1036. * Deprecated in favor of instantating a Plugin_Upgrader instance directly,
  1037. * and calling the 'upgrade' method.
  1038. * Unused since 2.8.0.
  1039. *
  1040. * @since 2.5.0
  1041. * @deprecated 3.7.0 Use Plugin_Upgrader
  1042. * @see Plugin_Upgrader
  1043. */
  1044. function wp_update_plugin($plugin, $feedback = '') {
  1045. _deprecated_function( __FUNCTION__, '3.7.0', 'new Plugin_Upgrader();' );
  1046. if ( !empty($feedback) )
  1047. add_filter('update_feedback', $feedback);
  1048. require ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
  1049. $upgrader = new Plugin_Upgrader();
  1050. return $upgrader->upgrade($plugin);
  1051. }
  1052. /**
  1053. * This was once used to kick-off the Theme Updater.
  1054. *
  1055. * Deprecated in favor of instantiating a Theme_Upgrader instance directly,
  1056. * and calling the 'upgrade' method.
  1057. * Unused since 2.8.0.
  1058. *
  1059. * @since 2.7.0
  1060. * @deprecated 3.7.0 Use Theme_Upgrader
  1061. * @see Theme_Upgrader
  1062. */
  1063. function wp_update_theme($theme, $feedback = '') {
  1064. _deprecated_function( __FUNCTION__, '3.7.0', 'new Theme_Upgrader();' );
  1065. if ( !empty($feedback) )
  1066. add_filter('update_feedback', $feedback);
  1067. require ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
  1068. $upgrader = new Theme_Upgrader();
  1069. return $upgrader->upgrade($theme);
  1070. }
  1071. /**
  1072. * This was once used to display attachment links. Now it is deprecated and stubbed.
  1073. *
  1074. * @since 2.0.0
  1075. * @deprecated 3.7.0
  1076. *
  1077. * @param int|bool $id
  1078. */
  1079. function the_attachment_links( $id = false ) {
  1080. _deprecated_function( __FUNCTION__, '3.7.0' );
  1081. }
  1082. /**
  1083. * Displays a screen icon.
  1084. *
  1085. * @since 2.7.0
  1086. * @deprecated 3.8.0
  1087. */
  1088. function screen_icon() {
  1089. _deprecated_function( __FUNCTION__, '3.8.0' );
  1090. echo get_screen_icon();
  1091. }
  1092. /**
  1093. * Retrieves the screen icon (no longer used in 3.8+).
  1094. *
  1095. * @since 3.2.0
  1096. * @deprecated 3.8.0
  1097. *
  1098. * @return string An HTML comment explaining that icons are no longer used.
  1099. */
  1100. function get_screen_icon() {
  1101. _deprecated_function( __FUNCTION__, '3.8.0' );
  1102. return '<!-- Screen icons are no longer used as of WordPress 3.8. -->';
  1103. }
  1104. /**
  1105. * Deprecated dashboard widget controls.
  1106. *
  1107. * @since 2.5.0
  1108. * @deprecated 3.8.0
  1109. */
  1110. function wp_dashboard_incoming_links_output() {}
  1111. /**
  1112. * Deprecated dashboard secondary output.
  1113. *
  1114. * @deprecated 3.8.0
  1115. */
  1116. function wp_dashboard_secondary_output() {}
  1117. /**
  1118. * Deprecated dashboard widget controls.
  1119. *
  1120. * @since 2.7.0
  1121. * @deprecated 3.8.0
  1122. */
  1123. function wp_dashboard_incoming_links() {}
  1124. /**
  1125. * Deprecated dashboard incoming links control.
  1126. *
  1127. * @deprecated 3.8.0
  1128. */
  1129. function wp_dashboard_incoming_links_control() {}
  1130. /**
  1131. * Deprecated dashboard plugins control.
  1132. *
  1133. * @deprecated 3.8.0
  1134. */
  1135. function wp_dashboard_plugins() {}
  1136. /**
  1137. * Deprecated dashboard primary control.
  1138. *
  1139. * @deprecated 3.8.0
  1140. */
  1141. function wp_dashboard_primary_control() {}
  1142. /**
  1143. * Deprecated dashboard recent comments control.
  1144. *
  1145. * @deprecated 3.8.0
  1146. */
  1147. function wp_dashboard_recent_comments_control() {}
  1148. /**
  1149. * Deprecated dashboard secondary section.
  1150. *
  1151. * @deprecated 3.8.0
  1152. */
  1153. function wp_dashboard_secondary() {}
  1154. /**
  1155. * Deprecated dashboard secondary control.
  1156. *
  1157. * @deprecated 3.8.0
  1158. */
  1159. function wp_dashboard_secondary_control() {}
  1160. /**
  1161. * Display plugins text for the WordPress news widget.
  1162. *
  1163. * @since 2.5.0
  1164. * @deprecated 4.8.0
  1165. *
  1166. * @param string $rss The RSS feed URL.
  1167. * @param array $args Array of arguments for this RSS feed.
  1168. */
  1169. function wp_dashboard_plugins_output( $rss, $args = array() ) {
  1170. _deprecated_function( __FUNCTION__, '4.8.0' );
  1171. // Plugin feeds plus link to install them.
  1172. $popular = fetch_feed( $args['url']['popular'] );
  1173. if ( false === $plugin_slugs = get_transient( 'plugin_slugs' ) ) {
  1174. $plugin_slugs = array_keys( get_plugins() );
  1175. set_transient( 'plugin_slugs', $plugin_slugs, DAY_IN_SECONDS );
  1176. }
  1177. echo '<ul>';
  1178. foreach ( array( $popular ) as $feed ) {
  1179. if ( is_wp_error( $feed ) || ! $feed->get_item_quantity() )
  1180. continue;
  1181. $items = $feed->get_items(0, 5);
  1182. // Pick a random, non-installed plugin.
  1183. while ( true ) {
  1184. // Abort this foreach loop iteration if there's no plugins left of this type.
  1185. if ( 0 === count($items) )
  1186. continue 2;
  1187. $item_key = array_rand($items);
  1188. $item = $items[$item_key];
  1189. list($link, $frag) = explode( '#', $item->get_link() );
  1190. $link = esc_url($link);
  1191. if ( preg_match( '|/([^/]+?)/?$|', $link, $matches ) )
  1192. $slug = $matches[1];
  1193. else {
  1194. unset( $items[$item_key] );
  1195. continue;
  1196. }
  1197. // Is this random plugin's slug already installed? If so, try again.
  1198. reset( $plugin_slugs );
  1199. foreach ( $plugin_slugs as $plugin_slug ) {
  1200. if ( $slug == substr( $plugin_slug, 0, strlen( $slug ) ) ) {
  1201. unset( $items[$item_key] );
  1202. continue 2;
  1203. }
  1204. }
  1205. // If we get to this point, then the random plugin isn't installed and we can stop the while().
  1206. break;
  1207. }
  1208. // Eliminate some common badly formed plugin descriptions.
  1209. while ( ( null !== $item_key = array_rand($items) ) && false !== strpos( $items[$item_key]->get_description(), 'Plugin Name:' ) )
  1210. unset($items[$item_key]);
  1211. if ( !isset($items[$item_key]) )
  1212. continue;
  1213. $raw_title = $item->get_title();
  1214. $ilink = wp_nonce_url('plugin-install.php?tab=plugin-information&plugin=' . $slug, 'install-plugin_' . $slug) . '&amp;TB_iframe=true&amp;width=600&amp;height=800';
  1215. echo '<li class="dashboard-news-plugin"><span>' . __( 'Popular Plugin' ) . ':</span> ' . esc_html( $raw_title ) .
  1216. '&nbsp;<a href="' . $ilink . '" class="thickbox open-plugin-details-modal" aria-label="' .
  1217. /* translators: %s: Plugin name. */
  1218. esc_attr( sprintf( _x( 'Install %s', 'plugin' ), $raw_title ) ) . '">(' . __( 'Install' ) . ')</a></li>';
  1219. $feed->__destruct();
  1220. unset( $feed );
  1221. }
  1222. echo '</ul>';
  1223. }
  1224. /**
  1225. * This was once used to move child posts to a new parent.
  1226. *
  1227. * @since 2.3.0
  1228. * @deprecated 3.9.0
  1229. * @access private
  1230. *
  1231. * @param int $old_ID
  1232. * @param int $new_ID
  1233. */
  1234. function _relocate_children( $old_ID, $new_ID ) {
  1235. _deprecated_function( __FUNCTION__, '3.9.0' );
  1236. }
  1237. /**
  1238. * Add a top-level menu page in the 'objects' section.
  1239. *
  1240. * This function takes a capability which will be used to determine whether
  1241. * or not a page is included in the menu.
  1242. *
  1243. * The function which is hooked in to handle the output of the page must check
  1244. * that the user has the required capability as well.
  1245. *
  1246. * @since 2.7.0
  1247. *
  1248. * @deprecated 4.5.0 Use add_menu_page()
  1249. * @see add_menu_page()
  1250. * @global int $_wp_last_object_menu
  1251. *
  1252. * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected.
  1253. * @param string $menu_title The text to be used for the menu.
  1254. * @param string $capability The capability required for this menu to be displayed to the user.
  1255. * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu).
  1256. * @param callable $function The function to be called to output the content for this page.
  1257. * @param string $icon_url The url to the icon to be used for this menu.
  1258. * @return string The resulting page's hook_suffix.
  1259. */
  1260. function add_object_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $icon_url = '') {
  1261. _deprecated_function( __FUNCTION__, '4.5.0', 'add_menu_page()' );
  1262. global $_wp_last_object_menu;
  1263. $_wp_last_object_menu++;
  1264. return add_menu_page($page_title, $menu_title, $capability, $menu_slug, $function, $icon_url, $_wp_last_object_menu);
  1265. }
  1266. /**
  1267. * Add a top-level menu page in the 'utility' section.
  1268. *
  1269. * This function takes a capability which will be used to determine whether
  1270. * or not a page is included in the menu.
  1271. *
  1272. * The function which is hooked in to handle the output of the page must check
  1273. * that the user has the required capability as well.
  1274. *
  1275. * @since 2.7.0
  1276. *
  1277. * @deprecated 4.5.0 Use add_menu_page()
  1278. * @see add_menu_page()
  1279. * @global int $_wp_last_utility_menu
  1280. *
  1281. * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected.
  1282. * @param string $menu_title The text to be used for the menu.
  1283. * @param string $capability The capability required for this menu to be displayed to the user.
  1284. * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu).
  1285. * @param callable $function The function to be called to output the content for this page.
  1286. * @param string $icon_url The url to the icon to be used for this menu.
  1287. * @return string The resulting page's hook_suffix.
  1288. */
  1289. function add_utility_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $icon_url = '') {
  1290. _deprecated_function( __FUNCTION__, '4.5.0', 'add_menu_page()' );
  1291. global $_wp_last_utility_menu;
  1292. $_wp_last_utility_menu++;
  1293. return add_menu_page($page_title, $menu_title, $capability, $menu_slug, $function, $icon_url, $_wp_last_utility_menu);
  1294. }
  1295. /**
  1296. * Disables autocomplete on the 'post' form (Add/Edit Post screens) for WebKit browsers,
  1297. * as they disregard the autocomplete setting on the editor textarea. That can break the editor
  1298. * when the user navigates to it with the browser's Back button. See #28037
  1299. *
  1300. * Replaced with wp_page_reload_on_back_button_js() that also fixes this problem.
  1301. *
  1302. * @since 4.0.0
  1303. * @deprecated 4.6.0
  1304. *
  1305. * @link https://core.trac.wordpress.org/ticket/35852
  1306. *
  1307. * @global bool $is_safari
  1308. * @global bool $is_chrome
  1309. */
  1310. function post_form_autocomplete_off() {
  1311. global $is_safari, $is_chrome;
  1312. _deprecated_function( __FUNCTION__, '4.6.0' );
  1313. if ( $is_safari || $is_chrome ) {
  1314. echo ' autocomplete="off"';
  1315. }
  1316. }
  1317. /**
  1318. * Display JavaScript on the page.
  1319. *
  1320. * @since 3.5.0
  1321. * @deprecated 4.9.0
  1322. */
  1323. function options_permalink_add_js() {
  1324. ?>
  1325. <script type="text/javascript">
  1326. jQuery(document).ready(function() {
  1327. jQuery('.permalink-structure input:radio').change(function() {
  1328. if ( 'custom' == this.value )
  1329. return;
  1330. jQuery('#permalink_structure').val( this.value );
  1331. });
  1332. jQuery( '#permalink_structure' ).on( 'click input', function() {
  1333. jQuery( '#custom_selection' ).prop( 'checked', true );
  1334. });
  1335. });
  1336. </script>
  1337. <?php
  1338. }
  1339. /**
  1340. * Previous class for list table for privacy data export requests.
  1341. *
  1342. * @since 4.9.6
  1343. * @deprecated 5.3.0
  1344. */
  1345. class WP_Privacy_Data_Export_Requests_Table extends WP_Privacy_Data_Export_Requests_List_Table {
  1346. function __construct( $args ) {
  1347. _deprecated_function( __CLASS__, '5.3.0', 'WP_Privacy_Data_Export_Requests_List_Table' );
  1348. if ( ! isset( $args['screen'] ) || $args['screen'] === 'export_personal_data' ) {
  1349. $args['screen'] = 'export-personal-data';
  1350. }
  1351. parent::__construct( $args );
  1352. }
  1353. }
  1354. /**
  1355. * Previous class for list table for privacy data erasure requests.
  1356. *
  1357. * @since 4.9.6
  1358. * @deprecated 5.3.0
  1359. */
  1360. class WP_Privacy_Data_Removal_Requests_Table extends WP_Privacy_Data_Removal_Requests_List_Table {
  1361. function __construct( $args ) {
  1362. _deprecated_function( __CLASS__, '5.3.0', 'WP_Privacy_Data_Removal_Requests_List_Table' );
  1363. if ( ! isset( $args['screen'] ) || $args['screen'] === 'remove_personal_data' ) {
  1364. $args['screen'] = 'erase-personal-data';
  1365. }
  1366. parent::__construct( $args );
  1367. }
  1368. }
  1369. /**
  1370. * Was used to add options for the privacy requests screens before they were separate files.
  1371. *
  1372. * @since 4.9.8
  1373. * @access private
  1374. * @deprecated 5.3.0
  1375. */
  1376. function _wp_privacy_requests_screen_options() {
  1377. _deprecated_function( __FUNCTION__, '5.3.0' );
  1378. }