Edit File by line
/home/zeestwma/ajeebong.../wp-conte.../plugins/code-sni.../php/views
File: manage.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* HTML for the Manage Snippets page.
[2] Fix | Delete
*
[3] Fix | Delete
* @package Code_Snippets
[4] Fix | Delete
* @subpackage Views
[5] Fix | Delete
*/
[6] Fix | Delete
[7] Fix | Delete
namespace Code_Snippets;
[8] Fix | Delete
[9] Fix | Delete
use function Code_Snippets\Settings\get_setting;
[10] Fix | Delete
[11] Fix | Delete
/**
[12] Fix | Delete
* Loaded from the manage menu class.
[13] Fix | Delete
*
[14] Fix | Delete
* @var Manage_Menu $this
[15] Fix | Delete
*/
[16] Fix | Delete
[17] Fix | Delete
if ( ! defined( 'ABSPATH' ) ) {
[18] Fix | Delete
return;
[19] Fix | Delete
}
[20] Fix | Delete
[21] Fix | Delete
$types = array_merge( [ 'all' => __( 'All Snippets', 'code-snippets' ) ], Plugin::get_types() );
[22] Fix | Delete
$current_type = $this->get_current_type();
[23] Fix | Delete
[24] Fix | Delete
if ( false !== strpos( code_snippets()->version, 'beta' ) ) {
[25] Fix | Delete
echo '<div class="notice beta-test-notice"><p id="beta-testing">';
[26] Fix | Delete
echo wp_kses(
[27] Fix | Delete
__( 'Thank you for testing this <span class="highlight-yellow">beta version of Code Snippets</span>. We would love to hear your thoughts.', 'code-snippets' ),
[28] Fix | Delete
[ 'span' => [ 'class' => [ 'highlight-yellow' ] ] ]
[29] Fix | Delete
);
[30] Fix | Delete
[31] Fix | Delete
printf(
[32] Fix | Delete
' <a href="%s" class="button button-secondary" target="_blank">%s</a>',
[33] Fix | Delete
esc_url( __( 'https://codesnippets.pro/beta-testing/feedback/', 'code-snippets' ) ),
[34] Fix | Delete
esc_html__( 'Share feedback', 'code-snippets' )
[35] Fix | Delete
);
[36] Fix | Delete
echo '</p></div>';
[37] Fix | Delete
}
[38] Fix | Delete
[39] Fix | Delete
?>
[40] Fix | Delete
[41] Fix | Delete
<div class="wrap">
[42] Fix | Delete
<h1>
[43] Fix | Delete
<?php
[44] Fix | Delete
esc_html_e( 'Snippets', 'code-snippets' );
[45] Fix | Delete
[46] Fix | Delete
$this->render_page_title_actions( code_snippets()->is_compact_menu() ? [ 'add', 'import', 'settings' ] : [ 'add', 'import' ] );
[47] Fix | Delete
[48] Fix | Delete
$this->list_table->search_notice();
[49] Fix | Delete
?>
[50] Fix | Delete
</h1>
[51] Fix | Delete
[52] Fix | Delete
<?php $this->print_messages(); ?>
[53] Fix | Delete
[54] Fix | Delete
<h2 class="nav-tab-wrapper" id="snippet-type-tabs">
[55] Fix | Delete
<?php
[56] Fix | Delete
[57] Fix | Delete
Admin::render_snippet_type_tabs( $types, $current_type );
[58] Fix | Delete
[59] Fix | Delete
if ( ! get_setting( 'general', 'hide_upgrade_menu' ) ) { ?>
[60] Fix | Delete
<a class="button button-large nav-tab-button nav-tab-inactive"
[61] Fix | Delete
href="https://codesnippets.pro/pricing/" target="_blank"
[62] Fix | Delete
aria-label="<?php esc_attr_e( 'Find more about Pro (opens in external tab)', 'code-snippets' ); ?>">
[63] Fix | Delete
<?php echo wp_kses( __( 'Upgrade to <span class="badge pro-badge small-badge">Pro</span>', 'code-snippets' ), [ 'span' => [ 'class' => true ] ] ); ?>
[64] Fix | Delete
<span class="dashicons dashicons-external"></span>
[65] Fix | Delete
</a>
[66] Fix | Delete
<?php } ?>
[67] Fix | Delete
</h2>
[68] Fix | Delete
[69] Fix | Delete
<?php
[70] Fix | Delete
[71] Fix | Delete
$type_info = [
[72] Fix | Delete
'php' => [
[73] Fix | Delete
__( 'Function snippets are run on your site as if there were in a plugin or theme functions.php file.', 'code-snippets' ),
[74] Fix | Delete
__( 'Learn more about function snippets &rarr;', 'code-snippets' ),
[75] Fix | Delete
'https://codesnippets.pro/learn-php/',
[76] Fix | Delete
],
[77] Fix | Delete
'html' => [
[78] Fix | Delete
__( 'Content snippets are bits of reusable PHP and HTML content that can be inserted into posts and pages.', 'code-snippets' ),
[79] Fix | Delete
__( 'Learn more about content snippets &rarr;', 'code-snippets' ),
[80] Fix | Delete
'https://codesnippets.pro/learn-html/',
[81] Fix | Delete
],
[82] Fix | Delete
'css' => [
[83] Fix | Delete
__( 'Style snippets are written in CSS and loaded in the admin area or on the site front-end, just like the theme style.css.', 'code-snippets' ),
[84] Fix | Delete
__( 'Learn more about style snippets &rarr;', 'code-snippets' ),
[85] Fix | Delete
'https://codesnippets.pro/learn-css/',
[86] Fix | Delete
],
[87] Fix | Delete
'js' => [
[88] Fix | Delete
__( 'Script snippets are loaded on the site front-end in a JavaScript file, either in the head or body sections.', 'code-snippets' ),
[89] Fix | Delete
__( 'Learn more about javascript snippets &rarr;', 'code-snippets' ),
[90] Fix | Delete
'https://codesnippets.pro/learn-js/',
[91] Fix | Delete
],
[92] Fix | Delete
'cloud' => [
[93] Fix | Delete
__( 'See all your public and private snippets that are stored in your Code Snippet Cloud codevault.', 'code-snippets' ),
[94] Fix | Delete
__( 'Learn more about Code Snippets Cloud &rarr;', 'code-snippets' ),
[95] Fix | Delete
'https://codesnippets.cloud/getstarted/',
[96] Fix | Delete
],
[97] Fix | Delete
];
[98] Fix | Delete
[99] Fix | Delete
[100] Fix | Delete
if ( isset( $type_info[ $current_type ] ) ) {
[101] Fix | Delete
$info = $type_info[ $current_type ];
[102] Fix | Delete
[103] Fix | Delete
printf(
[104] Fix | Delete
'<p class="snippet-type-description">%s <a href="%s" target="_blank">%s</a></p>',
[105] Fix | Delete
esc_html( $info[0] ),
[106] Fix | Delete
esc_url( $info[2] ),
[107] Fix | Delete
esc_html( $info[1] )
[108] Fix | Delete
);
[109] Fix | Delete
}
[110] Fix | Delete
[111] Fix | Delete
do_action( 'code_snippets/admin/manage/before_list_table' );
[112] Fix | Delete
$this->list_table->views();
[113] Fix | Delete
[114] Fix | Delete
switch ( $current_type ) {
[115] Fix | Delete
case 'cloud_search':
[116] Fix | Delete
include_once 'partials/cloud-search.php';
[117] Fix | Delete
break;
[118] Fix | Delete
[119] Fix | Delete
default:
[120] Fix | Delete
include_once 'partials/list-table.php';
[121] Fix | Delete
break;
[122] Fix | Delete
}
[123] Fix | Delete
[124] Fix | Delete
do_action( 'code_snippets/admin/manage', $current_type );
[125] Fix | Delete
[126] Fix | Delete
?>
[127] Fix | Delete
</div>
[128] Fix | Delete
[129] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function