{"id":32245,"date":"2014-10-13T09:51:32","date_gmt":"2014-10-13T09:51:32","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/front-end-post-edit\/"},"modified":"2014-10-13T11:01:49","modified_gmt":"2014-10-13T11:01:49","slug":"front-end-post-edit","status":"closed","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/front-end-post-edit\/","author":5749650,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0.4","stable_tag":"1.0.9","tested":"4.0.0","requires":"4.0","requires_php":"","requires_plugins":"","header_name":"custom post edit","header_author":"Christopher Churchill","header_description":"","assets_banners_color":"","last_updated":"2014-10-13 11:01:49","external_support_url":"","external_repository_url":"","donate_link":"http:\/\/buildawebdoctor.com","header_plugin_uri":"http:\/\/buildawebdoctor.com","header_author_uri":"http:\/\/buildawebdoctor.com","rating":0,"author_block_rating":0,"active_installs":0,"downloads":1424,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","changelog"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":0},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0","1.0.1","1.0.2","1.0.3","1.0.4","1.0.5","1.0.6","1.0.7","1.0.8","1.0.9"],"block_files":[],"assets_screenshots":[],"screenshots":{"1":"This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Note that the screenshot is taken from the \/assets directory or the directory that contains the stable readme.txt (tags or trunk). Screenshots in the \/assets directory take precedence. For example, <code>\/assets\/screenshot-1.png<\/code> would win over <code>\/tags\/4.3\/screenshot-1.png<\/code>\n(or jpg, jpeg, gif).","2":"This is the second screen shot"}},"plugin_section":[],"plugin_tags":[31135,31134],"plugin_category":[],"plugin_contributors":[],"plugin_business_model":[],"class_list":["post-32245","plugin","type-plugin","status-closed","hentry","plugin_tags-angularjs-forms","plugin_tags-wordpress-frontend-post-edit","plugin_committers-vimes1984"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/front-end-post-edit.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>This plugin is intented for Developers only it's a effort to implement a simple custom front end post edit form using angularJS.<\/p>\n <p>I'll be tracking issues via github:<\/p>\n <p>https:\/\/github.com\/vimes1984\/custompostedit\/<\/p>\n <p>It uses angularJS for the form and  requires you pass a <code>$_GET['posttoedit']<\/code> variable in the url to the form containing the post ID you want to edit.<\/p>\n <p>Example: <\/p>\n <pre><code> http:\/\/EXAMPLE.com\/?posttoedit=POST_ID_TO_EDIT \n<\/code><\/pre>\n <p>You are going to need to update three files to get this up and running first the form:<\/p>\n <p>These fileds need to match the following syntax where  in this case monthlysalary will be the object passed to  the php function:<\/p>\n <p>Example: <\/p>\n <pre><code> &lt;input type=\"text\" name=\"jobtitle\" ng-model=\"formobject.monthlysalary\" placeholder=\"Monthly Salary\" \/&gt; \n<\/code><\/pre>\n <p>File: <\/p>\n <pre><code> \/includes\/customedit.php \n<\/code><\/pre>\n <p>Then the class customPostEdit-&gt;post_edit_fac() method,  line 237-&gt; 262 is the function that actually updates the post and is called from the javascript:<\/p>\n <p>File: <\/p>\n <pre><code> customPostEdit.php \n<\/code><\/pre>\n <p>you are going to need to fill these in with the fields you want to update you can find the default fields here:<\/p>\n <p>http:\/\/codex.wordpress.org\/Database_Description#Table:_wp_posts<\/p>\n <p>And you can update post meta fields like so:<\/p>\n <p>Example: <\/p>\n <pre><code> update_post_meta( $postID, 'wpcf-monthly-salary', $monthlysalary ); \n<\/code><\/pre>\n <p>There is one last file you may need to edit and that's the AngularJS file you may need to change \nExample: <\/p>\n <pre><code> $scope.formobject = {'jobID': '', 'title': '', 'jobcontent': '', 'monthlysalary': ''};  \n<\/code><\/pre>\n <p>Object to match your form fields in this file:<\/p>\n <p>File: <\/p>\n <pre><code> \/js\/custom-post-edit.js \n<\/code><\/pre>\n <p>This file calls the php endpoint we defined in the first file the post_edit_fac and sends the formobject {}  to that function from the form.<\/p>\n <p>You can place the form anywhere you want using the shortcode:<\/p>\n <p>Shortcode: <\/p>\n <pre><code> [post_edit] \n<\/code><\/pre>\n <p>Good luck and post any issues to github I'll gladly lend a hand...<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload `` to the <code>\/wp-content\/plugins\/<\/code> directory<\/li>\n<li>Activate the plugin through the \"Plugins\" menu in WordPress<\/li>\n<li>Place <code>&lt;?php do_action(\"custom-post-edit_hook\"); ?&gt;<\/code> in your templates<\/li>\n<\/ol>\n\n<!--section=changelog-->\n<h4>1.0.9<\/h4>\n <p>*updated readme and added instructions<\/p>\n <h4>1.0.8<\/h4>\n <p>*updated readme and added instructions<\/p>\n <h4>1.0.7<\/h4>\n <p>*updated readme<\/p>\n <h4>1.0.6<\/h4>\n <p>*updated readme<\/p>\n <h4>1.0.5<\/h4>\n <p>*updated readme<\/p>\n <h4>1.0.4<\/h4>\n <p>*updated readme<\/p>\n <h4>1.0.3<\/h4>\n <p>*updated readme<\/p>\n <h4>1.0.2<\/h4>\n <p>*updated readme<\/p>\n <h4>1.0.1<\/h4>\n <p>*updated readme<\/p>\n <h4>1.0<\/h4>\n <ul>\n<li>Initial Commit<\/li>\n<\/ul>","raw_excerpt":"Frontend post edit using angularJS","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/32245","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=32245"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/vimes1984"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=32245"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=32245"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=32245"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=32245"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=32245"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=32245"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}