  In an earlier paper we have analytically determined the photon regions and
the shadows of black holes of the Pleba\'nski class of metrics which are also
known as the Kerr--Newman--NUT--(anti-)deSitter metrics. These metrics are
characterized by six parameters: mass, spin, electric and magnetic charge,
gravitomagnetic NUT charge, and the cosmological constant. Here we extend this
analysis to the Pleba\'nski--Demia\'nski class of metrics which contains, in
addition to these six parameters, the so-called acceleration parameter. All
these metrics are axially symmetric and stationary type D solutions to the
Einstein--Maxwell equations with a cosmological constant. We derive analytical
formulas for the photon regions (i.e., for the regions that contain spherical
lightlike geodesics) and for the boundary curve of the shadow as it is seen by
an observer at Boyer--Lindquist coordinates $(r_O, \vartheta _O)$ in the domain
of outer communication. Whereas all relevant formulas are derived for the whole
Pleba\'nski--Demia\'nski class, we concentrate on the accelerated Kerr metric
(i.e., only mass, spin and acceleration parameter are different from zero) when
discussing the influence of the acceleration parameter on the photon region and
on the shadow in terms of pictures. The accelerated Kerr metric is also known
as the rotating $C$-metric. We discuss how our analytical formulas can be used
for calculating the horizontal and vertical angular diameters of the shadow and
we estimate these values for the black holes at the center of our Galaxy and at
the center of M87.
