protected function find_button(array &$params, $button) {
        foreach ($params as $key => $value) {
            if (preg_match('/^theme_advanced_buttons(\d+)$/', $key, $matches) &&
                    strpos(','. $value. ',', ','. $button. ',') !== false) {
                return (int)$matches[1];
            }
        }
        return false;
    }
protected function find_button(array &$params, $button) {
        foreach ($params as $key => $value) {
            if (preg_match('/^theme_advanced_buttons(\d+)$/', $key, $matches) &&
                    strpos(','. $value. ',', ','. $button. ',') !== false) {
                return (int)$matches[1];
            }
        }
        return false;
    }
protected function find_button ( array & $ params , $ button ) { foreach ( $ params as $ key => $ value ) { if ( preg_match ( '/^theme_advanced_buttons(\d+)$/' , $ key , $ matches ) && strpos ( ',' . $ value . ',' , ',' . $ button . ',' ) !== false ) { return ( int ) $ matches [ 1 ] ; } } return false ; }
Tests if button is already present.

@param array $params TinyMCE init parameters array
@param string $button button name
@return false|int false if button is not found, row number otherwise (row numbers start from 1)
Tests if button is already present .