Changeset 909714
- Timestamp:
- 05/07/2014 01:19:34 PM (12 years ago)
- Location:
- copify/trunk
- Files:
-
- 1 added
- 3 edited
-
CopifyWordpress.php (modified) (6 diffs)
-
Views/CopifyViewJob.php (modified) (2 diffs)
-
index.php (added)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
copify/trunk/CopifyWordpress.php
r909712 r909714 4 4 Plugin URI: https://github.com/copify/copify-wordpress 5 5 Description: Order quality blog posts from Copify's network of professional writers 6 Version: 1.0. 36 Version: 1.0.4 7 7 Author: Rob McVey 8 8 Author URI: http://uk.copify.com/ … … 36 36 * Plugin version 37 37 */ 38 protected $version = '1.0. 3';38 protected $version = '1.0.4'; 39 39 40 40 /** … … 535 535 'post_content' => $job['copy'], 536 536 'post_status' => 'draft', 537 //'post_type' => [ 'post' | 'page' | 'link' | 'nav_menu_item' | 'custom_post_type' ] //You may537 //'post_type' => [ 'post' | 'page' | 'link' | 'nav_menu_item' | 'custom_post_type' ] 538 538 ); 539 539 … … 825 825 try { 826 826 // 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"])) { 833 828 return; 834 829 } … … 867 862 // Get the job record from the API 868 863 $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 } 869 868 // Is order marked as complete? 870 869 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)); 872 871 } 873 872 $newPost = array( … … 875 874 'post_content' => $job['copy'], 876 875 'post_status' => 'publish', 877 'post_type' => 'post' // [ 'post' | 'page' | 'link' | 'nav_menu_item' | 'custom_post_type' ] //You may876 'post_type' => 'post' // [ 'post' | 'page' | 'link' | 'nav_menu_item' | 'custom_post_type' ] 878 877 ); 879 878 $this->CopifyAddToPosts($id, $newPost); -
copify/trunk/Views/CopifyViewJob.php
r896055 r909714 183 183 184 184 <!-- 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) : 186 186 $urlText = 'Edit in Wordpress'; 187 187 $buttonClass = 'CopifyButton CopifyGreen'; … … 228 228 229 229 <!-- 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) : ?> 231 231 232 232 <!-- Approve btn --> -
copify/trunk/readme.txt
r909126 r909714 1 1 === Copify === 2 Version: 1.0. 32 Version: 1.0.4 3 3 Contributors: robmcvey 4 4 Tags: 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.