{"id":552,"date":"2019-01-05T14:21:18","date_gmt":"2019-01-05T08:51:18","guid":{"rendered":"https:\/\/imageattributespro.com\/?post_type=codex&p=552"},"modified":"2021-06-18T01:03:00","modified_gmt":"2021-06-17T19:33:00","slug":"iaffpro_included_post_types","status":"publish","type":"codex","link":"https:\/\/imageattributespro.com\/codex\/iaffpro_included_post_types\/","title":{"rendered":"iaffpro_included_post_types"},"content":{"rendered":"\n

Filter the list of post types that the Image Attributes Pro bulk updater should update. <\/p>\n\n\n\n

The default value is an empty array and this will update all post types. <\/p>\n\n\n\n

\/** \n * Get a list of post types to update\n * \n * Default is an empty array and empty array will update all post types.\n * \n * @since 1.3\n *\/\n$included_post_types = apply_filters( 'iaffpro_included_post_types', array() );<\/code><\/pre>\n\n\n\n

Example Usage<\/h2>\n\n\n\n

To update image attributes such as title, caption, description and alt text only in WooCommerce products, add the following code to the functions.php<\/code> of the active theme. <\/p>\n\n\n\n

\/**\n * Update image attributes in WooCommerce products only.\n * \n * The post type for a WooCommerce product is 'product'\n * \n * @author Arun Basil Lal\n * @link https:\/\/imageattributespro.com\/codex\/iaffpro_included_post_types\/\n *\/\nfunction prefix_iap_update_products_only( $included_post_types ) {\n\t\n\t$included_post_types[] = 'product';\n\t\n\treturn $included_post_types;\n}\nadd_filter( 'iaffpro_included_post_types', 'prefix_iap_update_products_only' );<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"

Filter the list of post types that the Image Attributes Pro bulk updater should update. The default value is an empty array and this will update all post types. Example Usage To update image attributes such as title, caption, description and alt text only in WooCommerce products, add the following code to the functions.php of […]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"open","template":"","format":"standard","meta":[],"tags":[],"codex-type":[27],"_links":{"self":[{"href":"https:\/\/imageattributespro.com\/wp-json\/wp\/v2\/codex\/552"}],"collection":[{"href":"https:\/\/imageattributespro.com\/wp-json\/wp\/v2\/codex"}],"about":[{"href":"https:\/\/imageattributespro.com\/wp-json\/wp\/v2\/types\/codex"}],"author":[{"embeddable":true,"href":"https:\/\/imageattributespro.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/imageattributespro.com\/wp-json\/wp\/v2\/comments?post=552"}],"version-history":[{"count":3,"href":"https:\/\/imageattributespro.com\/wp-json\/wp\/v2\/codex\/552\/revisions"}],"predecessor-version":[{"id":1934,"href":"https:\/\/imageattributespro.com\/wp-json\/wp\/v2\/codex\/552\/revisions\/1934"}],"wp:attachment":[{"href":"https:\/\/imageattributespro.com\/wp-json\/wp\/v2\/media?parent=552"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/imageattributespro.com\/wp-json\/wp\/v2\/tags?post=552"},{"taxonomy":"codex-type","embeddable":true,"href":"https:\/\/imageattributespro.com\/wp-json\/wp\/v2\/codex-type?post=552"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}