Plugin Directory

Changeset 909714


Ignore:
Timestamp:
05/07/2014 01:19:34 PM (12 years ago)
Author:
robmcvey
Message:

Checking version, base path, ready...

Location:
copify/trunk
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • copify/trunk/CopifyWordpress.php

    r909712 r909714  
    44Plugin URI: https://github.com/copify/copify-wordpress
    55Description: Order quality blog posts from Copify's network of professional writers
    6 Version: 1.0.3
     6Version: 1.0.4
    77Author: Rob McVey
    88Author URI: http://uk.copify.com/
     
    3636 * Plugin version
    3737 */
    38     protected $version = '1.0.3';
     38    protected $version = '1.0.4';
    3939
    4040/**
     
    535535                    'post_content' => $job['copy'],
    536536                    'post_status' => 'draft',
    537                     //'post_type' => [ 'post' | 'page' | 'link' | 'nav_menu_item' | 'custom_post_type' ] //You may
     537                    //'post_type' => [ 'post' | 'page' | 'link' | 'nav_menu_item' | 'custom_post_type' ]
    538538                );
    539539
     
    825825        try {
    826826            // NO request URI
    827             if (!isset($_SERVER["REQUEST_URI"])) {
    828                 return;
    829             }
    830             // Valid POST back
    831             $uri = $_SERVER["REQUEST_URI"];
    832             if (!preg_match("/copify-autoapprove/", $uri)) {
     827            if (!isset($_GET["copify-action"])) {
    833828                return;
    834829            }
     
    867862            // Get the job record from the API 
    868863            $job = $this->Copify->jobsView($id);
     864            // Public orders won't have copy field
     865            if (!isset($job['copy'])) {
     866                throw new Exception(sprintf('Can not find copy for order %s', $id));
     867            }
    869868            // Is order marked as complete?
    870869            if (!in_array($job['job_status_id'], array(3,4))) {
    871                 throw new Exception(sprintf('Order %s is not yet complete/approved', $id));
     870                throw new Exception(sprintf('Order %s is not yet complete or approved', $id));
    872871            }
    873872            $newPost = array(
     
    875874                'post_content' => $job['copy'],
    876875                'post_status' => 'publish',
    877                 'post_type' => 'post'  // [ 'post' | 'page' | 'link' | 'nav_menu_item' | 'custom_post_type' ] //You may
     876                'post_type' => 'post'  // [ 'post' | 'page' | 'link' | 'nav_menu_item' | 'custom_post_type' ]
    878877            ); 
    879878            $this->CopifyAddToPosts($id, $newPost);
  • copify/trunk/Views/CopifyViewJob.php

    r896055 r909714  
    183183           
    184184            <!-- This job is already in wordpress.... -->
    185             <?php if(!empty($job['copy']) && $job['job_status_id'] == 4 && $CopifyJobIsPostAlready) :
     185            <?php if(!empty($job['copy']) && $CopifyJobIsPostAlready) :
    186186                $urlText = 'Edit in Wordpress';
    187187                $buttonClass = 'CopifyButton CopifyGreen';
     
    228228           
    229229            <!-- Modal for feedback -->
    230             <?php if(isset($CopifyWriter) && !empty($CopifyWriter) && $job['job_status_id'] == 3) : ?>
     230            <?php if(isset($CopifyWriter) && !empty($CopifyWriter) && $job['job_status_id'] == 3 && !$CopifyJobIsPostAlready) : ?>
    231231           
    232232                <!-- Approve btn -->
  • copify/trunk/readme.txt

    r909126 r909714  
    11=== Copify ===
    2 Version: 1.0.3
     2Version: 1.0.4
    33Contributors: robmcvey
    44Tags: blog writers, automatic blogging, post writers, auto blogging, content, copywriting, copywriters, blogging, writers, writing, seo
Note: See TracChangeset for help on using the changeset viewer.