michaeluno / admin-page-framework

Facilitates WordPress plugin and theme development.
http://admin-page-framework.michaeluno.jp/
Other
337 stars 71 forks source link

attributes_to_store's deafult value is an empty array #242

Closed szepeviktor closed 8 years ago

szepeviktor commented 8 years ago

May attributes_to_store have a must-have element, id? That would solve #241 also.

michaeluno commented 8 years ago

Are you having a problem storing attribute values associated with an attachment image? I remember id is not necessary.

To check if the argument is functioning,

  1. Enable the Demo of the loader plugin
  2. Perform reset (Dashboard -> Demo -> Manage Options -> Reset).
  3. Go to Dashboard -> Demo -> Built-in Field Types -> Files -> Save Image Attributes and pick an image and set some attribute values in the pop-up box.
  4. Go to Dashboard -> Demo -> Manage Options to see the values are saved properly.

If the attributes are saved, check out the example code of that field (https://github.com/michaeluno/admin-page-framework/blob/3.7.11/example/admin_page/builtin_field_type/file/APF_Demo_BuiltinFieldTypes_File_Image.php#L89-L106). You may try removing the id element and see if the values get stored.

szepeviktor commented 8 years ago

I think fixing #240 causes this problem. I let you fix this as I don't understand certain function, parameters.

michaeluno commented 8 years ago

Closing the topic as the problem is unclear.