Change name to Featureon

This commit is contained in:
Alexander Agnarson 2020-03-11 16:50:30 +01:00
parent 600ce12d26
commit 49be53b495
30 changed files with 594 additions and 594 deletions

View file

@ -8,7 +8,7 @@
* or theme author for support.
*
* @package TGM-Plugin-Activation
* @version 2.6.1 for parent theme MagazinerTwo for publication on WordPress.org
* @version 2.6.1 for parent theme Featureon for publication on WordPress.org
* @link http://tgmpluginactivation.com/
* @author Thomas Griffin, Gary Jones, Juliette Reinders Folmer
* @copyright Copyright (c) 2011, Thomas Griffin
@ -324,77 +324,77 @@ if ( ! class_exists( 'TGM_Plugin_Activation' ) ) {
// Load class strings.
$this->strings = array(
'page_title' => __( 'Install Required Plugins', 'magazinertwo' ),
'menu_title' => __( 'Install Plugins', 'magazinertwo' ),
'page_title' => __( 'Install Required Plugins', 'featureon' ),
'menu_title' => __( 'Install Plugins', 'featureon' ),
/* translators: %s: plugin name. */
'installing' => __( 'Installing Plugin: %s', 'magazinertwo' ),
'installing' => __( 'Installing Plugin: %s', 'featureon' ),
/* translators: %s: plugin name. */
'updating' => __( 'Updating Plugin: %s', 'magazinertwo' ),
'oops' => __( 'Something went wrong with the plugin API.', 'magazinertwo' ),
'updating' => __( 'Updating Plugin: %s', 'featureon' ),
'oops' => __( 'Something went wrong with the plugin API.', 'featureon' ),
'notice_can_install_required' => _n_noop(
/* translators: 1: plugin name(s). */
'This theme requires the following plugin: %1$s.',
'This theme requires the following plugins: %1$s.',
'magazinertwo'
'featureon'
),
'notice_can_install_recommended' => _n_noop(
/* translators: 1: plugin name(s). */
'This theme recommends the following plugin: %1$s.',
'This theme recommends the following plugins: %1$s.',
'magazinertwo'
'featureon'
),
'notice_ask_to_update' => _n_noop(
/* translators: 1: plugin name(s). */
'The following plugin needs to be updated to its latest version to ensure maximum compatibility with this theme: %1$s.',
'The following plugins need to be updated to their latest version to ensure maximum compatibility with this theme: %1$s.',
'magazinertwo'
'featureon'
),
'notice_ask_to_update_maybe' => _n_noop(
/* translators: 1: plugin name(s). */
'There is an update available for: %1$s.',
'There are updates available for the following plugins: %1$s.',
'magazinertwo'
'featureon'
),
'notice_can_activate_required' => _n_noop(
/* translators: 1: plugin name(s). */
'The following required plugin is currently inactive: %1$s.',
'The following required plugins are currently inactive: %1$s.',
'magazinertwo'
'featureon'
),
'notice_can_activate_recommended' => _n_noop(
/* translators: 1: plugin name(s). */
'The following recommended plugin is currently inactive: %1$s.',
'The following recommended plugins are currently inactive: %1$s.',
'magazinertwo'
'featureon'
),
'install_link' => _n_noop(
'Begin installing plugin',
'Begin installing plugins',
'magazinertwo'
'featureon'
),
'update_link' => _n_noop(
'Begin updating plugin',
'Begin updating plugins',
'magazinertwo'
'featureon'
),
'activate_link' => _n_noop(
'Begin activating plugin',
'Begin activating plugins',
'magazinertwo'
'featureon'
),
'return' => __( 'Return to Required Plugins Installer', 'magazinertwo' ),
'dashboard' => __( 'Return to the Dashboard', 'magazinertwo' ),
'plugin_activated' => __( 'Plugin activated successfully.', 'magazinertwo' ),
'activated_successfully' => __( 'The following plugin was activated successfully:', 'magazinertwo' ),
'return' => __( 'Return to Required Plugins Installer', 'featureon' ),
'dashboard' => __( 'Return to the Dashboard', 'featureon' ),
'plugin_activated' => __( 'Plugin activated successfully.', 'featureon' ),
'activated_successfully' => __( 'The following plugin was activated successfully:', 'featureon' ),
/* translators: 1: plugin name. */
'plugin_already_active' => __( 'No action taken. Plugin %1$s was already active.', 'magazinertwo' ),
'plugin_already_active' => __( 'No action taken. Plugin %1$s was already active.', 'featureon' ),
/* translators: 1: plugin name. */
'plugin_needs_higher_version' => __( 'Plugin not activated. A higher version of %s is needed for this theme. Please update the plugin.', 'magazinertwo' ),
'plugin_needs_higher_version' => __( 'Plugin not activated. A higher version of %s is needed for this theme. Please update the plugin.', 'featureon' ),
/* translators: 1: dashboard link. */
'complete' => __( 'All plugins installed and activated successfully. %1$s', 'magazinertwo' ),
'dismiss' => __( 'Dismiss this notice', 'magazinertwo' ),
'notice_cannot_install_activate' => __( 'There are one or more required or recommended plugins to install, update or activate.', 'magazinertwo' ),
'contact_admin' => __( 'Please contact the administrator of this site for help.', 'magazinertwo' ),
'complete' => __( 'All plugins installed and activated successfully. %1$s', 'featureon' ),
'dismiss' => __( 'Dismiss this notice', 'featureon' ),
'notice_cannot_install_activate' => __( 'There are one or more required or recommended plugins to install, update or activate.', 'featureon' ),
'contact_admin' => __( 'Please contact the administrator of this site for help.', 'featureon' ),
);
do_action( 'tgmpa_register' );
@ -519,8 +519,8 @@ if ( ! class_exists( 'TGM_Plugin_Activation' ) ) {
$actions['update'] = sprintf(
'<a href="%1$s" title="%2$s" class="edit">%3$s</a>',
esc_url( $this->get_tgmpa_status_url( 'update' ) ),
esc_attr__( 'This plugin needs to be updated to be compatible with your theme.', 'magazinertwo' ),
esc_html__( 'Update Required', 'magazinertwo' )
esc_attr__( 'This plugin needs to be updated to be compatible with your theme.', 'featureon' ),
esc_html__( 'Update Required', 'featureon' )
);
return $actions;
@ -824,7 +824,7 @@ if ( ! class_exists( 'TGM_Plugin_Activation' ) ) {
// Display message based on if all plugins are now active or not.
if ( $this->is_tgmpa_complete() ) {
echo '<p>', sprintf( esc_html( $this->strings['complete'] ), '<a href="' . esc_url( self_admin_url() ) . '">' . esc_html__( 'Return to the Dashboard', 'magazinertwo' ) . '</a>' ), '</p>';
echo '<p>', sprintf( esc_html( $this->strings['complete'] ), '<a href="' . esc_url( self_admin_url() ) . '">' . esc_html__( 'Return to the Dashboard', 'featureon' ) . '</a>' ), '</p>';
echo '<style type="text/css">#adminmenu .wp-submenu li.current { display: none !important; }</style>';
} else {
echo '<p><a href="', esc_url( $this->get_tgmpa_url() ), '" target="_parent">', esc_html( $this->strings['return'] ), '</a></p>';
@ -931,10 +931,10 @@ if ( ! class_exists( 'TGM_Plugin_Activation' ) ) {
if ( true === $GLOBALS['wp_filesystem']->move( $from_path, $to_path ) ) {
return trailingslashit( $to_path );
} else {
return new WP_Error( 'rename_failed', esc_html__( 'The remote plugin package does not contain a folder with the desired slug and renaming did not work.', 'magazinertwo' ) . ' ' . esc_html__( 'Please contact the plugin provider and ask them to package their plugin according to the WordPress guidelines.', 'magazinertwo' ), array( 'found' => $subdir_name, 'expected' => $desired_slug ) );
return new WP_Error( 'rename_failed', esc_html__( 'The remote plugin package does not contain a folder with the desired slug and renaming did not work.', 'featureon' ) . ' ' . esc_html__( 'Please contact the plugin provider and ask them to package their plugin according to the WordPress guidelines.', 'featureon' ), array( 'found' => $subdir_name, 'expected' => $desired_slug ) );
}
} elseif ( empty( $subdir_name ) ) {
return new WP_Error( 'packaged_wrong', esc_html__( 'The remote plugin package consists of more than one file, but the files are not packaged in a folder.', 'magazinertwo' ) . ' ' . esc_html__( 'Please contact the plugin provider and ask them to package their plugin according to the WordPress guidelines.', 'magazinertwo' ), array( 'found' => $subdir_name, 'expected' => $desired_slug ) );
return new WP_Error( 'packaged_wrong', esc_html__( 'The remote plugin package consists of more than one file, but the files are not packaged in a folder.', 'featureon' ) . ' ' . esc_html__( 'Please contact the plugin provider and ask them to package their plugin according to the WordPress guidelines.', 'featureon' ), array( 'found' => $subdir_name, 'expected' => $desired_slug ) );
}
}
@ -1118,12 +1118,12 @@ if ( ! class_exists( 'TGM_Plugin_Activation' ) ) {
$count = count( $plugin_group );
$linked_plugins = array_map( array( 'TGMPA_Utils', 'wrap_in_em' ), $linked_plugins );
$last_plugin = array_pop( $linked_plugins ); // Pop off last name to prep for readability.
$imploded = empty( $linked_plugins ) ? $last_plugin : ( implode( ', ', $linked_plugins ) . ' ' . esc_html_x( 'and', 'plugin A *and* plugin B', 'magazinertwo' ) . ' ' . $last_plugin );
$imploded = empty( $linked_plugins ) ? $last_plugin : ( implode( ', ', $linked_plugins ) . ' ' . esc_html_x( 'and', 'plugin A *and* plugin B', 'featureon' ) . ' ' . $last_plugin );
$rendered .= sprintf(
$line_template,
sprintf(
translate_nooped_plural( $this->strings[ $type ], $count, 'magazinertwo' ),
translate_nooped_plural( $this->strings[ $type ], $count, 'featureon' ),
$imploded,
$count
)
@ -1171,14 +1171,14 @@ if ( ! class_exists( 'TGM_Plugin_Activation' ) ) {
if ( $install_count > 0 ) {
$action_links['install'] = sprintf(
$link_template,
translate_nooped_plural( $this->strings['install_link'], $install_count, 'magazinertwo' ),
translate_nooped_plural( $this->strings['install_link'], $install_count, 'featureon' ),
esc_url( $this->get_tgmpa_status_url( 'install' ) )
);
}
if ( $update_count > 0 ) {
$action_links['update'] = sprintf(
$link_template,
translate_nooped_plural( $this->strings['update_link'], $update_count, 'magazinertwo' ),
translate_nooped_plural( $this->strings['update_link'], $update_count, 'featureon' ),
esc_url( $this->get_tgmpa_status_url( 'update' ) )
);
}
@ -1187,7 +1187,7 @@ if ( ! class_exists( 'TGM_Plugin_Activation' ) ) {
if ( current_user_can( 'activate_plugins' ) && $activate_count > 0 ) {
$action_links['activate'] = sprintf(
$link_template,
translate_nooped_plural( $this->strings['activate_link'], $activate_count, 'magazinertwo' ),
translate_nooped_plural( $this->strings['activate_link'], $activate_count, 'featureon' ),
esc_url( $this->get_tgmpa_status_url( 'activate' ) )
);
}
@ -1979,7 +1979,7 @@ if ( ! class_exists( 'TGM_Plugin_Activation' ) ) {
esc_html(
sprintf(
/* translators: %s: version number */
__( 'TGMPA v%s', 'magazinertwo' ),
__( 'TGMPA v%s', 'featureon' ),
self::TGMPA_VERSION
)
),
@ -2270,10 +2270,10 @@ if ( ! class_exists( 'TGMPA_List_Table' ) ) {
*/
protected function get_plugin_advise_type_text( $required ) {
if ( true === $required ) {
return __( 'Required', 'magazinertwo' );
return __( 'Required', 'featureon' );
}
return __( 'Recommended', 'magazinertwo' );
return __( 'Recommended', 'featureon' );
}
/**
@ -2289,13 +2289,13 @@ if ( ! class_exists( 'TGMPA_List_Table' ) ) {
switch ( $type ) {
case 'repo':
$string = __( 'WordPress Repository', 'magazinertwo' );
$string = __( 'WordPress Repository', 'featureon' );
break;
case 'external':
$string = __( 'External Source', 'magazinertwo' );
$string = __( 'External Source', 'featureon' );
break;
case 'bundled':
$string = __( 'Pre-Packaged', 'magazinertwo' );
$string = __( 'Pre-Packaged', 'featureon' );
break;
}
@ -2312,25 +2312,25 @@ if ( ! class_exists( 'TGMPA_List_Table' ) ) {
*/
protected function get_plugin_status_text( $slug ) {
if ( ! $this->tgmpa->is_plugin_installed( $slug ) ) {
return __( 'Not Installed', 'magazinertwo' );
return __( 'Not Installed', 'featureon' );
}
if ( ! $this->tgmpa->is_plugin_active( $slug ) ) {
$install_status = __( 'Installed But Not Activated', 'magazinertwo' );
$install_status = __( 'Installed But Not Activated', 'featureon' );
} else {
$install_status = __( 'Active', 'magazinertwo' );
$install_status = __( 'Active', 'featureon' );
}
$update_status = '';
if ( $this->tgmpa->does_plugin_require_update( $slug ) && false === $this->tgmpa->does_plugin_have_update( $slug ) ) {
$update_status = __( 'Required Update not Available', 'magazinertwo' );
$update_status = __( 'Required Update not Available', 'featureon' );
} elseif ( $this->tgmpa->does_plugin_require_update( $slug ) ) {
$update_status = __( 'Requires Update', 'magazinertwo' );
$update_status = __( 'Requires Update', 'featureon' );
} elseif ( false !== $this->tgmpa->does_plugin_have_update( $slug ) ) {
$update_status = __( 'Update recommended', 'magazinertwo' );
$update_status = __( 'Update recommended', 'featureon' );
}
if ( '' === $update_status ) {
@ -2339,7 +2339,7 @@ if ( ! class_exists( 'TGMPA_List_Table' ) ) {
return sprintf(
/* translators: 1: install status, 2: update status */
_x( '%1$s, %2$s', 'Install/Update Status', 'magazinertwo' ),
_x( '%1$s, %2$s', 'Install/Update Status', 'featureon' ),
$install_status,
$update_status
);
@ -2385,19 +2385,19 @@ if ( ! class_exists( 'TGMPA_List_Table' ) ) {
switch ( $type ) {
case 'all':
/* translators: 1: number of plugins. */
$text = _nx( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $count, 'plugins', 'magazinertwo' );
$text = _nx( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $count, 'plugins', 'featureon' );
break;
case 'install':
/* translators: 1: number of plugins. */
$text = _n( 'To Install <span class="count">(%s)</span>', 'To Install <span class="count">(%s)</span>', $count, 'magazinertwo' );
$text = _n( 'To Install <span class="count">(%s)</span>', 'To Install <span class="count">(%s)</span>', $count, 'featureon' );
break;
case 'update':
/* translators: 1: number of plugins. */
$text = _n( 'Update Available <span class="count">(%s)</span>', 'Update Available <span class="count">(%s)</span>', $count, 'magazinertwo' );
$text = _n( 'Update Available <span class="count">(%s)</span>', 'Update Available <span class="count">(%s)</span>', $count, 'featureon' );
break;
case 'activate':
/* translators: 1: number of plugins. */
$text = _n( 'To Activate <span class="count">(%s)</span>', 'To Activate <span class="count">(%s)</span>', $count, 'magazinertwo' );
$text = _n( 'To Activate <span class="count">(%s)</span>', 'To Activate <span class="count">(%s)</span>', $count, 'featureon' );
break;
default:
$text = '';
@ -2479,7 +2479,7 @@ if ( ! class_exists( 'TGMPA_List_Table' ) ) {
$output = array();
if ( $this->tgmpa->is_plugin_installed( $item['slug'] ) ) {
$installed = ! empty( $item['installed_version'] ) ? $item['installed_version'] : _x( 'unknown', 'as in: "version nr unknown"', 'magazinertwo' );
$installed = ! empty( $item['installed_version'] ) ? $item['installed_version'] : _x( 'unknown', 'as in: "version nr unknown"', 'featureon' );
$color = '';
if ( ! empty( $item['minimum_version'] ) && $this->tgmpa->does_plugin_require_update( $item['slug'] ) ) {
@ -2487,7 +2487,7 @@ if ( ! class_exists( 'TGMPA_List_Table' ) ) {
}
$output[] = sprintf(
'<p><span style="min-width: 32px; text-align: right; float: right;%1$s">%2$s</span>' . __( 'Installed version:', 'magazinertwo' ) . '</p>',
'<p><span style="min-width: 32px; text-align: right; float: right;%1$s">%2$s</span>' . __( 'Installed version:', 'featureon' ) . '</p>',
$color,
$installed
);
@ -2495,7 +2495,7 @@ if ( ! class_exists( 'TGMPA_List_Table' ) ) {
if ( ! empty( $item['minimum_version'] ) ) {
$output[] = sprintf(
'<p><span style="min-width: 32px; text-align: right; float: right;">%1$s</span>' . __( 'Minimum required version:', 'magazinertwo' ) . '</p>',
'<p><span style="min-width: 32px; text-align: right; float: right;">%1$s</span>' . __( 'Minimum required version:', 'featureon' ) . '</p>',
$item['minimum_version']
);
}
@ -2507,7 +2507,7 @@ if ( ! class_exists( 'TGMPA_List_Table' ) ) {
}
$output[] = sprintf(
'<p><span style="min-width: 32px; text-align: right; float: right;%1$s">%2$s</span>' . __( 'Available version:', 'magazinertwo' ) . '</p>',
'<p><span style="min-width: 32px; text-align: right; float: right;%1$s">%2$s</span>' . __( 'Available version:', 'featureon' ) . '</p>',
$color,
$item['available_version']
);
@ -2530,7 +2530,7 @@ if ( ! class_exists( 'TGMPA_List_Table' ) ) {
* @since 2.2.0
*/
public function no_items() {
echo esc_html__( 'No plugins to install, update or activate.', 'magazinertwo' ) . ' <a href="' . esc_url( self_admin_url() ) . '"> ' . esc_html__( 'Return to the Dashboard', 'magazinertwo' ) . '</a>';
echo esc_html__( 'No plugins to install, update or activate.', 'featureon' ) . ' <a href="' . esc_url( self_admin_url() ) . '"> ' . esc_html__( 'Return to the Dashboard', 'featureon' ) . '</a>';
echo '<style type="text/css">#adminmenu .wp-submenu li.current { display: none !important; }</style>';
}
@ -2544,14 +2544,14 @@ if ( ! class_exists( 'TGMPA_List_Table' ) ) {
public function get_columns() {
$columns = array(
'cb' => '<input type="checkbox" />',
'plugin' => __( 'Plugin', 'magazinertwo' ),
'source' => __( 'Source', 'magazinertwo' ),
'type' => __( 'Type', 'magazinertwo' ),
'plugin' => __( 'Plugin', 'featureon' ),
'source' => __( 'Source', 'featureon' ),
'type' => __( 'Type', 'featureon' ),
);
if ( 'all' === $this->view_context || 'update' === $this->view_context ) {
$columns['version'] = __( 'Version', 'magazinertwo' );
$columns['status'] = __( 'Status', 'magazinertwo' );
$columns['version'] = __( 'Version', 'featureon' );
$columns['status'] = __( 'Status', 'featureon' );
}
return apply_filters( 'tgmpa_table_columns', $columns );
@ -2600,18 +2600,18 @@ if ( ! class_exists( 'TGMPA_List_Table' ) ) {
// Display the 'Install' action link if the plugin is not yet available.
if ( ! $this->tgmpa->is_plugin_installed( $item['slug'] ) ) {
/* translators: %2$s: plugin name in screen reader markup */
$actions['install'] = __( 'Install %2$s', 'magazinertwo' );
$actions['install'] = __( 'Install %2$s', 'featureon' );
} else {
// Display the 'Update' action link if an update is available and WP complies with plugin minimum.
if ( false !== $this->tgmpa->does_plugin_have_update( $item['slug'] ) && $this->tgmpa->can_plugin_update( $item['slug'] ) ) {
/* translators: %2$s: plugin name in screen reader markup */
$actions['update'] = __( 'Update %2$s', 'magazinertwo' );
$actions['update'] = __( 'Update %2$s', 'featureon' );
}
// Display the 'Activate' action link, but only if the plugin meets the minimum version.
if ( $this->tgmpa->can_plugin_activate( $item['slug'] ) ) {
/* translators: %2$s: plugin name in screen reader markup */
$actions['activate'] = __( 'Activate %2$s', 'magazinertwo' );
$actions['activate'] = __( 'Activate %2$s', 'featureon' );
}
}
@ -2681,7 +2681,7 @@ if ( ! class_exists( 'TGMPA_List_Table' ) ) {
<tr class="plugin-update-tr">
<td colspan="', absint( $this->get_column_count() ), '" class="plugin-update colspanchange">
<div class="update-message">',
esc_html__( 'Upgrade message from the plugin author:', 'magazinertwo' ),
esc_html__( 'Upgrade message from the plugin author:', 'featureon' ),
' <strong>', wp_kses_data( $item['upgrade_notice'] ), '</strong>
</div>
</td>
@ -2714,16 +2714,16 @@ if ( ! class_exists( 'TGMPA_List_Table' ) ) {
if ( 'update' !== $this->view_context && 'activate' !== $this->view_context ) {
if ( current_user_can( 'install_plugins' ) ) {
$actions['tgmpa-bulk-install'] = __( 'Install', 'magazinertwo' );
$actions['tgmpa-bulk-install'] = __( 'Install', 'featureon' );
}
}
if ( 'install' !== $this->view_context ) {
if ( current_user_can( 'update_plugins' ) ) {
$actions['tgmpa-bulk-update'] = __( 'Update', 'magazinertwo' );
$actions['tgmpa-bulk-update'] = __( 'Update', 'featureon' );
}
if ( current_user_can( 'activate_plugins' ) ) {
$actions['tgmpa-bulk-activate'] = __( 'Activate', 'magazinertwo' );
$actions['tgmpa-bulk-activate'] = __( 'Activate', 'featureon' );
}
}
@ -2754,9 +2754,9 @@ if ( ! class_exists( 'TGMPA_List_Table' ) ) {
// Did user actually select any plugins to install/update ?
if ( empty( $_POST['plugin'] ) ) {
if ( 'install' === $install_type ) {
$message = __( 'No plugins were selected to be installed. No action taken.', 'magazinertwo' );
$message = __( 'No plugins were selected to be installed. No action taken.', 'featureon' );
} else {
$message = __( 'No plugins were selected to be updated. No action taken.', 'magazinertwo' );
$message = __( 'No plugins were selected to be updated. No action taken.', 'featureon' );
}
echo '<div id="message" class="error"><p>', esc_html( $message ), '</p></div>';
@ -2797,9 +2797,9 @@ if ( ! class_exists( 'TGMPA_List_Table' ) ) {
// No need to proceed further if we have no plugins to handle.
if ( empty( $plugins_to_install ) ) {
if ( 'install' === $install_type ) {
$message = __( 'No plugins are available to be installed at this time.', 'magazinertwo' );
$message = __( 'No plugins are available to be installed at this time.', 'featureon' );
} else {
$message = __( 'No plugins are available to be updated at this time.', 'magazinertwo' );
$message = __( 'No plugins are available to be updated at this time.', 'featureon' );
}
echo '<div id="message" class="error"><p>', esc_html( $message ), '</p></div>';
@ -2905,7 +2905,7 @@ if ( ! class_exists( 'TGMPA_List_Table' ) ) {
// Did user actually select any plugins to activate ?
if ( empty( $_POST['plugin'] ) ) {
echo '<div id="message" class="error"><p>', esc_html__( 'No plugins were selected to be activated. No action taken.', 'magazinertwo' ), '</p></div>';
echo '<div id="message" class="error"><p>', esc_html__( 'No plugins were selected to be activated. No action taken.', 'featureon' ), '</p></div>';
return false;
}
@ -2931,7 +2931,7 @@ if ( ! class_exists( 'TGMPA_List_Table' ) ) {
// Return early if there are no plugins to activate.
if ( empty( $plugins_to_activate ) ) {
echo '<div id="message" class="error"><p>', esc_html__( 'No plugins are available to be activated at this time.', 'magazinertwo' ), '</p></div>';
echo '<div id="message" class="error"><p>', esc_html__( 'No plugins are available to be activated at this time.', 'featureon' ), '</p></div>';
return false;
}
@ -2945,11 +2945,11 @@ if ( ! class_exists( 'TGMPA_List_Table' ) ) {
$count = count( $plugin_names ); // Count so we can use _n function.
$plugin_names = array_map( array( 'TGMPA_Utils', 'wrap_in_strong' ), $plugin_names );
$last_plugin = array_pop( $plugin_names ); // Pop off last name to prep for readability.
$imploded = empty( $plugin_names ) ? $last_plugin : ( implode( ', ', $plugin_names ) . ' ' . esc_html_x( 'and', 'plugin A *and* plugin B', 'magazinertwo' ) . ' ' . $last_plugin );
$imploded = empty( $plugin_names ) ? $last_plugin : ( implode( ', ', $plugin_names ) . ' ' . esc_html_x( 'and', 'plugin A *and* plugin B', 'featureon' ) . ' ' . $last_plugin );
printf( // WPCS: xss ok.
'<div id="message" class="updated"><p>%1$s %2$s.</p></div>',
esc_html( _n( 'The following plugin was activated successfully:', 'The following plugins were activated successfully:', $count, 'magazinertwo' ) ),
esc_html( _n( 'The following plugin was activated successfully:', 'The following plugins were activated successfully:', $count, 'featureon' ) ),
$imploded
);
@ -3155,8 +3155,8 @@ if ( ! function_exists( 'tgmpa_load_bulk_installer' ) ) {
* @since 2.2.0
*/
public function activate_strings() {
$this->strings['activation_failed'] = __( 'Plugin activation failed.', 'magazinertwo' );
$this->strings['activation_success'] = __( 'Plugin activated successfully.', 'magazinertwo' );
$this->strings['activation_failed'] = __( 'Plugin activation failed.', 'featureon' );
$this->strings['activation_success'] = __( 'Plugin activated successfully.', 'featureon' );
}
/**
@ -3495,29 +3495,29 @@ if ( ! function_exists( 'tgmpa_load_bulk_installer' ) ) {
if ( 'update' === $this->options['install_type'] ) {
parent::add_strings();
/* translators: 1: plugin name, 2: action number 3: total number of actions. */
$this->upgrader->strings['skin_before_update_header'] = __( 'Updating Plugin %1$s (%2$d/%3$d)', 'magazinertwo' );
$this->upgrader->strings['skin_before_update_header'] = __( 'Updating Plugin %1$s (%2$d/%3$d)', 'featureon' );
} else {
/* translators: 1: plugin name, 2: error message. */
$this->upgrader->strings['skin_update_failed_error'] = __( 'An error occurred while installing %1$s: <strong>%2$s</strong>.', 'magazinertwo' );
$this->upgrader->strings['skin_update_failed_error'] = __( 'An error occurred while installing %1$s: <strong>%2$s</strong>.', 'featureon' );
/* translators: 1: plugin name. */
$this->upgrader->strings['skin_update_failed'] = __( 'The installation of %1$s failed.', 'magazinertwo' );
$this->upgrader->strings['skin_update_failed'] = __( 'The installation of %1$s failed.', 'featureon' );
if ( $this->tgmpa->is_automatic ) {
// Automatic activation strings.
$this->upgrader->strings['skin_upgrade_start'] = __( 'The installation and activation process is starting. This process may take a while on some hosts, so please be patient.', 'magazinertwo' );
$this->upgrader->strings['skin_upgrade_start'] = __( 'The installation and activation process is starting. This process may take a while on some hosts, so please be patient.', 'featureon' );
/* translators: 1: plugin name. */
$this->upgrader->strings['skin_update_successful'] = __( '%1$s installed and activated successfully.', 'magazinertwo' ) . ' <a href="#" class="hide-if-no-js" onclick="%2$s"><span>' . esc_html__( 'Show Details', 'magazinertwo' ) . '</span><span class="hidden">' . esc_html__( 'Hide Details', 'magazinertwo' ) . '</span>.</a>';
$this->upgrader->strings['skin_upgrade_end'] = __( 'All installations and activations have been completed.', 'magazinertwo' );
$this->upgrader->strings['skin_update_successful'] = __( '%1$s installed and activated successfully.', 'featureon' ) . ' <a href="#" class="hide-if-no-js" onclick="%2$s"><span>' . esc_html__( 'Show Details', 'featureon' ) . '</span><span class="hidden">' . esc_html__( 'Hide Details', 'featureon' ) . '</span>.</a>';
$this->upgrader->strings['skin_upgrade_end'] = __( 'All installations and activations have been completed.', 'featureon' );
/* translators: 1: plugin name, 2: action number 3: total number of actions. */
$this->upgrader->strings['skin_before_update_header'] = __( 'Installing and Activating Plugin %1$s (%2$d/%3$d)', 'magazinertwo' );
$this->upgrader->strings['skin_before_update_header'] = __( 'Installing and Activating Plugin %1$s (%2$d/%3$d)', 'featureon' );
} else {
// Default installation strings.
$this->upgrader->strings['skin_upgrade_start'] = __( 'The installation process is starting. This process may take a while on some hosts, so please be patient.', 'magazinertwo' );
$this->upgrader->strings['skin_upgrade_start'] = __( 'The installation process is starting. This process may take a while on some hosts, so please be patient.', 'featureon' );
/* translators: 1: plugin name. */
$this->upgrader->strings['skin_update_successful'] = esc_html__( '%1$s installed successfully.', 'magazinertwo' ) . ' <a href="#" class="hide-if-no-js" onclick="%2$s"><span>' . esc_html__( 'Show Details', 'magazinertwo' ) . '</span><span class="hidden">' . esc_html__( 'Hide Details', 'magazinertwo' ) . '</span>.</a>';
$this->upgrader->strings['skin_upgrade_end'] = __( 'All installations have been completed.', 'magazinertwo' );
$this->upgrader->strings['skin_update_successful'] = esc_html__( '%1$s installed successfully.', 'featureon' ) . ' <a href="#" class="hide-if-no-js" onclick="%2$s"><span>' . esc_html__( 'Show Details', 'featureon' ) . '</span><span class="hidden">' . esc_html__( 'Hide Details', 'featureon' ) . '</span>.</a>';
$this->upgrader->strings['skin_upgrade_end'] = __( 'All installations have been completed.', 'featureon' );
/* translators: 1: plugin name, 2: action number 3: total number of actions. */
$this->upgrader->strings['skin_before_update_header'] = __( 'Installing Plugin %1$s (%2$d/%3$d)', 'magazinertwo' );
$this->upgrader->strings['skin_before_update_header'] = __( 'Installing Plugin %1$s (%2$d/%3$d)', 'featureon' );
}
}
}
@ -3577,7 +3577,7 @@ if ( ! function_exists( 'tgmpa_load_bulk_installer' ) ) {
echo '<style type="text/css">#adminmenu .wp-submenu li.current { display: none !important; }</style>';
$update_actions['dashboard'] = sprintf(
esc_html( $this->tgmpa->strings['complete'] ),
'<a href="' . esc_url( self_admin_url() ) . '">' . esc_html__( 'Return to the Dashboard', 'magazinertwo' ) . '</a>'
'<a href="' . esc_url( self_admin_url() ) . '">' . esc_html__( 'Return to the Dashboard', 'featureon' ) . '</a>'
);
} else {
$update_actions['tgmpa_page'] = '<a href="' . esc_url( $this->tgmpa->get_tgmpa_url() ) . '" target="_parent">' . esc_html( $this->tgmpa->strings['return'] ) . '</a>';

View file

@ -5,9 +5,9 @@
/* Convert hexadecimal to rgb
/* ------------------------------------ */
if ( ! function_exists( 'magazinertwo_hex2rgb' ) ) {
if ( ! function_exists( 'featureon_hex2rgb' ) ) {
function magazinertwo_hex2rgb( $hex, $array=false ) {
function featureon_hex2rgb( $hex, $array=false ) {
$hex = str_replace("#", "", $hex);
if ( strlen($hex) == 3 ) {
@ -30,9 +30,9 @@ if ( ! function_exists( 'magazinertwo_hex2rgb' ) ) {
/* Google fonts
/* ------------------------------------ */
if ( ! function_exists( 'magazinertwo_enqueue_google_fonts' ) ) {
if ( ! function_exists( 'featureon_enqueue_google_fonts' ) ) {
function magazinertwo_enqueue_google_fonts () {
function featureon_enqueue_google_fonts () {
if ( get_theme_mod('dynamic-styles', 'on') == 'on' ) {
if ( get_theme_mod( 'font' ) == 'titillium-web-ext' ) { wp_enqueue_style( 'titillium-web-ext', '//fonts.googleapis.com/css?family=Titillium+Web:400,400italic,300italic,300,600&subset=latin,latin-ext' ); }
if ( get_theme_mod( 'font' ) == 'droid-serif' ) { wp_enqueue_style( 'droid-serif', '//fonts.googleapis.com/css?family=Droid+Serif:400,400italic,700' ); }
@ -57,19 +57,19 @@ if ( ! function_exists( 'magazinertwo_enqueue_google_fonts' ) ) {
}
}
add_action( 'wp_enqueue_scripts', 'magazinertwo_enqueue_google_fonts' );
add_action( 'wp_enqueue_scripts', 'featureon_enqueue_google_fonts' );
/* Dynamic css output
/* ------------------------------------ */
if ( ! function_exists( 'magazinertwo_dynamic_css' ) ) {
if ( ! function_exists( 'featureon_dynamic_css' ) ) {
function magazinertwo_dynamic_css() {
function featureon_dynamic_css() {
if ( get_theme_mod('dynamic-styles', 'on') == 'on' ) {
// rgb values
$color_1 = get_theme_mod('color-1');
$color_1_rgb = magazinertwo_hex2rgb($color_1);
$color_1_rgb = featureon_hex2rgb($color_1);
// start output
$styles = '';
@ -310,9 +310,9 @@ box-shadow: inset 1px 0 0 rgba(255,255,255,0.1); }
if ( get_theme_mod( 'header_textcolor' ) != '' ) {
$styles .= '.site-title a, .site-description { color: #'.esc_attr( get_theme_mod( 'header_textcolor' ) ).'; }'."\n";
}
wp_add_inline_style( 'magazinertwo-style', $styles );
wp_add_inline_style( 'featureon-style', $styles );
}
}
}
add_action( 'wp_enqueue_scripts', 'magazinertwo_dynamic_css' );
add_action( 'wp_enqueue_scripts', 'featureon_dynamic_css' );

View file

@ -1,5 +1,5 @@
<?php
function magazinertwo_get_meta_box( $meta_boxes ) {
function featureon_get_meta_box( $meta_boxes ) {
/* do not show */
$prefix = '_';
@ -18,7 +18,7 @@ function magazinertwo_get_meta_box( $meta_boxes ) {
/* ------------------------------------ */
$meta_boxes[] = array(
'id' => 'page-options',
'title' => esc_html__( 'Page Options', 'magazinertwo' ),
'title' => esc_html__( 'Page Options', 'featureon' ),
'post_types' => array( 'page' ),
'context' => 'advanced',
'priority' => 'high',
@ -26,22 +26,22 @@ function magazinertwo_get_meta_box( $meta_boxes ) {
'fields' => array(
array(
'id' => $prefix . 'sidebar_primary',
'name' => esc_html__( 'Primary Sidebar', 'magazinertwo' ),
'name' => esc_html__( 'Primary Sidebar', 'featureon' ),
'type' => 'select',
'placeholder' => esc_html__( 'Select a sidebar', 'magazinertwo' ),
'placeholder' => esc_html__( 'Select a sidebar', 'featureon' ),
'options' => $sidebars_choices,
),
array(
'id' => $prefix . 'sidebar_secondary',
'name' => esc_html__( 'Secondary Sidebar', 'magazinertwo' ),
'name' => esc_html__( 'Secondary Sidebar', 'featureon' ),
'type' => 'select',
'placeholder' => esc_html__( 'Select a sidebar', 'magazinertwo' ),
'placeholder' => esc_html__( 'Select a sidebar', 'featureon' ),
'options' => $sidebars_choices,
),
array(
'id' => $prefix . 'layout',
'type' => 'image_select',
'name' => esc_html__( 'Layout', 'magazinertwo' ),
'name' => esc_html__( 'Layout', 'featureon' ),
'std' => 'inherit',
'force_delete' => false,
'max_file_uploads' => '4',
@ -62,7 +62,7 @@ function magazinertwo_get_meta_box( $meta_boxes ) {
/* ------------------------------------ */
$meta_boxes[] = array(
'id' => 'post-options',
'title' => esc_html__( 'Post Options', 'magazinertwo' ),
'title' => esc_html__( 'Post Options', 'featureon' ),
'post_types' => array( 'post' ),
'context' => 'advanced',
'priority' => 'high',
@ -70,22 +70,22 @@ function magazinertwo_get_meta_box( $meta_boxes ) {
'fields' => array(
array(
'id' => $prefix . 'sidebar_primary',
'name' => esc_html__( 'Primary Sidebar', 'magazinertwo' ),
'name' => esc_html__( 'Primary Sidebar', 'featureon' ),
'type' => 'select',
'placeholder' => esc_html__( 'Select a sidebar', 'magazinertwo' ),
'placeholder' => esc_html__( 'Select a sidebar', 'featureon' ),
'options' => $sidebars_choices,
),
array(
'id' => $prefix . 'sidebar_secondary',
'name' => esc_html__( 'Secondary Sidebar', 'magazinertwo' ),
'name' => esc_html__( 'Secondary Sidebar', 'featureon' ),
'type' => 'select',
'placeholder' => esc_html__( 'Select a sidebar', 'magazinertwo' ),
'placeholder' => esc_html__( 'Select a sidebar', 'featureon' ),
'options' => $sidebars_choices,
),
array(
'id' => $prefix . 'layout',
'type' => 'image_select',
'name' => esc_html__( 'Layout', 'magazinertwo' ),
'name' => esc_html__( 'Layout', 'featureon' ),
'std' => 'inherit',
'force_delete' => false,
'max_file_uploads' => '4',
@ -105,4 +105,4 @@ function magazinertwo_get_meta_box( $meta_boxes ) {
return $meta_boxes;
}
add_filter( 'rwmb_meta_boxes', 'magazinertwo_get_meta_box' );
add_filter( 'rwmb_meta_boxes', 'featureon_get_meta_box' );

File diff suppressed because it is too large Load diff