analogwp / analogwp-templates

Style Kits for Elementor adds a number of intuitive styling controls in the Elementor editor that allow you to apply styles globally or per page.
https://analogwp.com
27 stars 7 forks source link

Feature/371 upload media designated directory #399

Closed gvgvgvijayan closed 2 years ago

gvgvgvijayan commented 4 years ago

Implemented the custom directory feature. Sub-directories created under: uploads/style_kits Template directory: template-23-521-03148a9d Style Kit directory: stylekit-23-39-1408a32a Block directory: block-5-856-47c7e512

  1. When import occurs in code
  2. Apply a filter on a hook that fires up when an image is uploaded
  3. Read that image attachment, and check for _elementor_source_image_hash or _analog_image_hash
  4. If true, add that post ID to a new options object
  5. Remove the filter once we’re finished importing
mauryaratan commented 4 years ago

@gvgvgvijayan As discussed in the weekly meeting, let's see if we can figure a way to grab the attachment IDs imported for that specific template

gvgvgvijayan commented 4 years ago
  1. When import occurs in code
  2. Apply a filter on a hook that fires up when an image is uploaded
  3. Read that image attachment, and check for _elementor_source_image_hash or _analog_image_hash
  4. If true, add that post ID to a new options object
  5. Remove the filter once we’re finished importing