Changeset 3224409
- Timestamp:
- 01/17/2025 04:13:18 PM (15 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
skyword-publishing-api/tags/1.1.4/php/routes/class-skyword-posts.php
r3224269 r3224409 386 386 $frag = $trackDoc->createElement("div", ""); 387 387 $frag->setAttribute("id", "NC-Skyword-CID"); 388 $frag->setAttribute("data-skyword -id", $skywordContentId);388 $frag->setAttribute("data-skyword_id", $skywordContentId); 389 389 $elements->item(0)->appendChild($frag); 390 390 $newBody = $trackDoc->saveHTML(); … … 659 659 */ 660 660 protected function checkContentExists($skywordId, $postType ) { 661 $query = array(661 $queryParms = array( 662 662 'ignore_sticky_posts' => true, 663 663 'meta_key' => 'skywordId', … … 679 679 ) 680 680 ); 681 query_posts( $query ); 682 if ( have_posts() ) : 683 while ( have_posts() ) : the_post(); 681 $query = new WP_Query(); 682 $query->parse_query($queryParms); 683 $posts = $query->get_posts(); 684 if ( $query->have_posts() ) : 685 while ( $query->have_posts() ) : $query->the_post(); 684 686 $str = get_the_ID(); 685 687 … … 687 689 endwhile; 688 690 else : 689 $query = array(691 $queryParms = array( 690 692 'ignore_sticky_posts' => true, 691 693 'meta_key' => 'skyword_content_id', … … 707 709 ) 708 710 ); 709 query_posts( $query ); 710 if ( have_posts() ) : 711 while ( have_posts() ) : the_post(); 711 $query = new WP_Query(); 712 $query->parse_query($queryParms); 713 $posts = $query->get_posts(); 714 if ( $query->have_posts() ) : 715 while ( $query->have_posts() ) : $query->the_post(); 712 716 $str = get_the_ID(); 713 717
Note: See TracChangeset
for help on using the changeset viewer.