@@ 136-145 (lines=10) @@ | ||
133 | * See core ticket: |
|
134 | * https://core.trac.wordpress.org/ticket/39304 |
|
135 | */ |
|
136 | if ( isset( $GLOBALS['post'] ) ) { |
|
137 | $juggle_post = $GLOBALS['post']; |
|
138 | $GLOBALS['post'] = $post; // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited |
|
139 | $galleries = get_post_galleries( $post->ID, false ); |
|
140 | $GLOBALS['post'] = $juggle_post; // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited |
|
141 | } else { |
|
142 | $GLOBALS['post'] = $post; // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited |
|
143 | $galleries = get_post_galleries( $post->ID, false ); |
|
144 | unset( $GLOBALS['post'] ); |
|
145 | } |
|
146 | ||
147 | foreach ( $galleries as $gallery ) { |
|
148 | if ( isset( $gallery['type'] ) && 'slideshow' === $gallery['type'] && ! empty( $gallery['ids'] ) ) { |
@@ 128-137 (lines=10) @@ | ||
125 | * See core ticket: |
|
126 | * https://core.trac.wordpress.org/ticket/39304 |
|
127 | */ |
|
128 | if ( isset( $GLOBALS['post'] ) ) { |
|
129 | $juggle_post = $GLOBALS['post']; |
|
130 | $GLOBALS['post'] = $post; |
|
131 | $galleries = get_post_galleries( $post->ID, false ); |
|
132 | $GLOBALS['post'] = $juggle_post; |
|
133 | } else { |
|
134 | $GLOBALS['post'] = $post; |
|
135 | $galleries = get_post_galleries( $post->ID, false ); |
|
136 | unset( $GLOBALS['post'] ); |
|
137 | } |
|
138 | ||
139 | foreach ( $galleries as $gallery ) { |
|
140 | if ( isset( $gallery['type'] ) && 'slideshow' === $gallery['type'] && ! empty( $gallery['ids'] ) ) { |