AnsPress_Prod_Updater::update_nag()
Description #
Source #
File: admin/updater.php
function update_nag() { $strings = $this->strings; $theme = wp_get_theme( $this->slug ); $api_response = get_transient( $this->response_key ); if ( false === $api_response ) { return; } $update_url = wp_nonce_url( 'update.php?action=upgrade-theme&theme=' . urlencode( $this->slug ), 'upgrade-theme_' . $this->slug ); $update_onclick = ' onclick="if ( confirm(\'' . esc_js( $strings['update-notice'] ) . '\') ) {return true;}return false;"'; if ( version_compare( $this->version, $api_response->new_version, '<' ) ) { echo '<div id="update-nag">'; printf( $strings['update-available'], $theme->get( 'Name' ), $api_response->new_version, '#TB_inline?width=640&inlineId=' . $this->slug . '_changelog', $theme->get( 'Name' ), $update_url, $update_onclick ); echo '</div>'; echo '<div id="' . $this->slug . '_' . 'changelog" style="display:none;">'; echo wpautop( $api_response->sections['changelog'] ); echo '</div>'; } }
Expand full source code Collapse full source code View on GitHub: admin/updater.php:443
Add your comment