p =& $plugin; if ( $this->p->debug->enabled ) { $this->p->debug->mark(); } /* * See WpssoAbstractWpMeta->get_document_sso_tabs(). */ $this->p->util->add_plugin_filters( $this, array( 'mb_sso_validators_rows' => 4, ), PHP_INT_MIN ); // Run before any add-on filters. } public function filter_mb_sso_validators_rows( $table_rows, $form, $head_info, $mod ) { $validators = $this->p->util->get_validators( $mod, $form ); foreach ( $validators as $key => $el ) { if ( empty( $el[ 'type' ] ) ) { continue; } $extra_msg = isset( $el[ 'extra_msg' ] ) ? $el[ 'extra_msg' ] : ''; $button_label = sprintf( _x( 'Validate %s', 'submit button', 'wpsso' ), $el[ 'type' ] ); $is_disabled = empty( $el[ 'url' ] ) ? true : false; $table_rows[ 'validate_' . $key ] = '' . $form->get_th_html( $el[ 'title' ], $css_class = 'medium' ) . '' . $this->p->msgs->get( 'info-meta-validate-' . $key ) . $extra_msg . '' . '' . $form->get_button( $button_label, $css_class = 'button-secondary', $css_id = '', $el[ 'url' ], $newtab = true, $is_disabled ) . ''; } $table_rows[ 'validate_info' ] = '' . $this->p->msgs->get( 'info-meta-validate-footer' ) . ''; return $table_rows; } } }