@@ 1224-1234 (lines=11) @@ | ||
1221 | * |
|
1222 | * @return bool Whether this cmb should be shown. |
|
1223 | */ |
|
1224 | public function should_show() { |
|
1225 | // Default to showing this cmb |
|
1226 | $show = true; |
|
1227 | ||
1228 | // Use the callback to determine showing the cmb, if it exists |
|
1229 | if ( is_callable( $this->prop( 'show_on_cb' ) ) ) { |
|
1230 | $show = (bool) call_user_func( $this->prop( 'show_on_cb' ), $this ); |
|
1231 | } |
|
1232 | ||
1233 | return $show; |
|
1234 | } |
|
1235 | ||
1236 | /** |
|
1237 | * Generate a unique nonce field for each registered meta_box |
@@ 901-911 (lines=11) @@ | ||
898 | * |
|
899 | * @return bool Whether the field should be shown. |
|
900 | */ |
|
901 | public function should_show() { |
|
902 | // Default to showing the field |
|
903 | $show = true; |
|
904 | ||
905 | // Use the callback to determine showing the field, if it exists |
|
906 | if ( is_callable( $this->args( 'show_on_cb' ) ) ) { |
|
907 | $show = call_user_func( $this->args( 'show_on_cb' ), $this ); |
|
908 | } |
|
909 | ||
910 | return $show; |
|
911 | } |
|
912 | ||
913 | /** |
|
914 | * Displays the results of the param callbacks. |