| @@ -202,8 +202,39 @@ | ||
| 202 | 202 | |
| 203 | 203 | } |
| 204 | 204 | |
| 205 | 205 | /** |
| 206 | + * Returns the Global non-inline Form Plugin setting. | |
| 207 | + * | |
| 208 | + * @since 2.3.3 | |
| 209 | + * | |
| 210 | + * @return string|int Non-inline Form (blank string|form id) | |
| 211 | + */ | |
| 212 | + public function get_non_inline_form() { | |
| 213 | + | |
| 214 | + // Return blank string if no inline form is specified. | |
| 215 | + if ( ! $this->has_non_inline_form() ) { | |
| 216 | + return ''; | |
| 217 | + } | |
| 218 | + | |
| 219 | + return $this->settings['non_inline_form']; | |
| 220 | + | |
| 221 | + } | |
| 222 | + | |
| 223 | + /** | |
| 224 | + * Returns whether the Global non-inline Form has been set in the Plugin settings. | |
| 225 | + * | |
| 226 | + * @since 2.3.3 | |
| 227 | + * | |
| 228 | + * @return bool Global non-inline Form setting specified in Plugin Settings. | |
| 229 | + */ | |
| 230 | + public function has_non_inline_form() { | |
| 231 | + | |
| 232 | + return ( ! empty( $this->settings['non_inline_form'] ) ? true : false ); | |
| 233 | + | |
| 234 | + } | |
| 235 | + | |
| 236 | + /** | |
| 206 | 237 | * Returns whether debugging is enabled in the Plugin settings. |
| 207 | 238 | * |
| 208 | 239 | * @since 1.9.6 |
| 209 | 240 | * |
| @@ -251,13 +282,14 @@ | ||
| 251 | 282 | */ |
| 252 | 283 | public function get_defaults() { |
| 253 | 284 | |
| 254 | 285 | $defaults = array( |
| 255 | - 'api_key' => '', // string. | |
| 256 | - 'api_secret' => '', // string. | |
| 257 | - 'debug' => '', // blank|on. | |
| 258 | - 'no_scripts' => '', // blank|on. | |
| 259 | - 'no_css' => '', // blank|on. | |
| 286 | + 'api_key' => '', // string. | |
| 287 | + 'api_secret' => '', // string. | |
| 288 | + 'non_inline_form' => '', // string. | |
| 289 | + 'debug' => '', // blank|on. | |
| 290 | + 'no_scripts' => '', // blank|on. | |
| 291 | + 'no_css' => '', // blank|on. | |
| 260 | 292 | ); |
| 261 | 293 | |
| 262 | 294 | // Add Post Type Default Forms. |
| 263 | 295 | foreach ( convertkit_get_supported_post_types() as $post_type ) { |