← All changes
|
admin/importers/class-convertkit-admin-importer-aweber.php
+18
-0
3.3.4
→
3.4.6
View file →
| @@ -127,8 +127,26 @@ | ||
| 127 | 127 | |
| 128 | 128 | } |
| 129 | 129 | |
| 130 | 130 | /** |
| 131 | + * Returns whether the given block ID attribute value matches the AWeber form ID. | |
| 132 | + * | |
| 133 | + * AWeber's block stores the list ID, form ID and form type e.g. 6924484-289586845-webform. | |
| 134 | + * | |
| 135 | + * @since 3.4.5 | |
| 136 | + * | |
| 137 | + * @param mixed $value Block ID attribute value. | |
| 138 | + * @param string|int $third_party_form_id Third Party Form ID. | |
| 139 | + * @return bool | |
| 140 | + */ | |
| 141 | + protected function block_id_attribute_matches( $value, $third_party_form_id ) { | |
| 142 | + | |
| 143 | + $parts = explode( '-', (string) $value ); | |
| 144 | + return isset( $parts[1] ) && $parts[1] === (string) $third_party_form_id; | |
| 145 | + | |
| 146 | + } | |
| 147 | + | |
| 148 | + /** | |
| 131 | 149 | * Returns an array of AWeber form IDs and titles found in the posts. |
| 132 | 150 | * |
| 133 | 151 | * @since 3.1.5 |
| 134 | 152 | * |