@@ 1910-1951 (lines=42) @@ | ||
1907 | } else { |
|
1908 | $value = esc_attr($value); |
|
1909 | } |
|
1910 | } elseif ( 'db' == $context ) { |
|
1911 | if ( $prefixed ) { |
|
1912 | ||
1913 | /** |
|
1914 | * Filters the value of a specific post field before saving. |
|
1915 | * |
|
1916 | * The dynamic portion of the hook name, `$field`, refers to the post |
|
1917 | * field name. |
|
1918 | * |
|
1919 | * @since 2.3.0 |
|
1920 | * |
|
1921 | * @param mixed $value Value of the post field. |
|
1922 | */ |
|
1923 | $value = apply_filters( "pre_{$field}", $value ); |
|
1924 | ||
1925 | /** |
|
1926 | * Filters the value of a specific field before saving. |
|
1927 | * |
|
1928 | * The dynamic portion of the hook name, `$field_no_prefix`, refers |
|
1929 | * to the post field name. |
|
1930 | * |
|
1931 | * @since 2.3.0 |
|
1932 | * |
|
1933 | * @param mixed $value Value of the post field. |
|
1934 | */ |
|
1935 | $value = apply_filters( "{$field_no_prefix}_save_pre", $value ); |
|
1936 | } else { |
|
1937 | $value = apply_filters( "pre_post_{$field}", $value ); |
|
1938 | ||
1939 | /** |
|
1940 | * Filters the value of a specific post field before saving. |
|
1941 | * |
|
1942 | * The dynamic portion of the hook name, `$field`, refers to the post |
|
1943 | * field name. |
|
1944 | * |
|
1945 | * @since 2.3.0 |
|
1946 | * |
|
1947 | * @param mixed $value Value of the post field. |
|
1948 | */ |
|
1949 | $value = apply_filters( "{$field}_pre", $value ); |
|
1950 | } |
|
1951 | } else { |
|
1952 | ||
1953 | // Use display filters by default. |
|
1954 | if ( $prefixed ) { |
@@ 1573-1613 (lines=41) @@ | ||
1570 | $value = esc_html($value); // textarea_escaped |
|
1571 | else |
|
1572 | $value = esc_attr($value); |
|
1573 | } elseif ( 'db' == $context ) { |
|
1574 | ||
1575 | /** |
|
1576 | * Filters a term field value before it is sanitized. |
|
1577 | * |
|
1578 | * The dynamic portion of the filter name, `$field`, refers to the term field. |
|
1579 | * |
|
1580 | * @since 2.3.0 |
|
1581 | * |
|
1582 | * @param mixed $value Value of the term field. |
|
1583 | * @param string $taxonomy Taxonomy slug. |
|
1584 | */ |
|
1585 | $value = apply_filters( "pre_term_{$field}", $value, $taxonomy ); |
|
1586 | ||
1587 | /** |
|
1588 | * Filters a taxonomy field before it is sanitized. |
|
1589 | * |
|
1590 | * The dynamic portions of the filter name, `$taxonomy` and `$field`, refer |
|
1591 | * to the taxonomy slug and field name, respectively. |
|
1592 | * |
|
1593 | * @since 2.3.0 |
|
1594 | * |
|
1595 | * @param mixed $value Value of the taxonomy field. |
|
1596 | */ |
|
1597 | $value = apply_filters( "pre_{$taxonomy}_{$field}", $value ); |
|
1598 | ||
1599 | // Back compat filters |
|
1600 | if ( 'slug' == $field ) { |
|
1601 | /** |
|
1602 | * Filters the category nicename before it is sanitized. |
|
1603 | * |
|
1604 | * Use the {@see 'pre_$taxonomy_$field'} hook instead. |
|
1605 | * |
|
1606 | * @since 2.0.3 |
|
1607 | * |
|
1608 | * @param string $value The category nicename. |
|
1609 | */ |
|
1610 | $value = apply_filters( 'pre_category_nicename', $value ); |
|
1611 | } |
|
1612 | ||
1613 | } elseif ( 'rss' == $context ) { |
|
1614 | ||
1615 | /** |
|
1616 | * Filters the term field for use in RSS. |