| @@ -152,8 +152,30 @@ | ||
| 152 | 152 | return apply_filters( 'sharing_image_file_format', $format ); |
| 153 | 153 | } |
| 154 | 154 | |
| 155 | 155 | /** |
| 156 | + * Get autogenerated template index. | |
| 157 | + * | |
| 158 | + * @param string|null $index Optional. Autogenerate template index. | |
| 159 | + */ | |
| 160 | + public static function get_autogenerate_index( $index = null ) { | |
| 161 | + $config = self::get_config(); | |
| 162 | + | |
| 163 | + if ( ! empty( $config['autogenerate'] ) ) { | |
| 164 | + $index = $config['autogenerate']; | |
| 165 | + } | |
| 166 | + | |
| 167 | + /** | |
| 168 | + * Filters autogenerate template index. | |
| 169 | + * | |
| 170 | + * @since 3.1 | |
| 171 | + * | |
| 172 | + * @param string $index Image file format. | |
| 173 | + */ | |
| 174 | + return apply_filters( 'get_autogenerate_index', $index ); | |
| 175 | + } | |
| 176 | + | |
| 177 | + /** | |
| 156 | 178 | * Get quality of generated poster. |
| 157 | 179 | * |
| 158 | 180 | * @param int $quality Optional. Default image quality. |
| 159 | 181 | * |