", get_submit_button( __( 'Add the words from the list', 'permalink-manager' ), 'button-small button-primary', 'load_stop_words_button', false ) );
$buttons .= "
';
$sidebar .= wpautop( __( 'If enabled, all selected "stop words" will be automatically removed from default URIs.', 'permalink-manager' ) );
$sidebar .= wpautop( __( 'Each of the words can be removed and any new words can be added to the list. You can also use a predefined list (available in 21 languages).', 'permalink-manager' ) );
return Permalink_Manager_UI_Elements::get_the_form( $fields, '', array( 'text' => __( 'Save', 'permalink-manager' ), 'class' => 'primary margin-top' ), $sidebar, array( 'action' => 'permalink-manager', 'name' => 'save_stop_words' ), true );
}
/**
* Saves the user-defined stop words list
*/
public function save_stop_words() {
if ( isset( $_POST['stop-words'] ) && wp_verify_nonce( $_POST['save_stop_words'], 'permalink-manager' ) ) {
Permalink_Manager_Actions::save_settings( 'stop-words', $_POST['stop-words'] );
}
}
/**
* Display "Import" subsection (Custom Permalinks)
*
* @return string
*/
public function import_output() {
// Count custom permalinks URIs
$count_custom_permalinks = count( Permalink_Manager_Third_Parties::custom_permalinks_uris() );
$fields = apply_filters( 'permalink_manager_tools_fields', array(
'disable_custom_permalinks' => array(
'label' => __( 'Custom Permalinks', 'permalink-manager' ),
'checkbox_label' => __( 'Deactivate after import', 'permalink-manager' ),
'type' => 'single_checkbox',
'container' => 'row',
'description' => __( 'If selected, "Custom Permalinks" plugin will be deactivated after its custom URIs are imported.', 'permalink-manager' ),
'input_class' => ''
)
), 'custom_permalinks_import' );
$sidebar = '
' . __( 'Instructions', 'permalink-manager' ) . '
';
$sidebar .= wpautop( __( 'Please note that "Custom Permalinks" (if activated) may break the behavior of this plugin.', 'permalink-manager' ) );
$sidebar .= wpautop( __( 'Therefore, it is recommended to disable "Custom Permalink" and import old permalinks before using Permalink Manager Pro.', 'permalink-manager' ) );
// Show some additional info data
if ( $count_custom_permalinks > 0 ) {
$button = array(
/* translators: %s: Custom permalinks to import (count) */
'text' => sprintf( __( 'Import %d URIs', 'permalink-manager' ), $count_custom_permalinks ),
'class' => 'primary margin-top'
);
} else {
$button = array(
'text' => __( 'No custom URIs to import', 'permalink-manager' ),
'class' => 'secondary margin-top',
'attributes' => array( 'disabled' => 'disabled' )
);
}
return Permalink_Manager_UI_Elements::get_the_form( $fields, 'columns-3', $button, $sidebar, array( 'action' => 'permalink-manager', 'name' => 'import' ), true );
}
/**
* Add "Support" section
*
* @return string
*/
public function support_output() {
$output = sprintf( "
%s
", __( "Technical support", "permalink-manager" ) );
/* translators: %s: Support section heading */
$output .= wpautop( sprintf( __( 'To find the answers on frequently asked questions and information about how to deal with the most common issues please go to the Knowledge Base using this link.', 'permalink-manager' ), 'https://permalinkmanager.pro/docs/' ) );
$output .= wpautop( __( 'If you still did not find the answer to your question, please send us your question or a detailed description of your problem/issue to support@permalinkmanager.pro.', 'permalink-manager' ) );
$output .= wpautop( __( 'To reduce the response time, please attach your license key and if possible also: URL address of your website and screenshots explaining the issue.', 'permalink-manager' ) );
/* translators: %s: Support section heading */
$output .= sprintf( "
%s
", __( "Suggestions/feedback", "permalink-manager" ) );
$output .= wpautop( __( 'If you would like to suggest a new functionality or leave us feedback, we are open to all new ideas and would be grateful for all your comments!', 'permalink-manager' ) );
$output .= wpautop( __( ' Please send your remarks to contact@permalinkmanager.pro.', 'permalink-manager' ) );
return $output;
}
/**
* Return the HTML output of "Custom Redirects" panel in URI Editor
*
* @return string
*/
public static function display_redirect_form( $element_id ) {
global $permalink_manager_redirects, $permalink_manager_options, $permalink_manager_external_redirects;
// Do not trigger if "Extra redirects" option is turned off
if ( empty( $permalink_manager_options['general']['redirect'] ) || empty( $permalink_manager_options['general']['extra_redirects'] ) ) {
return __( 'Turn on "Extra redirects (aliases)" in Permalink Manager settings to enable this feature.', 'permalink-manager' );
}
// 1. Extra redirects
$html = "
";
$html .= sprintf( "", __( "Extra redirects (aliases)", "permalink-manager" ), Permalink_Manager_UI_Elements::help_tooltip( __( "All URIs specified below will redirect the visitors to the custom URI defined above in \"Current URI\" field.", "permalink-manager" ) ) );
$html .= "