Giter Club home page Giter Club logo

deploy-netlifypress's People

Contributors

nfmohit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

jamacon36

deploy-netlifypress's Issues

๐Ÿš€ Feature request : improve build status inside WP dashboard

Hey !

I'm currently using NetlifyPress on all my WordPress Headless and I quickly realized a problem with the editors of WordPress.

Since they are only editors, and therefore do not have access to the Netlify space, they do not know the build status of Netlify.

The idea here would be to have a metabox or some space within the Dashboard with the Netlify status badge.

This would allow to have an overview for the editors and thus avoid having a feedback or having a "spam" on the trigger button.

Another suggestion at the manual build level would be to have a metabox like "There are x unpublished changes", indicating to the user that he has not used the trigger for a while.

Thanks !

Changing status to draft

Hi @nfmohit

While working on a similar plugin, but for Buddy.works integration I was trying to tackle the problem related to auto-deployment and while looking at your code I saw one bug.

if ( 'auto-draft' == get_post_status( $post_id ) || 'draft' == get_post_status( $post_id ) || wp_is_post_revision( $post_id ) ) {
    return;
}

So if we will unpublish the post/page it won't run and I think it should as unpublishing changes the content of the page.

I used a bit different approach. First of all I used transition_post_status action and then I went for something like this:

function check_post_status( $new_status, $old_status, $post ) {
  if ( 'auto-draft' === $post->post_status || wp_is_post_revision( $post->ID ) ) {
	  return false;
  }
  
  // publishing or updating something
  if ( 'publish' === $new_status ) {
	  return true;
  }
  
  // unpublishing
  if ( 'publish' !== $new_status && 'publish' === $old_status ) {
	  return true;
  }
  
  return false;
  
}

Of course your functionality is a bit different, but I hope you get the point.

Automatic Deployment When Working from WordPress iOS

Hello @nfmohit-wpmudev! Big fan of this plugin, it works wonderfully.

I currently use a couple of WordPress deployments that are mostly updated by authors using the WordPress iOS app. In my testing, it seems like publishing or updating a post from the mobile app does not currently take any advantage of this plugin.

I'm curious โ€”ย I thought there were global sort-of WordPress "hooks" that can be listened to. If these global hooks exist, is this how this plugin works? Is using a "post-published" hook on the WordPress install, triggered by a publish from the app, anywhere in the realm of possibility?

Syntax improvement - main.js

I think that those syntax improvement can be add.

main.js :
(begin of the script)

( function( $ ) { $( document ).ready( function() {

to

( $ => { $(function() {

Because here you have one param (therefore you dont need () ) and you don't use "this" in the first fonction thus you can use a arrow func.

Then next you have the shortcut of ready, like you can see in this documentation : https://learn.jquery.com/using-jquery-core/document-ready/

Syntax improvement - php files

I can see in some files that you used :

<?php echo "something" ?>

but you can use in this case directly :

<?= "something" ?>

its a shortcut.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.