|
@@ -47,16 +47,16 @@ |
|
|
block discarded – undo |
|
47
|
47
|
|
|
48
|
48
|
foreach ( $shortcodes->get_shortcode_information( 'gravitypdf', $content ) as $shortcode ) { |
|
49
|
49
|
// Let's make sure this entry ID is correct for the supplied form |
|
50
|
|
- $form_id = $wpdb->get_var( $wpdb->prepare( "SELECT form_id FROM $table WHERE display_meta LIKE %s", '%"' . $wpdb->esc_like( $shortcode['attr']['id'] ) . '"%' ) ); |
|
|
50
|
+ $form_id = $wpdb->get_var( $wpdb->prepare( "SELECT form_id FROM $table WHERE display_meta LIKE %s", '%"' . $wpdb->esc_like( $shortcode[ 'attr' ][ 'id' ] ) . '"%' ) ); |
|
51
|
51
|
|
|
52
|
52
|
// Inject the needed entry ID |
|
53
|
53
|
$replace = str_replace( |
|
54
|
|
- sprintf( 'entry="%d"', $shortcode['attr']['entry'] ), |
|
55
|
|
- sprintf( 'entry="%d"', $context->entry[ $form_id ]['id'] ), |
|
56
|
|
- $shortcode['shortcode'] |
|
|
54
|
+ sprintf( 'entry="%d"', $shortcode[ 'attr' ][ 'entry' ] ), |
|
|
55
|
+ sprintf( 'entry="%d"', $context->entry[ $form_id ][ 'id' ] ), |
|
|
56
|
+ $shortcode[ 'shortcode' ] |
|
57
|
57
|
); |
|
58
|
58
|
|
|
59
|
|
- $content = str_replace( $shortcode['shortcode'], $replace, $content ); |
|
|
59
|
+ $content = str_replace( $shortcode[ 'shortcode' ], $replace, $content ); |
|
60
|
60
|
} |
|
61
|
61
|
|
|
62
|
62
|
return $content; |
Please login to merge, or discard this patch.