Changeset 1588183
- Timestamp:
- 02/03/2017 01:01:14 PM (9 years ago)
- Location:
- magnet/trunk
- Files:
-
- 3 edited
-
README.txt (modified) (1 diff)
-
WP-klangoo.php (modified) (4 diffs)
-
class-fake-page.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
magnet/trunk/README.txt
r1572498 r1588183 46 46 47 47 == Changelog == 48 = 1.0.10 = 49 * Bug fixes. 48 50 = 1.0.9 = 49 51 * Minor update to help clients integrate easily with the Magnet services. -
magnet/trunk/WP-klangoo.php
r1572498 r1588183 5 5 Plugin URI: http://magnet.klangoo.com/wp-plugin 6 6 Description: This plugin allows Klangoo clients to integrate our services inside their WordPress sites with ease. 7 Version: 1.0. 97 Version: 1.0.10 8 8 Author: Klangoo 9 9 Author URI: http://klangoo.com … … 58 58 <?php 59 59 if ( has_post_thumbnail() ) { 60 $image = wp_get_attachment_image_src( get_post_thumbnail_id(), ' thumbnail-size', true );60 $image = wp_get_attachment_image_src( get_post_thumbnail_id(), 'medium', true ); 61 61 ?> 62 62 <meta itemprop="thumbnailUrl" content="<?php echo esc_url( $image[ 0 ] ); ?>"/> … … 262 262 add_rewrite_rule( 263 263 '^entities/([^/]+)/([^/]+)/([^/]+)/([^/]+)/?$', 264 'index.php?pagename=entities&entid=$matches[1]&entname=$matches[2]&lang=$matches[3]&page=$matches[4]', 264 'index.php?pagename=entities&entid=$matches[1]&entname=$matches[2]&lang=$matches[3]&paged=$matches[4]', 265 'top' 266 ); 267 268 add_rewrite_rule( 269 '^entities/([^/]+)/([^/]+)/([^/]+)/?$', 270 'index.php?pagename=entities&entid=$matches[1]&entname=$matches[2]&lang=$matches[3]', 265 271 'top' 266 272 ); … … 270 276 /* Runs on plugin deactivation*/ 271 277 register_deactivation_hook( __FILE__, 'magnet_remove' ); 272 register_activation_hook( __FILE__, 'magnet_rewrite_add_rewrites' );278 //register_activation_hook( __FILE__, 'magnet_rewrite_add_rewrites' ); 273 279 274 280 add_action( 'wp_head', 'magnet_head' ); -
magnet/trunk/class-fake-page.php
r1534359 r1588183 164 164 $post = $this -> createPost( $this -> rel_entity_slug, $this -> rel_entity_title, -800 ); 165 165 $posts[] = $post; 166 /** 167 * Trick wp_query into thinking this is a page (necessary for wp_title() at least) 168 * Not sure if it's cheating or not to modify global variables in a filter 169 * but it appears to work and the codex doesn't directly say not to. 170 */ 166 171 167 $wp_query->queried_object = $post; 172 168 $wp_query -> is_page = true; … … 184 180 $post = $this -> createPost( $this -> rel_entity_slug_new, $this -> rel_entity_title, -700 ); 185 181 $posts[] = $post; 186 /** 187 * Trick wp_query into thinking this is a page (necessary for wp_title() at least) 188 * Not sure if it's cheating or not to modify global variables in a filter 189 * but it appears to work and the codex doesn't directly say not to. 190 */ 182 191 183 $wp_query->queried_object = $post; 192 184 $wp_query -> is_page = true;
Note: See TracChangeset
for help on using the changeset viewer.