PluginProbe
Search & Replace Everything by WPCode – Find and Replace Media, Text, Links, and More / 1.0.8
Search & Replace Everything by WPCode – Find and Replace Media, Text, Links, and More v1.0.8
trunk 1.0.0 1.0.1 1.0.10 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9
search-replace-wpcode / includes / admin / admin-scripts.php

admin-scripts.php in Search & Replace Everything by WPCode – Find and Replace Media, Text, Links, and More 1.0.8, at includes/admin/admin-scripts.php

89 lines 4.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Load scripts for the admin area.
4 *
5 * @package WPCode
6 */
7
8 if ( ! defined( 'ABSPATH' ) ) {
9 exit;
10 }
11
12 add_action( 'admin_enqueue_scripts', 'wsrw_admin_scripts' );
13
14 /**
15 * Load admin scripts here.
16 *
17 * @return void
18 */
19 function wsrw_admin_scripts() {
20
21 $current_screen = get_current_screen();
22
23 if ( ! isset( $current_screen->id ) || false === strpos( $current_screen->id, 'wsrw-search-replace' ) ) {
24 return;
25 }
26
27 $admin_asset_file = WSRW_PLUGIN_PATH . 'build/admin.asset.php';
28
29 if ( ! file_exists( $admin_asset_file ) ) {
30 return;
31 }
32
33 $asset = require $admin_asset_file;
34
35 wp_enqueue_style( 'wsrw-admin-css', WSRW_PLUGIN_URL . 'build/admin.css', null, $asset['version'] );
36
37 wp_enqueue_script( 'wsrw-admin-js', WSRW_PLUGIN_URL . 'build/admin.js', $asset['dependencies'], $asset['version'], true );
38
39 wp_localize_script(
40 'wsrw-admin-js',
41 'wsrwjs',
42 apply_filters(
43 'wsrw_admin_js_data',
44 array(
45 'nonce' => wp_create_nonce( 'wsrw_admin' ),
46 'yes' => esc_html__( 'Yes', 'search-replace-wpcode' ),
47 'no' => esc_html__( 'No', 'search-replace-wpcode' ),
48 'ok' => esc_html__( 'OK', 'search-replace-wpcode' ),
49 'close' => esc_html__( 'Close', 'search-replace-wpcode' ),
50 'error_title' => esc_html__( 'Error', 'search-replace-wpcode' ),
51 'unsupported_file_title' => esc_html__( 'Unsupported File Type', 'search-replace-wpcode' ),
52 'unsupported_file_description' => esc_html__( 'The replacement file you selected does not appear to be supported by WordPress. This may lead to unexpected issues. Please choose a different file.', 'search-replace-wpcode' ),
53 'please_wait' => esc_html__( 'Please Wait', 'search-replace-wpcode' ),
54 'upgrade_to_pro' => esc_html__( 'Upgrade to Pro', 'search-replace-wpcode' ),
55 'check_row_title' => esc_html__( 'Replacing individual items is a Pro feature', 'search-replace-wpcode' ),
56 'check_row_content' => esc_html__( 'Upgrade to Search & Replace Everything Pro today and choose exactly which rows you want to replace from the results without having to do complex queries.', 'search-replace-wpcode' ),
57 'check_row_url' => esc_url( wsrw_utm_url( 'https://wpcode.com/srlite/', 'search-preview', 'check-row' ) ),
58 'row_info_title' => esc_html__( 'Full Row Info is a Pro Feature', 'search-replace-wpcode' ),
59 'row_info_content' => esc_html__( 'Upgrade to Search & Replace Everything Pro today and view the full row information and easily trace back results to the original content without having to leave the admin.', 'search-replace-wpcode' ),
60 'row_info_url' => esc_url( wsrw_utm_url( 'https://wpcode.com/srlite/', 'search-preview', 'row-info' ) ),
61 'upgrade_bonus' => wpautop(
62 wp_kses(
63 __( '<strong>Bonus:</strong> Search & Replace Everything Lite users get <span>$30 off</span> regular price, automatically applied at checkout.', 'search-replace-wpcode' ),
64 array(
65 'strong' => array(),
66 'span' => array(),
67 )
68 )
69 ),
70 'lock_icon' => wsrw_get_icon( 'lock', '22', '28', '0 0 22 28' ),
71 'pro_feature_title' => esc_html__( 'Replace File Extension is a Premium Feature', 'search-replace-wpcode' ),
72 'keep_extension_message' => esc_html__( 'Upgrade to PRO today and enable easily updating your images with different extensions (for example: .jpg to .webp) across your database. Save time and space without having to duplicate uploads.', 'search-replace-wpcode' ),
73 'upgrade_url' => esc_url( wsrw_utm_url( 'https://wpcode.com/srlite/', 'replace-extension', 'upgrade' ) ),
74 'discount_note' => wpautop(
75 wp_kses(
76 __( 'Search & Replace Everything Lite users get <span>$30 off</span> regular price, automatically applied at checkout.', 'search-replace-wpcode' ),
77 array(
78 'span' => array(),
79 )
80 )
81 ),
82 'purchased' => esc_html__( 'Already purchased? Click here to install Search & Replace Everything Pro', 'search-replace-wpcode' ),
83 'upgrade_link' => esc_url( admin_url( 'admin.php?page=wsrw-search-replace-settings' ) ),
84 'image_replace_error' => esc_html__( 'Images cannot be replaced with non-image files. Please select an image file.', 'search-replace-wpcode' ),
85 )
86 )
87 );
88 }
89