Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

complete renaming tenup_autotweet -> autotweet #49

Merged
merged 21 commits into from
Nov 15, 2019
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
[
"@wordpress/babel-plugin-makepot",
{
"output": "languages/autotweet.pot",
"output": "languages/autoshare-for-twitter.pot"
}
],
]
]
}
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"globals": {
"adminAutotweet": "readonly",
"adminAutoshareForTwitter": "readonly",
"jQuery": "readonly",
"wp": "readonly"
},
Expand Down
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
## [0.1.0] - 2018-05-11
- Initial closed source release

[Unreleased]: https://github.com/10up/autotweet/compare/master...develop
[1.0.0]: https://github.com/10up/autotweet/compare/1020035...1.0.0
[0.1.0]: https://github.com/10up/autotweet/commit/1020035f2d4843221d996bd5f8fe39d9ee850b5d
[Unreleased]: https://github.com/10up/autoshare-for-twitter/compare/master...develop
[1.0.0]: https://github.com/10up/autoshare-for-twitter/compare/1020035...1.0.0
[0.1.0]: https://github.com/10up/autoshare-for-twitter/commit/1020035f2d4843221d996bd5f8fe39d9ee850b5d
14 changes: 7 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ The following is a set of guidelines for contributors as well as information and

## Ways to contribute

Contributing isn't just writing code - it's anything that improves the project. All contributions for AutoTweet are managed right here on GitHub. Here are some ways you can help:
Contributing isn't just writing code - it's anything that improves the project. All contributions for AutoShare for Twitter are managed right here on GitHub. Here are some ways you can help:

### Reporting bugs

If you're running into an issue with the plugin, please take a look through [existing issues](https://github.com/10up/autotweet/issues) and [open a new one](https://github.com/10up/autotweet/issues/new) if needed. If you're able, include steps to reproduce, environment information, and screenshots/screencasts as relevant.
If you're running into an issue with the plugin, please take a look through [existing issues](https://github.com/10up/autoshare-for-twitter/issues) and [open a new one](https://github.com/10up/autoshare-for-twitter/issues/new) if needed. If you're able, include steps to reproduce, environment information, and screenshots/screencasts as relevant.

### Suggesting enhancements

New features and enhancements are also managed via [issues](https://github.com/10up/autotweet/issues).
New features and enhancements are also managed via [issues](https://github.com/10up/autoshare-for-twitter/issues).

### Pull requests

Expand All @@ -29,14 +29,14 @@ The `develop` branch is the development branch which means it contains the next
## Release instructions

1. Starting from `develop`, cut a release branch named `release/X.Y.Z` for your changes.
2. Version bump: Bump the version number in `autotweet.php` if it does not already reflect the version being released.
2. Version bump: Bump the version number in `autoshare-for-twitter.php` if it does not already reflect the version being released.
3. Changelog: Add/update the changelog in `CHANGELOG.md` and `readme.txt`
4. Update the `.pot` file by running `npm run makepot`.
5. Check to be sure any new files/paths that are unnecessary in the production version are included in `.github/action-release/rsync-filter.txt`.
6. Merge: Make a non-fast-forward merge from your release branch to `develop`, then do the same for `develop` into `master`. `master` contains the stable development version.
7. Push: Push your `master` branch to GitHub, e.g. `git push origin master`.
8. [Wait for build](https://xkcd.com/303/): Head to the [Actions](https://github.com/10up/autotweet/actions) tab in the repo and wait for it to finish if it hasn't already. If it doesn't succeed, figure out why and start over.
8. [Wait for build](https://xkcd.com/303/): Head to the [Actions](https://github.com/10up/autoshare-for-twitter/actions) tab in the repo and wait for it to finish if it hasn't already. If it doesn't succeed, figure out why and start over.
9. Check the build: Check out the `stable` branch and test for functionality locally.
10. Git tag: Create the release as `X.Y.Z` on the `stable` branch in GitHub. It should now appear under [releases](https://github.com/10up/autotweet/releases) and in the WordPress admin as an update as well.
11. Edit the [X.Y.Z milestone](https://github.com/10up/autotweet/milestone/#) with release date (in the `Due date (optional)` field) and link to GitHub release (in the `Description` field), then close `X.Y.Z` milestone.
10. Git tag: Create the release as `X.Y.Z` on the `stable` branch in GitHub. It should now appear under [releases](https://github.com/10up/autoshare-for-twitter/releases) and in the WordPress admin as an update as well.
11. Edit the [X.Y.Z milestone](https://github.com/10up/autoshare-for-twitter/milestone/#) with release date (in the `Due date (optional)` field) and link to GitHub release (in the `Description` field), then close `X.Y.Z` milestone.
12. If any open issues or PRs which were milestoned for `X.Y.Z` do not make it into the release, update their milestone to `X+1.0.0`, `X.Y+1.0`, `X.Y.Z+1`, or `Future Release`
46 changes: 25 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,63 +1,67 @@
# Auto Tweet
# Autoshare for Twitter

> Automatically tweets the post title or custom message and a link to the post.

[![Support Level](https://img.shields.io/badge/support-active-green.svg)](#support-level) [![Release Version](https://img.shields.io/github/release/10up/autotweet.svg)](https://github.com/10up/autotweet/releases/latest) ![WordPress tested up to version](https://img.shields.io/badge/WordPress-v4.9.8%20tested-success.svg) [![MIT License](https://img.shields.io/github/license/10up/autotweet.svg)](https://github.com/10up/autotweet/blob/develop/LICENSE.md)
[![Support Level](https://img.shields.io/badge/support-active-green.svg)](#support-level) [![Release Version](https://img.shields.io/github/release/10up/autoshare-for-twitter.svg)](https://github.com/10up/autoshare-for-twitter/releases/latest) ![WordPress tested up to version](https://img.shields.io/badge/WordPress-v5.2.3%20tested-success.svg) [![MIT License](https://img.shields.io/github/license/10up/autoshare-for-twitter.svg)](https://github.com/10up/autoshare-for-twitter/blob/develop/LICENSE.md)

johnwatkins0 marked this conversation as resolved.
Show resolved Hide resolved
## Overview

**Disclaimer:** *TWITTER, TWEET, RETWEET and the Twitter logo are trademarks of Twitter, Inc. or its affiliates.*
**Disclaimer:** _TWITTER, TWEET, RETWEET and the Twitter logo are trademarks of Twitter, Inc. or its affiliates._

**Note:** Posts and pages are supported by default. Developers can use the `tenup_autotweet_default_post_types` filter to change the default supported post types (for more, see #25). The plugin namespace changed to just 'autotweet' as of version 1.0.0.
**Note:** Posts and pages are supported by default. Developers can use the `autoshare_for_twitter_default_post_types` filter to change the default supported post types (for more, see #25). The plugin namespace changed to just 'autoshare' as of version 1.0.0.

Custom post types can now be opted into autotweet features like so:
Custom post types can now be opted into autoshare features like so:

```php
function opt_my_cpt_into_autotweet() {
add_post_type_support( 'my-cpt', 'autotweet' );
function opt_my_cpt_into_autoshare() {
add_post_type_support( 'my-cpt', 'autoshare-for-twitter' );
}
add_action( 'init', 'opt_my_cpt_into_autotweet' );
add_action( 'init', 'opt_my_cpt_into_autoshare' );
```

In addition, adding support while registering custom post types also works. Post types are automatically set to auto-tweet. Future versions of this plugin could allow this to be set manually.
In addition, adding support while registering custom post types also works. Post types are automatically set to autoshare. Future versions of this plugin could allow this to be set manually.

## Plugin Compatibility ##
## Plugin Compatibility

### Distributor ###
When using with 10up's [Distributor plugin](https://github.com/10up/distributor), posts that are distributed will not auto-tweet if they are already tweeted from the origin site. Autotweet tracks posts that have been tweeted in post meta to avoid "double tweeting". To avoid this behavior, use the `dt_blacklisted_meta` filter to exclude the 'autotweet_twitter-status' meta value from being distrivuted :
### Distributor

When using with 10up's [Distributor plugin](https://github.com/10up/distributor), posts that are distributed will not be autoshared if they are already tweeted from the origin site. Autoshare for Twitter tracks posts that have been tweeted in post meta to avoid "double tweeting". To avoid this behavior, use the `dt_blacklisted_meta` filter to exclude the 'autoshare_for_twitter_status' meta value from being distrivuted :

```php
add_filter( 'dt_blacklisted_meta', function( $blacklisted_metas ) {
$blacklisted_metas[] = 'autotweet_twitter-status';
$blacklisted_metas[] = 'autoshare_for_twitter_status';
return $blacklisted_metas;
} )
```

## Requirements

* PHP 7.0+
* [WordPress](http://wordpress.org) 4.7+
- PHP 7.0+
- [WordPress](http://wordpress.org) 4.7+

## Installation
1. Upload the entire `/tenup-auto-tweet` directory to the `/wp-content/plugins/` directory.

1. Upload the entire `/autoshare-for-twitter` directory to the `/wp-content/plugins/` directory.
2. Activate the plugin
3. Register post type support for types that should be allowed to auto tweet. `add_post_type_support( 'post', 'autotweet' );`
3. Register post type support for types that should be allowed to autoshare. `add_post_type_support( 'post', 'autoshare-for-twitter' );`

## FAQs

### Does this plugin work with Gutenberg?
Yes, yes it does! For more details on this, see #44.

Yes, yes it does! For more details on this, see #44.

## Support Level

**Active:** 10up is actively working on this, and we expect to continue work for the foreseeable future including keeping tested up to the most recent version of WordPress. Bug reports, feature requests, questions, and pull requests are welcome.
**Active:** 10up is actively working on this, and we expect to continue work for the foreseeable future including keeping tested up to the most recent version of WordPress. Bug reports, feature requests, questions, and pull requests are welcome.

## Changelog

A complete listing of all notable changes to Eight Day Week are documented in [CHANGELOG.md](https://github.com/10up/autotweet/blob/develop/CHANGELOG.md).
A complete listing of all notable changes to Autoshare for Twitter are documented in [CHANGELOG.md](https://github.com/10up/autoshare-for-twitter/blob/develop/CHANGELOG.md).

## Contributing

Please read [CODE_OF_CONDUCT.md](https://github.com/10up/autotweet/blob/develop/CODE_OF_CONDUCT.md) for details on our code of conduct, [CONTRIBUTING.md](https://github.com/10up/autotweet/blob/develop/CONTRIBUTING.md) for details on the process for submitting pull requests to us, and [CREDITS.md](https://github.com/10up/autotweet/blob/develop/CREDITS.md) for a listing of maintainers, contributors, and libraries for Auto Tweet.
Please read [CODE_OF_CONDUCT.md](https://github.com/10up/autoshare-for-twitter/blob/develop/CODE_OF_CONDUCT.md) for details on our code of conduct, [CONTRIBUTING.md](https://github.com/10up/autoshare-for-twitter/blob/develop/CONTRIBUTING.md) for details on the process for submitting pull requests to us, and [CREDITS.md](https://github.com/10up/autoshare-for-twitter/blob/develop/CREDITS.md) for a listing of maintainers, contributors, and libraries for Autoshare for Twitter.

## Like what you see?

Expand Down
104 changes: 104 additions & 0 deletions assets/css/admin-autoshare-for-twitter.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
#autoshare_for_twitter_metabox p::before {
display: inline-block;
margin-left: -1px;
padding-right: 3px;
vertical-align: top;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

#autoshare_for_twitter_metabox pre {
font-size: 11px;
white-space: normal;
}

.autoshare-for-twitter-prepublish__checkbox .components-base-control__field, .autoshare-for-twitter-prepublish__checkbox-label {
display: flex;
align-items: center;
}

.autoshare-for-twitter-prepublish__checkbox .components-base-control__field {
margin-top: 0.5rem;
}

.autoshare-for-twitter-prepublish__checkbox-label svg {
margin-right: 0.5rem;
}

.autoshare-for-twitter-prepublish__message-label {
display: flex;
justify-content: space-between;
}

.autoshare-for-twitter-prepublish__checkbox-row input[type=checkbox].components-checkbox-control__input {
margin-right: 0.5rem;
}

.autoshare-for-twitter-prepublish__override-row {
padding: 0.5rem 0;
}

.autoshare-for-twitter-prepublish__override-row .components-button {
margin-bottom: 1rem;
}

.autoshare-for-twitter-post-status {
font-style: italic;
}

.autoshare-for-twitter-post-status svg {
transform: translate3d(0, 3px, 0);
margin-right: 5px;
}

#autoshare-for-twitter-icon.pending,
.autoshare-for-twitter-prepublish__checkbox-row .dashicons-twitter.pending {
animation: fadeIn 1s infinite alternate;
color: #00aced;
}

#autoshare-for-twitter-icon.enabled,
.autoshare-for-twitter-prepublish__checkbox-row .dashicons-twitter.enabled {
color: #00aced;
}

#autoshare-for-twitter-icon.disabled,
.autoshare-for-twitter-prepublish__checkbox-row .dashicons-twitter.disabled {
color: #72777c;
}

@keyframes fadeIn {
from {
opacity: 0;
color: #72777c;
}
}

a#autoshare-for-twitter-edit {
color: #0073aa;
text-decoration: underline;
transition-property: border, background, color;
transition-duration: .05s;
transition-timing-function: ease-in-out
}

#autoshare-for-twitter-override-body {
margin: 4px 0;
}

textarea#autoshare-for-twitter-text {
margin: 4px 0 0;
width: 100%
}
span#autoshare-for-twitter-counter-wrap {
background: rgba(0, 0, 0, 0.07);
font-family: Consolas, Monaco, monospace;
}

span.near-limit {
color: darkorange;
}

span.over-limit {
color: red;
}
104 changes: 0 additions & 104 deletions assets/css/admin-autotweet.css

This file was deleted.

Loading