Plugin Directory

Changeset 3224409


Ignore:
Timestamp:
01/17/2025 04:13:18 PM (15 months ago)
Author:
skyword
Message:

Fix data element name

File:
1 edited

Legend:

Unmodified
Added
Removed
  • skyword-publishing-api/tags/1.1.4/php/routes/class-skyword-posts.php

    r3224269 r3224409  
    386386                    $frag = $trackDoc->createElement("div", "");
    387387                    $frag->setAttribute("id", "NC-Skyword-CID");
    388                     $frag->setAttribute("data-skyword-id", $skywordContentId);
     388                    $frag->setAttribute("data-skyword_id", $skywordContentId);
    389389                    $elements->item(0)->appendChild($frag);
    390390                    $newBody = $trackDoc->saveHTML();
     
    659659     */
    660660    protected function checkContentExists($skywordId, $postType ) {
    661         $query = array(
     661        $queryParms = array(
    662662            'ignore_sticky_posts' => true,
    663663            'meta_key'            => 'skywordId',
     
    679679            )
    680680        );
    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();
    684686                $str = get_the_ID();
    685687
     
    687689            endwhile;
    688690        else :
    689             $query = array(
     691            $queryParms = array(
    690692                'ignore_sticky_posts' => true,
    691693                'meta_key'            => 'skyword_content_id',
     
    707709                )
    708710            );
    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();
    712716                    $str = get_the_ID();
    713717
Note: See TracChangeset for help on using the changeset viewer.