Giter Site home page Giter Site logo

import-fixers's Introduction

Import-Fixers

Collection of WP-CLI commands to help fix up imports.

NAME
  wp fix

DESCRIPTION
  Commands to fix things within Post content, usually post-import.

SYNOPSIS
  wp fix <command>

SUBCOMMANDS
  internal-links      Tries to fix internal links.
  img-src-from-links  ?

internal-links

NAME
  wp fix internal-links

DESCRIPTION
  Fixes internal links by finding URLs on `old_domain` and getting the current link to that post by looking in post_meta for a specific `meta_key` match.

SYNOPSIS
  wp fix internal_links --old_domain=<domain> [--meta_key=<_original_url>] [--enact]

Defaults to a dry-run mode.

OPTIONS
  --old_domain
    Previous domain name in links that need updating. Do NOT add protocol!

  [--meta_key]
    Post meta key name to check URLs against. Defaults to "_original_url".

  [--enact]
    Set this flag to actually make the replacements.
```

## img-src-from-links

NAME wp fix img-src-from-links

DESCRIPTION Repairs empty <img src=""> attributes which are wrapped in a link to an image.

SYNOPSIS wp fix img_src_from_links

Defaults to a dry-run mode.

import-fixers's People

Contributors

paulgibbs avatar roborourke avatar tcrsavage avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

import-fixers's Issues

Code Review

Looks solid, only minor things which you might just want to ignore

https://github.com/humanmade/Import-Fixers/blob/master/hm-import-fixers.php#L82

A bit more docblock explanation here would be useful, took me a minute to work out why calling get_posts inside a while definition was intentional.

https://github.com/humanmade/Import-Fixers/blob/master/hm-import-fixers.php#L5

Better to just check if ( ! class_exists( 'WP_CLI_Command' ) ) {} here?

https://github.com/humanmade/Import-Fixers/blob/master/hm-import-fixers.php#L41

dry_run defaulting to true seems like a more standard approach here.

https://github.com/humanmade/Import-Fixers/blob/master/hm-import-fixers.php#L46

tabbing

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.