@@ -87,7 +87,7 @@ |
||
| 87 | 87 | * Construct object from image. |
| 88 | 88 | * |
| 89 | 89 | * @param optional $type (hex, rgb, hsv) |
| 90 | - * @return color as a string formatted as $type |
|
| 90 | + * @return false|string as a string formatted as $type |
|
| 91 | 91 | * |
| 92 | 92 | */ |
| 93 | 93 | function color( $type = 'hex' ) { |
@@ -6,6 +6,9 @@ discard block |
||
| 6 | 6 | /* |
| 7 | 7 | * A convienence function to display the HTML for an AtD option |
| 8 | 8 | */ |
| 9 | +/** |
|
| 10 | + * @param string $name |
|
| 11 | + */ |
|
| 9 | 12 | function AtD_print_option( $name, $value, $options ) { |
| 10 | 13 | // Attribute-safe version of $name |
| 11 | 14 | $attr_name = sanitize_title( $name ); // Using sanitize_title since there's no comparable function for attributes |
@@ -112,6 +115,9 @@ discard block |
||
| 112 | 115 | /* |
| 113 | 116 | * Returns an array of AtD user options specified by $name |
| 114 | 117 | */ |
| 118 | +/** |
|
| 119 | + * @param string $name |
|
| 120 | + */ |
|
| 115 | 121 | function AtD_get_options( $user_id, $name ) { |
| 116 | 122 | $options_raw = AtD_get_setting( $user_id, $name, 'single' ); |
| 117 | 123 | |
@@ -130,6 +136,9 @@ discard block |
||
| 130 | 136 | /* |
| 131 | 137 | * Saves set of user options specified by $name from POST data |
| 132 | 138 | */ |
| 139 | +/** |
|
| 140 | + * @param string $name |
|
| 141 | + */ |
|
| 133 | 142 | function AtD_update_options( $user_id, $name ) { |
| 134 | 143 | /* We should probably run $_POST[name] through an esc_*() function... */ |
| 135 | 144 | if ( isset( $_POST[ $name ] ) && is_array( $_POST[ $name ] ) ) { |
@@ -133,6 +133,9 @@ discard block |
||
| 133 | 133 | exit; |
| 134 | 134 | } |
| 135 | 135 | |
| 136 | + /** |
|
| 137 | + * @param string $version |
|
| 138 | + */ |
|
| 136 | 139 | function asset_version( $version ) { |
| 137 | 140 | /** |
| 138 | 141 | * Filter the version string used when enqueuing Carousel assets. |
@@ -707,6 +710,9 @@ discard block |
||
| 707 | 710 | return ( 1 == $value ) ? 1 : 0; |
| 708 | 711 | } |
| 709 | 712 | |
| 713 | + /** |
|
| 714 | + * @param string $name |
|
| 715 | + */ |
|
| 710 | 716 | function settings_checkbox( $name, $label_text, $extra_text = '', $default_to_checked = true ) { |
| 711 | 717 | if ( empty( $name ) ) { |
| 712 | 718 | return; |
@@ -722,6 +728,9 @@ discard block |
||
| 722 | 728 | echo '</fieldset>'; |
| 723 | 729 | } |
| 724 | 730 | |
| 731 | + /** |
|
| 732 | + * @param string $name |
|
| 733 | + */ |
|
| 725 | 734 | function settings_select( $name, $values, $extra_text = '' ) { |
| 726 | 735 | if ( empty( $name ) || ! is_array( $values ) || empty( $values ) ) { |
| 727 | 736 | return; |
@@ -100,6 +100,10 @@ discard block |
||
| 100 | 100 | ), menu_page_url( 'sharing', false ) ); |
| 101 | 101 | } |
| 102 | 102 | |
| 103 | + /** |
|
| 104 | + * @param string $service_name |
|
| 105 | + * @param string $for |
|
| 106 | + */ |
|
| 103 | 107 | static function refresh_url( $service_name, $for ) { |
| 104 | 108 | return add_query_arg( array( |
| 105 | 109 | 'action' => 'request', |
@@ -111,6 +115,10 @@ discard block |
||
| 111 | 115 | ), admin_url( 'options-general.php?page=sharing' ) ); |
| 112 | 116 | } |
| 113 | 117 | |
| 118 | + /** |
|
| 119 | + * @param string $service_name |
|
| 120 | + * @param string $id |
|
| 121 | + */ |
|
| 114 | 122 | static function disconnect_url( $service_name, $id ) { |
| 115 | 123 | return add_query_arg( array( |
| 116 | 124 | 'action' => 'delete', |