Changeset 27365
- Timestamp:
- 03/02/2014 11:34:08 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/option.php
r27262 r27365 18 18 * 19 19 * @since 1.5.0 20 * @uses apply_filters() Calls 'pre_option_$option' before checking the option.21 * Any value other than false will "short-circuit" the retrieval of the option22 * and return the returned value. You should not try to override special options,23 * but you will not be prevented from doing so.24 * @uses apply_filters() Calls 'option_$option', after checking the option, with25 * the option value.26 20 * 27 21 * @param string $option Name of option to retrieve. Expected to not be SQL-escaped. … … 36 30 return false; 37 31 38 // Allow plugins to short-circuit options. 32 /** 33 * Filter the value of an existing option before it is retrieved. 34 * 35 * The dynamic portion of the hook name, $option, refers to the option name. 36 * 37 * Passing a truthy value to the filter will short-circuit retrieving 38 * the option value, returning the passed value instead. 39 * 40 * @since 1.5.0 41 * 42 * @param bool|mixed $pre_option Value to return instead of the option value. 43 * Default false to skip it. 44 */ 39 45 $pre = apply_filters( 'pre_option_' . $option, false ); 40 46 if ( false !== $pre ) … … 48 54 $notoptions = wp_cache_get( 'notoptions', 'options' ); 49 55 if ( isset( $notoptions[$option] ) ) 56 57 /** 58 * Filter the default value for an option. 59 * 60 * The dynamic portion of the hook name, $option, refers 61 * to the option name. 62 * 63 * @since 3.4.0 64 * 65 * @param mixed $default The default value to return if the option 66 * does not exist in the database. 67 */ 50 68 return apply_filters( 'default_option_' . $option, $default ); 51 69 … … 67 85 $notoptions[$option] = true; 68 86 wp_cache_set( 'notoptions', $notoptions, 'options' ); 87 88 /** This filter is documented in wp-includes/option.php */ 69 89 return apply_filters( 'default_option_' . $option, $default ); 70 90 } … … 75 95 $row = $wpdb->get_row( $wpdb->prepare( "SELECT option_value FROM $wpdb->options WHERE option_name = %s LIMIT 1", $option ) ); 76 96 $wpdb->suppress_errors( $suppress ); 77 if ( is_object( $row ) ) 97 if ( is_object( $row ) ) { 78 98 $value = $row->option_value; 79 else 99 } else { 100 /** This filter is documented in wp-includes/option.php */ 80 101 return apply_filters( 'default_option_' . $option, $default ); 102 } 81 103 } 82 104 … … 88 110 $value = untrailingslashit( $value ); 89 111 112 /** 113 * Filter the value of an existing option. 114 * 115 * The dynamic portion of the hook name, $option, refers to the option name. 116 * 117 * @since 1.5.0 As 'option_' . $setting 118 * @since 3.0.0 119 * 120 * @param mixed $value Value of the option. If stored serialized, it will be 121 * unserialized prior to being returned. 122 */ 90 123 return apply_filters( 'option_' . $option, maybe_unserialize( $value ) ); 91 124 } … … 192 225 * @since 1.0.0 193 226 * 194 * @uses apply_filters() Calls 'pre_update_option_$option' hook to allow overwriting the195 * option value to be stored.196 * @uses do_action() Calls 'update_option' hook before updating the option.197 * @uses do_action() Calls 'update_option_$option' and 'updated_option' hooks on success.198 *199 227 * @param string $option Option name. Expected to not be SQL-escaped. 200 228 * @param mixed $value Option value. Must be serializable if non-scalar. Expected to not be SQL-escaped. … … 215 243 $value = sanitize_option( $option, $value ); 216 244 $old_value = get_option( $option ); 245 246 /** 247 * Filter a specific option before its value is (maybe) serialized and updated. 248 * 249 * The dynamic portion of the hook name, $option, refers to the option name. 250 * 251 * @since 2.6.0 252 * 253 * @param mixed $value The new, unserialized option value. 254 * @param mixed $old_value The old option value. 255 */ 217 256 $value = apply_filters( 'pre_update_option_' . $option, $value, $old_value ); 218 257 … … 226 265 $serialized_value = maybe_serialize( $value ); 227 266 267 /** 268 * Fires immediately before an option value is updated. 269 * 270 * @since 2.9.0 271 * 272 * @param string $option Name of the option to update. 273 * @param mixed $old_value The old option value. 274 * @param mixed $value The new option value. 275 */ 228 276 do_action( 'update_option', $option, $old_value, $value ); 277 229 278 $result = $wpdb->update( $wpdb->options, array( 'option_value' => $serialized_value ), array( 'option_name' => $option ) ); 230 279 if ( ! $result ) … … 247 296 } 248 297 298 /** 299 * Fires after the value of a specific option has been successfully updated. 300 * 301 * The dynamic portion of the hook name, $option, refers to the option name. 302 * 303 * @since 2.0.1 304 * 305 * @param mixed $old_value The old option value. 306 * @param mixed $value The new option value. 307 */ 249 308 do_action( "update_option_{$option}", $old_value, $value ); 309 310 /** 311 * Fires after the value of an option has been successfully updated. 312 * 313 * @since 2.9.0 314 * 315 * @param string $option Name of the updated option. 316 * @param mixed $old_value The old option value. 317 * @param mixed $value The new option value. 318 */ 250 319 do_action( 'updated_option', $option, $old_value, $value ); 251 320 return true; … … 265 334 * 266 335 * @since 1.0.0 267 *268 * @uses do_action() Calls 'add_option' hook before adding the option.269 * @uses do_action() Calls 'add_option_$option' and 'added_option' hooks on success.270 336 * 271 337 * @param string $option Name of option to add. Expected to not be SQL-escaped. … … 300 366 $serialized_value = maybe_serialize( $value ); 301 367 $autoload = ( 'no' === $autoload ) ? 'no' : 'yes'; 368 369 /** 370 * Fires before an option is added. 371 * 372 * @since 2.9.0 373 * 374 * @param string $option Name of the option to add. 375 * @param mixed $value Value of the option. 376 */ 302 377 do_action( 'add_option', $option, $value ); 303 378 … … 323 398 } 324 399 400 /** 401 * Fires after a specific option has been added. 402 * 403 * The dynamic portion of the hook name, $option, refers to the option name. 404 * 405 * @since 2.5.0 As "add_option_{$name}" 406 * @since 3.0.0 407 * 408 * @param string $option Name of the option to add. 409 * @param mixed $value Value of the option. 410 */ 325 411 do_action( "add_option_{$option}", $option, $value ); 412 413 /** 414 * Fires after an option has been added. 415 * 416 * @since 2.9.0 417 * 418 * @param string $option Name of the added option. 419 * @param mixed $value Value of the option. 420 */ 326 421 do_action( 'added_option', $option, $value ); 327 422 return true; … … 332 427 * 333 428 * @since 1.2.0 334 *335 * @uses do_action() Calls 'delete_option' hook before option is deleted.336 * @uses do_action() Calls 'deleted_option' and 'delete_option_$option' hooks on success.337 429 * 338 430 * @param string $option Name of option to remove. Expected to not be SQL-escaped. … … 352 444 if ( is_null( $row ) ) 353 445 return false; 446 447 /** 448 * Fires immediately before an option is deleted. 449 * 450 * @since 2.9.0 451 * 452 * @param string $option Name of the option to delete. 453 */ 354 454 do_action( 'delete_option', $option ); 455 355 456 $result = $wpdb->delete( $wpdb->options, array( 'option_name' => $option ) ); 356 457 if ( ! defined( 'WP_INSTALLING' ) ) { … … 366 467 } 367 468 if ( $result ) { 469 470 /** 471 * Fires after a specific option has been deleted. 472 * 473 * The dynamic portion of the hook name, $option, refers to the option name. 474 * 475 * @since 3.0.0 476 * 477 * @param string $option Name of the deleted option. 478 */ 368 479 do_action( "delete_option_$option", $option ); 480 481 /** 482 * Fires after an option has been deleted. 483 * 484 * @since 2.9.0 485 * 486 * @param string $option Name of the deleted option. 487 */ 369 488 do_action( 'deleted_option', $option ); 370 489 return true; … … 378 497 * @since 2.8.0 379 498 * 380 * @uses do_action() Calls 'delete_transient_$transient' hook before transient is deleted.381 * @uses do_action() Calls 'deleted_transient' hook on success.382 *383 499 * @param string $transient Transient name. Expected to not be SQL-escaped. 384 500 * @return bool true if successful, false otherwise 385 501 */ 386 502 function delete_transient( $transient ) { 503 504 /** 505 * Fires immediately before a specific transient is deleted. 506 * 507 * The dynamic portion of the hook name, $transient, refers to the transient name. 508 * 509 * @since 3.0.0 510 * 511 * @param string $transient Transient name. 512 */ 387 513 do_action( 'delete_transient_' . $transient, $transient ); 388 514 … … 397 523 } 398 524 399 if ( $result ) 525 if ( $result ) { 526 527 /** 528 * Fires after a transient is deleted. 529 * 530 * @since 3.0.0 531 * 532 * @param string $transient Deleted transient name. 533 */ 400 534 do_action( 'deleted_transient', $transient ); 535 } 536 401 537 return $result; 402 538 } … … 408 544 * will be false. 409 545 * 410 * @uses apply_filters() Calls 'pre_transient_$transient' hook before checking the transient.411 * Any value other than false will "short-circuit" the retrieval of the transient412 * and return the returned value.413 * @uses apply_filters() Calls 'transient_$option' hook, after checking the transient, with414 * the transient value.415 *416 546 * @since 2.8.0 417 547 * … … 420 550 */ 421 551 function get_transient( $transient ) { 552 553 /** 554 * Filter the value of an existing transient. 555 * 556 * The dynamic portion of the hook name, $transient, refers to the transient name. 557 * 558 * Passing a truthy value to the filter will effectively short-circuit retrieval 559 * of the transient, returning the passed value instead. 560 * 561 * @since 2.8.0 562 * 563 * @param mixed $pre_transient The default value to return if the transient does not exist. 564 * Any value other than false will short-circuit the retrieval 565 * of the transient, and return the returned value. 566 */ 422 567 $pre = apply_filters( 'pre_transient_' . $transient, false ); 423 568 if ( false !== $pre ) … … 445 590 } 446 591 592 /** 593 * Filter an existing transient's value. 594 * 595 * The dynamic portion of the hook name, $transient, refers to the transient name. 596 * 597 * @since 2.8.0 598 * 599 * @param mixed $value Value of transient. 600 */ 447 601 return apply_filters( 'transient_' . $transient, $value ); 448 602 } … … 455 609 * 456 610 * @since 2.8.0 457 *458 * @uses apply_filters() Calls 'pre_set_transient_$transient' hook to allow overwriting the459 * transient value to be stored.460 * @uses do_action() Calls 'set_transient_$transient' and 'setted_transient' hooks on success.461 611 * 462 612 * @param string $transient Transient name. Expected to not be SQL-escaped. … … 466 616 */ 467 617 function set_transient( $transient, $value, $expiration = 0 ) { 618 619 /** 620 * Filter a specific transient before its value is set. 621 * 622 * The dynamic portion of the hook name, $transient, refers to the transient name. 623 * 624 * @since 3.0.0 625 * 626 * @param mixed $value New value of transient. 627 */ 468 628 $value = apply_filters( 'pre_set_transient_' . $transient, $value ); 629 469 630 $expiration = (int) $expiration; 470 631 … … 487 648 } 488 649 } 650 489 651 if ( $result ) { 652 653 /** 654 * Fires after the value for a specific transient has been set. 655 * 656 * The dynamic portion of the hook name, $transient, refers to the transient name. 657 * 658 * @since 3.0.0 659 * 660 * @param mixed $value Transient value. 661 * @param int $expiration Time until expiration in seconds. Default 0. 662 */ 490 663 do_action( 'set_transient_' . $transient, $value, $expiration ); 664 665 /** 666 * Fires after the value for a transient has been set. 667 * 668 * @since 3.0.0 669 * 670 * @param string $transient The name of the transient. 671 * @param mixed $value Transient value. 672 * @param int $expiration Time until expiration in seconds. Default 0. 673 */ 491 674 do_action( 'setted_transient', $transient, $value, $expiration ); 492 675 } … … 698 881 * Retrieve site option value based on name of option. 699 882 * 883 * @since 2.8.0 884 * 700 885 * @see get_option() 701 * @since 2.8.0702 *703 * @uses apply_filters() Calls 'pre_site_option_$option' before checking the option.704 * Any value other than false will "short-circuit" the retrieval of the option705 * and return the returned value.706 * @uses apply_filters() Calls 'site_option_$option', after checking the option, with707 * the option value.708 886 * 709 887 * @param string $option Name of option to retrieve. Expected to not be SQL-escaped. … … 715 893 global $wpdb; 716 894 717 // Allow plugins to short-circuit site options. 895 /** 896 * Filter an existing site option before it is retrieved. 897 * 898 * The dynamic portion of the hook name, $option, refers to the option name. 899 * 900 * Passing a truthy value to the filter will effectively short-circuit retrieval, 901 * returning the passed value instead. 902 * 903 * @since 2.9.0 As 'pre_site_option_' . $key 904 * @since 3.0.0 905 * 906 * @param mixed $pre_option The default value to return if the option does not exist. 907 */ 718 908 $pre = apply_filters( 'pre_site_option_' . $option, false ); 909 719 910 if ( false !== $pre ) 720 911 return $pre; … … 723 914 $notoptions_key = "{$wpdb->siteid}:notoptions"; 724 915 $notoptions = wp_cache_get( $notoptions_key, 'site-options' ); 725 if ( isset( $notoptions[$option] ) ) 916 917 if ( isset( $notoptions[$option] ) ) { 918 919 /** 920 * Filter a specific default site option. 921 * 922 * The dynamic portion of the hook name, $option, refers to the option name. 923 * 924 * @since 3.4.0 925 * 926 * @param mixed $default The value to return if the site option does not exist 927 * in the database. 928 */ 726 929 return apply_filters( 'default_site_option_' . $option, $default ); 930 } 727 931 728 932 if ( ! is_multisite() ) { 933 934 /** This filter is documented in wp-includes/option.php */ 729 935 $default = apply_filters( 'default_site_option_' . $option, $default ); 730 936 $value = get_option($option, $default); … … 745 951 $notoptions[$option] = true; 746 952 wp_cache_set( $notoptions_key, $notoptions, 'site-options' ); 953 954 /** This filter is documented in wp-includes/option.php */ 747 955 $value = apply_filters( 'default_site_option_' . $option, $default ); 748 956 } … … 750 958 } 751 959 960 /** 961 * Filter the value of an existing site option. 962 * 963 * The dynamic portion of the hook name, $option, refers to the option name. 964 * 965 * @since 2.9.0 As 'site_option_' . $key 966 * @since 3.0.0 967 * 968 * @param mixed $value Value of site option. 969 */ 752 970 return apply_filters( 'site_option_' . $option, $value ); 753 971 } … … 758 976 * Existing options will not be updated. Note that prior to 3.3 this wasn't the case. 759 977 * 978 * @since 2.8.0 979 * 760 980 * @see add_option() 761 * @since 2.8.0762 *763 * @uses apply_filters() Calls 'pre_add_site_option_$option' hook to allow overwriting the764 * option value to be stored.765 * @uses do_action() Calls 'add_site_option_$option' and 'add_site_option' hooks on success.766 981 * 767 982 * @param string $option Name of option to add. Expected to not be SQL-escaped. … … 774 989 wp_protect_special_option( $option ); 775 990 991 /** 992 * Filter the value of a specific site option before it is added. 993 * 994 * The dynamic portion of the hook name, $option, refers to the option name. 995 * 996 * @since 2.9.0 As 'pre_add_site_option_' . $key 997 * @since 3.0.0 998 * 999 * @param mixed $value Value of site option. 1000 */ 776 1001 $value = apply_filters( 'pre_add_site_option_' . $option, $value ); 1002 777 1003 $notoptions_key = "{$wpdb->siteid}:notoptions"; 778 1004 … … 807 1033 808 1034 if ( $result ) { 1035 1036 /** 1037 * Fires after a specific site option has been successfully added. 1038 * 1039 * The dynamic portion of the hook name, $option, refers to the option name. 1040 * 1041 * @since 2.9.0 As "add_site_option_{$key}" 1042 * @since 3.0.0 1043 * 1044 * @param string $option Name of site option. 1045 * @param mixed $value Value of site option. 1046 */ 809 1047 do_action( "add_site_option_{$option}", $option, $value ); 1048 1049 /** 1050 * Fires after a site option has been successfully added. 1051 * 1052 * @since 3.0.0 1053 * 1054 * @param string $option Name of site option. 1055 * @param mixed $value Value of site option. 1056 */ 810 1057 do_action( "add_site_option", $option, $value ); 1058 811 1059 return true; 812 1060 } … … 817 1065 * Removes site option by name. 818 1066 * 1067 * @since 2.8.0 1068 * 819 1069 * @see delete_option() 820 * @since 2.8.0821 *822 * @uses do_action() Calls 'pre_delete_site_option_$option' hook before option is deleted.823 * @uses do_action() Calls 'delete_site_option' and 'delete_site_option_$option'824 * hooks on success.825 1070 * 826 1071 * @param string $option Name of option to remove. Expected to not be SQL-escaped. … … 832 1077 // ms_protect_special_option( $option ); @todo 833 1078 1079 /** 1080 * Fires immediately before a specific site option is deleted. 1081 * 1082 * The dynamic portion of the hook name, $option, refers to the option name. 1083 * 1084 * @since 3.0.0 1085 */ 834 1086 do_action( 'pre_delete_site_option_' . $option ); 835 1087 … … 847 1099 848 1100 if ( $result ) { 1101 1102 /** 1103 * Fires after a specific site option has been deleted. 1104 * 1105 * The dynamic portion of the hook name, $option, refers to the option name. 1106 * 1107 * @since 2.9.0 As "delete_site_option_{$key}" 1108 * @since 3.0.0 1109 * 1110 * @param string $option Name of the site option. 1111 */ 849 1112 do_action( "delete_site_option_{$option}", $option ); 1113 1114 /** 1115 * Fires after a site option has been deleted. 1116 * 1117 * @since 3.0.0 1118 * 1119 * @param string $option Name of the site option. 1120 */ 850 1121 do_action( "delete_site_option", $option ); 1122 851 1123 return true; 852 1124 } … … 857 1129 * Update the value of a site option that was already added. 858 1130 * 1131 * @since 2.8.0 1132 * 859 1133 * @see update_option() 860 * @since 2.8.0861 *862 * @uses apply_filters() Calls 'pre_update_site_option_$option' hook to allow overwriting the863 * option value to be stored.864 * @uses do_action() Calls 'update_site_option_$option' and 'update_site_option' hooks on success.865 1134 * 866 1135 * @param string $option Name of option. Expected to not be SQL-escaped. … … 874 1143 875 1144 $old_value = get_site_option( $option ); 1145 1146 /** 1147 * Filter a specific site option before its value is updated. 1148 * 1149 * The dynamic portion of the hook name, $option, refers to the option name. 1150 * 1151 * @since 2.9.0 As 'pre_update_site_option_' . $key 1152 * @since 3.0.0 1153 * 1154 * @param mixed $value New value of site option. 1155 * @param mixed $old_value Old value of site option. 1156 */ 876 1157 $value = apply_filters( 'pre_update_site_option_' . $option, $value, $old_value ); 877 1158 … … 904 1185 905 1186 if ( $result ) { 1187 1188 /** 1189 * Fires after the value of a specific site option has been successfully updated. 1190 * 1191 * The dynamic portion of the hook name, $option, refers to the option name. 1192 * 1193 * @since 2.9.0 As "update_site_option_{$key}" 1194 * @since 3.0.0 1195 * 1196 * @param string $option Name of site option. 1197 * @param mixed $value Current value of site option. 1198 * @param mixed $old_value Old value of site option. 1199 */ 906 1200 do_action( "update_site_option_{$option}", $option, $value, $old_value ); 1201 1202 /** 1203 * Fires after the value of a site option has been successfully updated. 1204 * 1205 * @since 3.0.0 1206 * 1207 * @param string $option Name of site option. 1208 * @param mixed $value Current value of site option. 1209 * @param mixed $old_value Old value of site option. 1210 */ 907 1211 do_action( "update_site_option", $option, $value, $old_value ); 1212 908 1213 return true; 909 1214 } … … 915 1220 * 916 1221 * @since 2.9.0 917 *918 * @uses do_action() Calls 'delete_site_transient_$transient' hook before transient is deleted.919 * @uses do_action() Calls 'deleted_site_transient' hook on success.920 1222 * 921 1223 * @param string $transient Transient name. Expected to not be SQL-escaped. … … 923 1225 */ 924 1226 function delete_site_transient( $transient ) { 1227 1228 /** 1229 * Fires immediately before a specific site transient is deleted. 1230 * 1231 * The dynamic portion of the hook name, $transient, refers to the transient name. 1232 * 1233 * @since 3.0.0 1234 * 1235 * @param string $transient Transient name. 1236 */ 925 1237 do_action( 'delete_site_transient_' . $transient, $transient ); 1238 926 1239 if ( wp_using_ext_object_cache() ) { 927 1240 $result = wp_cache_delete( $transient, 'site-transient' ); … … 933 1246 delete_site_option( $option_timeout ); 934 1247 } 935 if ( $result ) 1248 if ( $result ) { 1249 1250 /** 1251 * Fires after a transient is deleted. 1252 * 1253 * @since 3.0.0 1254 * 1255 * @param string $transient Deleted transient name. 1256 */ 936 1257 do_action( 'deleted_site_transient', $transient ); 1258 } 1259 937 1260 return $result; 938 1261 } … … 944 1267 * will be false. 945 1268 * 1269 * @since 2.9.0 1270 * 946 1271 * @see get_transient() 947 * @since 2.9.0948 *949 * @uses apply_filters() Calls 'pre_site_transient_$transient' hook before checking the transient.950 * Any value other than false will "short-circuit" the retrieval of the transient951 * and return the returned value.952 * @uses apply_filters() Calls 'site_transient_$option' hook, after checking the transient, with953 * the transient value.954 1272 * 955 1273 * @param string $transient Transient name. Expected to not be SQL-escaped. … … 957 1275 */ 958 1276 function get_site_transient( $transient ) { 1277 1278 /** 1279 * Filter the value of an existing site transient. 1280 * 1281 * The dynamic portion of the hook name, $transient, refers to the transient name. 1282 * 1283 * Passing a truthy value to the filter will effectively short-circuit retrieval, 1284 * returning the passed value instead. 1285 * 1286 * @since 2.9.0 1287 * 1288 * @param mixed $pre_site_transient The default value to return if the site transient does not exist. 1289 * Any value other than false will short-circuit the retrieval 1290 * of the transient, and return the returned value. 1291 */ 959 1292 $pre = apply_filters( 'pre_site_transient_' . $transient, false ); 1293 960 1294 if ( false !== $pre ) 961 1295 return $pre; … … 981 1315 } 982 1316 1317 /** 1318 * Filter the value of an existing site transient. 1319 * 1320 * The dynamic portion of the hook name, $transient, refers to the transient name. 1321 * 1322 * @since 2.9.0 1323 * 1324 * @param mixed $value Value of site transient. 1325 */ 983 1326 return apply_filters( 'site_transient_' . $transient, $value ); 984 1327 } … … 990 1333 * it will be serialized before it is set. 991 1334 * 1335 * @since 2.9.0 1336 * 992 1337 * @see set_transient() 993 * @since 2.9.0994 *995 * @uses apply_filters() Calls 'pre_set_site_transient_$transient' hook to allow overwriting the996 * transient value to be stored.997 * @uses do_action() Calls 'set_site_transient_$transient' and 'setted_site_transient' hooks on success.998 1338 * 999 1339 * @param string $transient Transient name. Expected to not be SQL-escaped. … … 1003 1343 */ 1004 1344 function set_site_transient( $transient, $value, $expiration = 0 ) { 1345 1346 /** 1347 * Filter the value of a specific site transient before it is set. 1348 * 1349 * The dynamic portion of the hook name, $transient, refers to the transient name. 1350 * 1351 * @since 3.0.0 1352 * 1353 * @param mixed $value Value of site transient. 1354 */ 1005 1355 $value = apply_filters( 'pre_set_site_transient_' . $transient, $value ); 1356 1006 1357 $expiration = (int) $expiration; 1007 1358 … … 1022 1373 } 1023 1374 if ( $result ) { 1375 1376 /** 1377 * Fires after the value for a specific site transient has been set. 1378 * 1379 * The dynamic portion of the hook name, $transient, refers to the transient name. 1380 * 1381 * @since 3.0.0 1382 * 1383 * @param mixed $value Site transient value. 1384 * @param int $expiration Time until expiration in seconds. Default 0. 1385 */ 1024 1386 do_action( 'set_site_transient_' . $transient, $value, $expiration ); 1387 1388 /** 1389 * Fires after the value for a site transient has been set. 1390 * 1391 * @since 3.0.0 1392 * 1393 * @param string $transient The name of the site transient. 1394 * @param mixed $value Site transient value. 1395 * @param int $expiration Time until expiration in seconds. Default 0. 1396 */ 1025 1397 do_action( 'setted_site_transient', $transient, $value, $expiration ); 1026 1398 }
Note: See TracChangeset
for help on using the changeset viewer.