Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/ninja-fo.../deprecat.../includes/admin
File: welcome.php
<?php if ( ! defined( 'ABSPATH' ) ) exit;
[0] Fix | Delete
/**
[1] Fix | Delete
* About Page Class
[2] Fix | Delete
*
[3] Fix | Delete
* @package NF
[4] Fix | Delete
* @subpackage Admin/Welcome
[5] Fix | Delete
* @copyright Copyright (c) 2014, WP Ninjas
[6] Fix | Delete
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
[7] Fix | Delete
* @since 2.7
[8] Fix | Delete
*/
[9] Fix | Delete
[10] Fix | Delete
// Exit if accessed directly
[11] Fix | Delete
if ( ! defined( 'ABSPATH' ) ) exit;
[12] Fix | Delete
[13] Fix | Delete
/**
[14] Fix | Delete
* NF_Welcome Class
[15] Fix | Delete
*
[16] Fix | Delete
* A general class for About and Credits page.
[17] Fix | Delete
*
[18] Fix | Delete
* @since 1.4
[19] Fix | Delete
*/
[20] Fix | Delete
class NF_Welcome {
[21] Fix | Delete
[22] Fix | Delete
/**
[23] Fix | Delete
* @var string The capability users should have to view the page
[24] Fix | Delete
*/
[25] Fix | Delete
public $minimum_capability = 'manage_options';
[26] Fix | Delete
public $display_version = NF_PLUGIN_VERSION;
[27] Fix | Delete
public $header_text;
[28] Fix | Delete
public $header_desc;
[29] Fix | Delete
[30] Fix | Delete
/**
[31] Fix | Delete
* Get things started
[32] Fix | Delete
*
[33] Fix | Delete
* @since 1.4
[34] Fix | Delete
*/
[35] Fix | Delete
public function __construct() {
[36] Fix | Delete
add_action( 'admin_menu', array( $this, 'admin_menus') );
[37] Fix | Delete
add_action( 'admin_head', array( $this, 'admin_head' ) );
[38] Fix | Delete
add_action( 'admin_init', array( $this, 'welcome' ) );
[39] Fix | Delete
[40] Fix | Delete
$this->header_text = sprintf( __( 'Welcome to Ninja Forms %s', 'ninja-forms' ), $this->display_version );
[41] Fix | Delete
$this->header_desc = sprintf( __( 'Thank you for updating! Ninja Forms %s makes form building easier than ever before!', 'ninja-forms' ), $this->display_version );
[42] Fix | Delete
}
[43] Fix | Delete
[44] Fix | Delete
/**
[45] Fix | Delete
* Register the Dashboard Pages which are later hidden but these pages
[46] Fix | Delete
* are used to render the Welcome and Credits pages.
[47] Fix | Delete
*
[48] Fix | Delete
* @access public
[49] Fix | Delete
* @since 1.4
[50] Fix | Delete
* @return void
[51] Fix | Delete
*/
[52] Fix | Delete
public function admin_menus() {
[53] Fix | Delete
// About Page
[54] Fix | Delete
add_dashboard_page(
[55] Fix | Delete
__( 'Welcome to Ninja Forms', 'ninja-forms' ),
[56] Fix | Delete
__( 'Welcome to Ninja Forms', 'ninja-forms' ),
[57] Fix | Delete
$this->minimum_capability,
[58] Fix | Delete
'nf-about',
[59] Fix | Delete
array( $this, 'about_screen' )
[60] Fix | Delete
);
[61] Fix | Delete
[62] Fix | Delete
// Changelog Page
[63] Fix | Delete
add_dashboard_page(
[64] Fix | Delete
__( 'Ninja Forms Changelog', 'ninja-forms' ),
[65] Fix | Delete
__( 'Ninja Forms Changelog', 'ninja-forms' ),
[66] Fix | Delete
$this->minimum_capability,
[67] Fix | Delete
'nf-changelog',
[68] Fix | Delete
array( $this, 'changelog_screen' )
[69] Fix | Delete
);
[70] Fix | Delete
[71] Fix | Delete
// Getting Started Page
[72] Fix | Delete
add_dashboard_page(
[73] Fix | Delete
__( 'Getting started with Ninja Forms', 'ninja-forms' ),
[74] Fix | Delete
__( 'Getting started with Ninja Forms', 'ninja-forms' ),
[75] Fix | Delete
$this->minimum_capability,
[76] Fix | Delete
'nf-getting-started',
[77] Fix | Delete
array( $this, 'getting_started_screen' )
[78] Fix | Delete
);
[79] Fix | Delete
[80] Fix | Delete
// Credits Page
[81] Fix | Delete
add_dashboard_page(
[82] Fix | Delete
__( 'The people who build Ninja Forms', 'ninja-forms' ),
[83] Fix | Delete
__( 'The people who build Ninja Forms', 'ninja-forms' ),
[84] Fix | Delete
$this->minimum_capability,
[85] Fix | Delete
'nf-credits',
[86] Fix | Delete
array( $this, 'credits_screen' )
[87] Fix | Delete
);
[88] Fix | Delete
}
[89] Fix | Delete
[90] Fix | Delete
/**
[91] Fix | Delete
* Hide Individual Dashboard Pages
[92] Fix | Delete
*
[93] Fix | Delete
* @access public
[94] Fix | Delete
* @since 1.4
[95] Fix | Delete
* @return void
[96] Fix | Delete
*/
[97] Fix | Delete
public function admin_head() {
[98] Fix | Delete
remove_submenu_page( 'index.php', 'nf-about' );
[99] Fix | Delete
remove_submenu_page( 'index.php', 'nf-changelog' );
[100] Fix | Delete
remove_submenu_page( 'index.php', 'nf-getting-started' );
[101] Fix | Delete
remove_submenu_page( 'index.php', 'nf-credits' );
[102] Fix | Delete
[103] Fix | Delete
// Ensures style is only on welcome page
[104] Fix | Delete
if ((isset($_GET['page'])) && ($_GET['page']=='nf-about' || $_GET['page']=='nf-getting-started' || $_GET['page']=='nf-credits' || $_GET['page']=='nf-changelog')){
[105] Fix | Delete
[106] Fix | Delete
// Badge for welcome page
[107] Fix | Delete
$badge_url = NF_PLUGIN_URL . 'assets/images/nf-badge.png';
[108] Fix | Delete
?>
[109] Fix | Delete
<style type="text/css" media="screen">
[110] Fix | Delete
/*<![CDATA[*/
[111] Fix | Delete
.nf-badge {
[112] Fix | Delete
padding-top: 125px;
[113] Fix | Delete
height: 52px;
[114] Fix | Delete
width: 185px;
[115] Fix | Delete
color: #fff;
[116] Fix | Delete
font-weight: bold;
[117] Fix | Delete
font-size: 14px;
[118] Fix | Delete
text-align: center;
[119] Fix | Delete
margin: 0 -5px;
[120] Fix | Delete
background: url('<?php echo $badge_url; ?>') no-repeat;
[121] Fix | Delete
}
[122] Fix | Delete
[123] Fix | Delete
.about-wrap .nf-badge {
[124] Fix | Delete
position: absolute;
[125] Fix | Delete
top: 0;
[126] Fix | Delete
right: 0;
[127] Fix | Delete
}
[128] Fix | Delete
[129] Fix | Delete
.nf-welcome-screenshots {
[130] Fix | Delete
float: right;
[131] Fix | Delete
margin-left: 10px!important;
[132] Fix | Delete
}
[133] Fix | Delete
[134] Fix | Delete
.about-wrap .feature-section {
[135] Fix | Delete
margin-top: 20px;
[136] Fix | Delete
}
[137] Fix | Delete
.about-overview {
[138] Fix | Delete
padding: 20px;
[139] Fix | Delete
}
[140] Fix | Delete
.about-overview iframe {
[141] Fix | Delete
display: block;
[142] Fix | Delete
margin: 0 auto;
[143] Fix | Delete
}
[144] Fix | Delete
[145] Fix | Delete
/*]]>*/
[146] Fix | Delete
</style>
[147] Fix | Delete
<?php
[148] Fix | Delete
}
[149] Fix | Delete
}
[150] Fix | Delete
[151] Fix | Delete
/**
[152] Fix | Delete
* Navigation tabs
[153] Fix | Delete
*
[154] Fix | Delete
* @access public
[155] Fix | Delete
* @since 1.9
[156] Fix | Delete
* @return void
[157] Fix | Delete
*/
[158] Fix | Delete
public function tabs() {
[159] Fix | Delete
$selected = isset( $_GET['page'] ) ? $_GET['page'] : 'nf-about';
[160] Fix | Delete
?>
[161] Fix | Delete
<h2 class="nav-tab-wrapper">
[162] Fix | Delete
<a class="nav-tab <?php echo $selected == 'nf-about' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'nf-about' ), 'index.php' ) ) ); ?>">
[163] Fix | Delete
<?php _e( "What's New", 'ninja-forms' ); ?>
[164] Fix | Delete
</a>
[165] Fix | Delete
<a class="nav-tab <?php echo $selected == 'nf-getting-started' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'nf-getting-started' ), 'index.php' ) ) ); ?>">
[166] Fix | Delete
<?php _e( 'Getting Started', 'ninja-forms' ); ?>
[167] Fix | Delete
</a>
[168] Fix | Delete
<a class="nav-tab <?php echo $selected == 'nf-credits' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'nf-credits' ), 'index.php' ) ) ); ?>">
[169] Fix | Delete
<?php _e( 'Credits', 'ninja-forms' ); ?>
[170] Fix | Delete
</a>
[171] Fix | Delete
</h2>
[172] Fix | Delete
<?php
[173] Fix | Delete
}
[174] Fix | Delete
[175] Fix | Delete
/**
[176] Fix | Delete
* Render About Screen
[177] Fix | Delete
*
[178] Fix | Delete
* @access public
[179] Fix | Delete
* @since 1.4
[180] Fix | Delete
* @return void
[181] Fix | Delete
*/
[182] Fix | Delete
public function about_screen() {
[183] Fix | Delete
?>
[184] Fix | Delete
<div class="wrap about-wrap">
[185] Fix | Delete
<h1><?php echo $this->header_text; ?></h1>
[186] Fix | Delete
<div class="about-text"><?php echo $this->header_desc; ?></div>
[187] Fix | Delete
<div class="nf-badge"><?php printf( __( 'Version %s', 'ninja-forms' ), $this->display_version ); ?></div>
[188] Fix | Delete
[189] Fix | Delete
<?php $this->tabs(); ?>
[190] Fix | Delete
[191] Fix | Delete
<div class="changelog">
[192] Fix | Delete
[193] Fix | Delete
<div class="about-overview">
[194] Fix | Delete
<iframe width="640" height="360" src="//www.youtube.com/embed/todRiV7Cel0" frameborder="0" allowfullscreen></iframe>
[195] Fix | Delete
</div>
[196] Fix | Delete
<h2 class="about-headline-callout"><?php _e( 'A simplified and more powerful form building experience.', 'ninja-forms' );?></h2>
[197] Fix | Delete
[198] Fix | Delete
<div class="feature-section col two-col">
[199] Fix | Delete
[200] Fix | Delete
<div class="col-1">
[201] Fix | Delete
<img src="<?php echo NF_PLUGIN_URL . 'assets/images/screenshots/ss-builder.png'; ?>">
[202] Fix | Delete
<h4><?php _e( 'New Builder Tab', 'ninja-forms' );?></h4>
[203] Fix | Delete
<p><?php _e( 'When creating and editing forms, go directly to the section that matters most.', 'ninja-forms' ); ?></p>
[204] Fix | Delete
</div>
[205] Fix | Delete
[206] Fix | Delete
<div class="col-2 last-feature">
[207] Fix | Delete
<img src="<?php echo NF_PLUGIN_URL . 'assets/images/screenshots/ss-field-settings.png'; ?>">
[208] Fix | Delete
<h4><?php _e( 'Better Organized Field Settings', 'ninja-forms' );?></h4>
[209] Fix | Delete
<p><?php printf( __( 'The most common settings are shown immediately, while other, non-essential, settings are tucked away inside expandable sections.', 'ninja-forms' ), admin_url( 'edit.php?post_type=download&page=nf-settings&tab=misc' ) ); ?></p>
[210] Fix | Delete
</div>
[211] Fix | Delete
[212] Fix | Delete
</div>
[213] Fix | Delete
[214] Fix | Delete
<hr />
[215] Fix | Delete
[216] Fix | Delete
<div class="feature-section col three-col">
[217] Fix | Delete
[218] Fix | Delete
<div class="col-1">
[219] Fix | Delete
<img src="<?php echo NF_PLUGIN_URL . 'assets/images/screenshots/ss-emails-actions.png'; ?>">
[220] Fix | Delete
<h4><?php _e( 'Improved clarity', 'ninja-forms' );?></h4>
[221] Fix | Delete
<p><?php _e( 'Along with the "Build Your Form" tab, we\'ve removed "Notifications" in favor of "Emails & Actions." This is a much clearer indication of what can be done on this tab.', 'ninja-forms' ); ?></p>
[222] Fix | Delete
</div>
[223] Fix | Delete
[224] Fix | Delete
<div class="col-2">
[225] Fix | Delete
<img src="<?php echo NF_PLUGIN_URL . 'assets/images/screenshots/ss-nuke-option.png'; ?>">
[226] Fix | Delete
<h4><?php _e( 'Remove all Ninja Forms data', 'ninja-forms' );?></h4>
[227] Fix | Delete
<p><?php _e( 'We\'ve added the option to remove all Ninja Forms data (submissions, forms, fields, options) when you delete the plugin. We call it the nuclear option.', 'ninja-forms' ); ?></p>
[228] Fix | Delete
</div>
[229] Fix | Delete
[230] Fix | Delete
<div class="col-3 last-feature">
[231] Fix | Delete
<img src="<?php echo NF_PLUGIN_URL . 'assets/images/screenshots/ss-licenses.png'; ?>">
[232] Fix | Delete
<h4><?php _e( 'Better license management', 'ninja-forms' );?></h4>
[233] Fix | Delete
<p><?php _e( 'Deactivate Ninja Forms extension licenses individually or as a group from the settings tab.', 'ninja-forms' ); ?></p>
[234] Fix | Delete
</div>
[235] Fix | Delete
[236] Fix | Delete
</div>
[237] Fix | Delete
[238] Fix | Delete
<hr />
[239] Fix | Delete
[240] Fix | Delete
<div class="feature-section col two-col">
[241] Fix | Delete
[242] Fix | Delete
<div class="col-1">
[243] Fix | Delete
<h4><?php _e( 'More to come', 'ninja-forms' ); ?></h4>
[244] Fix | Delete
<p><?php _e( 'The interface updates in this version lay the groundwork for some great improvements in the future. Version 3.0 will build on these changes to make Ninja Forms an even more stable, powerful, and user-friendly form builder.', 'ninja-forms' ); ?></p>
[245] Fix | Delete
</div>
[246] Fix | Delete
[247] Fix | Delete
<div class="col-2 last-feature">
[248] Fix | Delete
<h4><?php _e( 'Documentation', 'ninja-forms' );?></h4>
[249] Fix | Delete
<p><?php _e( 'Take a look at our in-depth Ninja Forms documentation below.', 'ninja-forms' ); ?></p>
[250] Fix | Delete
<p>
[251] Fix | Delete
<a href="<?php echo esc_url( 'http://docs.ninjaforms.com/?utm_medium=plugin&utm_source=welcome-screen&utm_campaign=Ninja+Forms+Welcome&utm_content=Ninja+Forms+Docs' ); ?>"><?php _e( 'Ninja Forms Documentation', 'ninja-forms' ); ?></a> &middot;
[252] Fix | Delete
<a href="<?php echo esc_url( 'https://ninjaforms.com/contact/?utm_medium=plugin&utm_source=welcome-screen&utm_campaign=Ninja+Forms+Welcome&utm_content=Ninja+Forms+Support' ); ?>"><?php _e( 'Get Support', 'ninja-forms' ); ?></a>
[253] Fix | Delete
</p>
[254] Fix | Delete
</div>
[255] Fix | Delete
[256] Fix | Delete
</div>
[257] Fix | Delete
[258] Fix | Delete
</div>
[259] Fix | Delete
[260] Fix | Delete
<div class="return-to-dashboard">
[261] Fix | Delete
<a href="<?php echo esc_url( admin_url( 'index.php?page=ninja-forms' ) ); ?>"><?php _e( 'Return to Ninja Forms', 'ninja-forms' ); ?></a> &middot;
[262] Fix | Delete
<a href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'nf-changelog' ), 'index.php' ) ) ); ?>"><?php _e( 'View the Full Changelog', 'ninja-forms' ); ?></a>
[263] Fix | Delete
</div>
[264] Fix | Delete
</div>
[265] Fix | Delete
<?php
[266] Fix | Delete
}
[267] Fix | Delete
[268] Fix | Delete
/**
[269] Fix | Delete
* Render Changelog Screen
[270] Fix | Delete
*
[271] Fix | Delete
* @access public
[272] Fix | Delete
* @since 2.0.3
[273] Fix | Delete
* @return void
[274] Fix | Delete
*/
[275] Fix | Delete
public function changelog_screen() {
[276] Fix | Delete
list( $display_version ) = explode( '-', NF_PLUGIN_VERSION );
[277] Fix | Delete
?>
[278] Fix | Delete
<div class="wrap about-wrap">
[279] Fix | Delete
<h1><?php echo $this->header_text; ?></h1>
[280] Fix | Delete
<div class="about-text"><?php echo $this->header_desc; ?></div>
[281] Fix | Delete
<div class="nf-badge"><?php printf( __( 'Version %s', 'ninja-forms' ), $this->display_version ); ?></div>
[282] Fix | Delete
[283] Fix | Delete
<?php $this->tabs(); ?>
[284] Fix | Delete
[285] Fix | Delete
<div class="changelog">
[286] Fix | Delete
<h3><?php _e( 'Full Changelog', 'ninja-forms' );?></h3>
[287] Fix | Delete
[288] Fix | Delete
<div class="feature-section">
[289] Fix | Delete
<?php echo $this->parse_readme(); ?>
[290] Fix | Delete
</div>
[291] Fix | Delete
</div>
[292] Fix | Delete
[293] Fix | Delete
<div class="return-to-dashboard">
[294] Fix | Delete
<a href="<?php echo esc_url( admin_url( 'index.php?page=ninja-forms' ) ); ?>"><?php _e( 'Go to Ninja Forms', 'ninja-forms' ); ?></a>
[295] Fix | Delete
</div>
[296] Fix | Delete
</div>
[297] Fix | Delete
<?php
[298] Fix | Delete
}
[299] Fix | Delete
[300] Fix | Delete
/**
[301] Fix | Delete
* Render Getting Started Screen
[302] Fix | Delete
*
[303] Fix | Delete
* @access public
[304] Fix | Delete
* @since 1.9
[305] Fix | Delete
* @return void
[306] Fix | Delete
*/
[307] Fix | Delete
public function getting_started_screen() {
[308] Fix | Delete
list( $display_version ) = explode( '-', NF_PLUGIN_VERSION );
[309] Fix | Delete
?>
[310] Fix | Delete
<div class="wrap about-wrap">
[311] Fix | Delete
<h1><?php echo $this->header_text; ?></h1>
[312] Fix | Delete
<div class="about-text"><?php echo $this->header_desc; ?></div>
[313] Fix | Delete
<div class="nf-badge"><?php printf( __( 'Version %s', 'ninja-forms' ), $this->display_version ); ?></div>
[314] Fix | Delete
[315] Fix | Delete
<?php $this->tabs(); ?>
[316] Fix | Delete
[317] Fix | Delete
<p class="about-description"><?php _e( 'Use the tips below to get started using Ninja Forms. You will be up and running in no time!', 'ninja-forms' ); ?></p>
[318] Fix | Delete
[319] Fix | Delete
<div class="changelog">
[320] Fix | Delete
[321] Fix | Delete
<div class="feature-section">
[322] Fix | Delete
<h4><?php _e( 'All About Forms', 'ninja-forms' );?></h4>
[323] Fix | Delete
<img style="width: 500px; height: 292px;" src="<?php echo NF_PLUGIN_URL . 'assets/images/screenshots/ss-new-form.png'; ?>" class="nf-welcome-screenshots">
[324] Fix | Delete
[325] Fix | Delete
<p><?php printf( __( 'The Forms menu is your access point for all things Ninja Forms. We\'ve already created your first %scontact form%s so that you have an example. You can also create your own by clicking %sAdd New%s.', 'ninja-forms' ), '<a href="admin.php?page=ninja-forms&tab=builder&form_id=1">', '</a>', '<a href="admin.php?page=ninja-forms&tab=builder&form_id=new">', '</a>' ); ?></p>
[326] Fix | Delete
[327] Fix | Delete
<h4><?php _e( 'Build Your Form', 'ninja-forms' );?></h4>
[328] Fix | Delete
<p><?php _e( 'This is where you\'ll build your form by adding fields and dragging them into the order you want them to appear. Each field will have an assortment of options such as label, label position, and placeholder.', 'ninja-forms' );?></p>
[329] Fix | Delete
[330] Fix | Delete
<h4><?php _e( 'Emails & Actions', 'ninja-forms' );?></h4>
[331] Fix | Delete
<p><?php _e( 'If you would like for your form to notify you via email when a user clicks submit, you can set those up on this tab. You can create an unlimited number of emails, including emails sent to the user who filled out the form.', 'ninja-forms' );?></p>
[332] Fix | Delete
[333] Fix | Delete
<h4><?php _e( 'Settings', 'ninja-forms' );?></h4>
[334] Fix | Delete
<p><?php _e( 'This tab hold general form settings, such as title and submission method, as well as display settings like hiding a form when it is successfully completed.', 'ninja-forms' );?></p>
[335] Fix | Delete
[336] Fix | Delete
</div>
[337] Fix | Delete
[338] Fix | Delete
</div>
[339] Fix | Delete
[340] Fix | Delete
<hr />
[341] Fix | Delete
[342] Fix | Delete
<div class="changelog">
[343] Fix | Delete
<h3><?php _e( 'Displaying Your Form', 'ninja-forms' );?></h3>
[344] Fix | Delete
[345] Fix | Delete
<div class="feature-section col two-col">
[346] Fix | Delete
[347] Fix | Delete
<div class="col-1">
[348] Fix | Delete
<h4><?php _e( 'Append to Page', 'ninja-forms' );?></h4>
[349] Fix | Delete
<p><?php _e( 'Under Basic Form Behavior in the Form Settings you can easily select a page that you would like the form automatically appended to the end of that page\'s content. A similiar option is avaiable in every content edit screen in its sidebar.', 'ninja-forms' ); ?></p>
[350] Fix | Delete
</div>
[351] Fix | Delete
[352] Fix | Delete
<div class="col-2 last-feature">
[353] Fix | Delete
<h4><?php _e( 'Shortcode', 'ninja-forms' );?></h4>
[354] Fix | Delete
<p><?php printf( __( 'Place %s in any area that accepts shortcodes to display your form anywhere you like. Even in the middle of your page or posts content.', 'ninja-forms' ), '[ninja_form id=1]' ); ?></p>
[355] Fix | Delete
</div>
[356] Fix | Delete
[357] Fix | Delete
</div>
[358] Fix | Delete
[359] Fix | Delete
<div class="feature-section col two-col">
[360] Fix | Delete
[361] Fix | Delete
<div class="col-1">
[362] Fix | Delete
<h4><?php _e( 'Ninja Forms Widget', 'ninja-forms' );?></h4>
[363] Fix | Delete
<p><?php printf( __( 'Ninja Forms provides a widget that you can place in any widgetized area of your site and select exactly which form you would like displayed in that space.', 'ninja-forms' ), admin_url( 'edit.php?post_type=download&page=nf-settings&tab=misc' ) ); ?></p>
[364] Fix | Delete
</div>
[365] Fix | Delete
[366] Fix | Delete
<div class="col-2 last-feature">
[367] Fix | Delete
<h4><?php _e( 'Template Function', 'ninja-forms' );?></h4>
[368] Fix | Delete
<p><?php printf( __( 'Ninja Forms also comes with a simple template function that can be placed directly into a php template file. %s', 'ninja-forms' ), '<code>if( function_exists( \'ninja_forms_display_form\' ) ){ ninja_forms_display_form( 1 ); }</code>' ); ?></p>
[369] Fix | Delete
</div>
[370] Fix | Delete
[371] Fix | Delete
</div>
[372] Fix | Delete
[373] Fix | Delete
</div>
[374] Fix | Delete
[375] Fix | Delete
<hr />
[376] Fix | Delete
[377] Fix | Delete
<div class="changelog">
[378] Fix | Delete
<h3><?php _e( 'Need Help?', 'ninja-forms' );?></h3>
[379] Fix | Delete
[380] Fix | Delete
<div class="feature-section col two-col">
[381] Fix | Delete
[382] Fix | Delete
<div class="col-1">
[383] Fix | Delete
<h4><?php _e( 'Growing Documentation', 'ninja-forms' );?></h4>
[384] Fix | Delete
<p><?php printf( __( 'Documentation is available covering everything from %sTroubleshooting%s to our %sDeveloper API%s. New Documents are always being added.', 'ninja-forms' ), '<a href="http://docs.ninjaforms.com/customer/portal/articles/2045713-troubleshooting-ninja-forms/?utm_medium=plugin&utm_source=welcome-screen&utm_campaign=Ninja+Forms+Welcome&utm_content=Ninja+Forms+Docs">', '</a>', '<a href="http://docs.ninjaforms.com/customer/portal/topics/798123-developer-api/articles/?utm_medium=plugin&utm_source=welcome-screen&utm_campaign=Ninja+Forms+Welcome&utm_content=Ninja+Forms+Docs">', '</a>' ); ?></p>
[385] Fix | Delete
</div>
[386] Fix | Delete
[387] Fix | Delete
<div class="col-2 last-feature">
[388] Fix | Delete
<h4><?php _e( 'Best Support in the Business', 'ninja-forms' );?></h4>
[389] Fix | Delete
<p><?php printf( __( 'We do all we can to provide every Ninja Forms user with the best support possible. If you encounter a problem or have a question, %splease contact us%s.', 'ninja-forms' ), '<a href="https://ninjaforms.com/contact/?utm_medium=plugin&utm_source=welcome-screen&utm_campaign=Ninja+Forms+Welcome&utm_content=Ninja+Forms+Support">', '</a>' ); ?></p>
[390] Fix | Delete
</div>
[391] Fix | Delete
[392] Fix | Delete
</div>
[393] Fix | Delete
[394] Fix | Delete
</div>
[395] Fix | Delete
</div>
[396] Fix | Delete
<?php
[397] Fix | Delete
}
[398] Fix | Delete
[399] Fix | Delete
/**
[400] Fix | Delete
* Render Credits Screen
[401] Fix | Delete
*
[402] Fix | Delete
* @access public
[403] Fix | Delete
* @since 1.4
[404] Fix | Delete
* @return void
[405] Fix | Delete
*/
[406] Fix | Delete
public function credits_screen() {
[407] Fix | Delete
list( $display_version ) = explode( '-', NF_PLUGIN_VERSION );
[408] Fix | Delete
?>
[409] Fix | Delete
<div class="wrap about-wrap">
[410] Fix | Delete
<h1><?php printf( __( 'Welcome to Ninja Forms %s', 'ninja-forms' ), $display_version ); ?></h1>
[411] Fix | Delete
<div class="about-text"><?php printf( __( 'Thank you for updating to the latest version! Ninja Forms %s is primed to make your experience managing submissions an enjoyable one!', 'ninja-forms' ), $display_version ); ?></div>
[412] Fix | Delete
<div class="nf-badge"><?php printf( __( 'Version %s', 'ninja-forms' ), $display_version ); ?></div>
[413] Fix | Delete
[414] Fix | Delete
<?php $this->tabs(); ?>
[415] Fix | Delete
[416] Fix | Delete
<p class="about-description"><?php _e( 'Ninja Forms is created by a worldwide team of developers who aim to provide the #1 WordPress community form creation plugin.', 'ninja-forms' ); ?></p>
[417] Fix | Delete
[418] Fix | Delete
<?php echo $this->contributors(); ?>
[419] Fix | Delete
</div>
[420] Fix | Delete
<?php
[421] Fix | Delete
}
[422] Fix | Delete
[423] Fix | Delete
[424] Fix | Delete
/**
[425] Fix | Delete
* Parse the NF readme.txt file
[426] Fix | Delete
*
[427] Fix | Delete
* @since 2.0.3
[428] Fix | Delete
* @return string $readme HTML formatted readme file
[429] Fix | Delete
*/
[430] Fix | Delete
public function parse_readme() {
[431] Fix | Delete
$file = file_exists( NF_PLUGIN_DIR . 'readme.txt' ) ? NF_PLUGIN_DIR . 'readme.txt' : null;
[432] Fix | Delete
[433] Fix | Delete
if ( ! $file ) {
[434] Fix | Delete
$readme = '<p>' . __( 'No valid changelog was found.', 'ninja-forms' ) . '</p>';
[435] Fix | Delete
} else {
[436] Fix | Delete
$readme = file_get_contents( $file );
[437] Fix | Delete
$readme = nl2br( esc_html( $readme ) );
[438] Fix | Delete
[439] Fix | Delete
$readme = explode( '== Changelog ==', $readme );
[440] Fix | Delete
$readme = end( $readme );
[441] Fix | Delete
[442] Fix | Delete
$readme = preg_replace( '/`(.*?)`/', '<code>\\1</code>', $readme );
[443] Fix | Delete
$readme = preg_replace( '/[\040]\*\*(.*?)\*\*/', ' <strong>\\1</strong>', $readme );
[444] Fix | Delete
$readme = preg_replace( '/[\040]\*(.*?)\*/', ' <em>\\1</em>', $readme );
[445] Fix | Delete
$readme = preg_replace( '/= (.*?) =/', '<h4>\\1</h4>', $readme );
[446] Fix | Delete
$readme = preg_replace( '/\[(.*?)\]\((.*?)\)/', '<a href="\\2">\\1</a>', $readme );
[447] Fix | Delete
}
[448] Fix | Delete
[449] Fix | Delete
return $readme;
[450] Fix | Delete
}
[451] Fix | Delete
[452] Fix | Delete
[453] Fix | Delete
/**
[454] Fix | Delete
* Render Contributors List
[455] Fix | Delete
*
[456] Fix | Delete
* @since 1.4
[457] Fix | Delete
* @uses NF_Welcome::get_contributors()
[458] Fix | Delete
* @return string $contributor_list HTML formatted list of all the contributors for NF
[459] Fix | Delete
*/
[460] Fix | Delete
public function contributors() {
[461] Fix | Delete
$contributors = $this->get_contributors();
[462] Fix | Delete
[463] Fix | Delete
if ( empty( $contributors ) )
[464] Fix | Delete
return '';
[465] Fix | Delete
[466] Fix | Delete
$contributor_list = '<ul class="wp-people-group">';
[467] Fix | Delete
[468] Fix | Delete
foreach ( $contributors as $contributor ) {
[469] Fix | Delete
$contributor_list .= '<li class="wp-person">';
[470] Fix | Delete
$contributor_list .= sprintf( '<a href="%s" title="%s">',
[471] Fix | Delete
esc_url( 'https://github.com/' . $contributor->login ),
[472] Fix | Delete
esc_html( sprintf( __( 'View %s', 'ninja-forms' ), $contributor->login ) )
[473] Fix | Delete
);
[474] Fix | Delete
$contributor_list .= sprintf( '<img src="%s" width="64" height="64" class="gravatar" alt="%s" />', esc_url( $contributor->avatar_url ), esc_html( $contributor->login ) );
[475] Fix | Delete
$contributor_list .= '</a>';
[476] Fix | Delete
$contributor_list .= sprintf( '<a class="web" href="%s">%s</a>', esc_url( 'https://github.com/' . $contributor->login ), esc_html( $contributor->login ) );
[477] Fix | Delete
$contributor_list .= '</a>';
[478] Fix | Delete
$contributor_list .= '</li>';
[479] Fix | Delete
}
[480] Fix | Delete
[481] Fix | Delete
$contributor_list .= '</ul>';
[482] Fix | Delete
[483] Fix | Delete
return $contributor_list;
[484] Fix | Delete
}
[485] Fix | Delete
[486] Fix | Delete
/**
[487] Fix | Delete
* Retreive list of contributors from GitHub.
[488] Fix | Delete
*
[489] Fix | Delete
* @access public
[490] Fix | Delete
* @since 1.4
[491] Fix | Delete
* @return array $contributors List of contributors
[492] Fix | Delete
*/
[493] Fix | Delete
public function get_contributors() {
[494] Fix | Delete
$contributors = get_transient( 'nf_contributors' );
[495] Fix | Delete
[496] Fix | Delete
if ( false !== $contributors )
[497] Fix | Delete
return $contributors;
[498] Fix | Delete
[499] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function