Plugin Directory

Changeset 3425395


Ignore:
Timestamp:
12/22/2025 01:20:54 PM (3 months ago)
Author:
wpazleen
Message:

1.2.0

Location:
post-export-import-with-media
Files:
39 added
9 edited

Legend:

Unmodified
Added
Removed
  • post-export-import-with-media/trunk/assets/css/admin.css

    r3418865 r3425395  
    379379.peiwm-step-number {
    380380    background: var(--primary-color);
    381     color: white;
     381    color: #a46565;
    382382    width: 2.5rem;
    383383    height: 2.5rem;
     
    480480.peiwm-log-entry.peiwm-log-info {
    481481    color: var(--primary-color);
     482}
     483
     484/* Settings Groups */
     485.peiwm-settings-groups {
     486    margin: 1.5rem 0;
     487    padding: 1.5rem;
     488    background: rgba(255, 255, 255, 0.7);
     489    border-radius: 12px;
     490    border: 1px solid rgba(0, 0, 0, 0.1);
     491}
     492
     493.peiwm-settings-groups h4 {
     494    margin: 0 0 1rem 0;
     495    color: var(--text-primary);
     496    font-size: 1.1rem;
     497    font-weight: 600;
     498}
     499
     500.peiwm-checkbox-grid {
     501    display: grid;
     502    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
     503    gap: 1rem;
     504}
     505
     506.peiwm-settings-preview {
     507    margin: 1.5rem 0;
     508    padding: 1.5rem;
     509    background: rgba(59, 130, 246, 0.1);
     510    border: 1px solid rgba(59, 130, 246, 0.2);
     511    border-radius: 12px;
     512}
     513
     514.peiwm-settings-preview h4 {
     515    margin: 0 0 1rem 0;
     516    color: var(--primary-color);
     517    font-size: 1.1rem;
     518    font-weight: 600;
    482519}
    483520
     
    12241261    }
    12251262}
     1263
     1264/* T
     1265hemes & Plugins Specific Styles */
     1266.peiwm-theme-options,
     1267.peiwm-plugin-options {
     1268    margin: 15px 0;
     1269}
     1270
     1271.peiwm-selection-grid {
     1272    margin: 15px 0;
     1273    max-height: 300px;
     1274    overflow-y: auto;
     1275    border: 1px solid #ddd;
     1276    border-radius: 4px;
     1277    padding: 10px;
     1278    background: #f9f9f9;
     1279}
     1280
     1281.peiwm-import-options {
     1282    margin: 15px 0;
     1283    padding: 15px;
     1284    background: #f0f8ff;
     1285    border: 1px solid #b3d9ff;
     1286    border-radius: 4px;
     1287}
     1288
     1289.peiwm-active-label {
     1290    color: #00a32a;
     1291    font-weight: 600;
     1292    font-size: 0.9em;
     1293}
     1294
     1295.peiwm-checkbox-grid {
     1296    display: grid;
     1297    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
     1298    gap: 10px;
     1299    max-height: 250px;
     1300    overflow-y: auto;
     1301}
     1302
     1303.peiwm-checkbox-label {
     1304    display: flex;
     1305    align-items: flex-start;
     1306    padding: 10px;
     1307    border: 1px solid #ddd;
     1308    border-radius: 4px;
     1309    background: #fff;
     1310    cursor: pointer;
     1311    transition: all 0.2s ease;
     1312}
     1313
     1314.peiwm-checkbox-label:hover {
     1315    border-color: #0073aa;
     1316    background: #f0f8ff;
     1317}
     1318
     1319.peiwm-checkbox-label input[type="checkbox"],
     1320.peiwm-checkbox-label input[type="radio"] {
     1321    margin: 0 10px 0 0;
     1322    flex-shrink: 0;
     1323}
     1324
     1325.peiwm-checkbox-text {
     1326    flex: 1;
     1327    line-height: 1.4;
     1328}
     1329
     1330.peiwm-checkbox-description {
     1331    display: block;
     1332    color: #666;
     1333    font-size: 0.9em;
     1334    margin-top: 4px;
     1335}
     1336
     1337/* Progress and Log Enhancements */
     1338.peiwm-log-entry.peiwm-log-success {
     1339    color: var(--success-color);
     1340}
     1341
     1342.peiwm-log-entry.peiwm-log-error {
     1343    color: var(--error-color);
     1344}
     1345
     1346.peiwm-log-entry.peiwm-log-warning {
     1347    color: #f59e0b;
     1348}
     1349
     1350.peiwm-log-entry.peiwm-log-info {
     1351    color: #0073aa;
     1352}
     1353
     1354/* Button Container Improvements */
     1355.button-container {
     1356    display: flex;
     1357    gap: 10px;
     1358    align-items: center;
     1359    flex-wrap: wrap;
     1360    margin: 15px 0;
     1361}
     1362
     1363.button-container .button {
     1364    margin: 0;
     1365}
     1366
     1367/* Section Spacing */
     1368.peiwm-section+.peiwm-section {
     1369    margin-top: 40px;
     1370    padding-top: 30px;
     1371    border-top: 2px solid #e1e1e1;
     1372}
     1373
     1374/* Export/Import Section Styling */
     1375.peiwm-export-section,
     1376.peiwm-import-section {
     1377    background: #fff;
     1378    border: 1px solid #e1e1e1;
     1379    border-radius: 6px;
     1380    padding: 20px;
     1381    margin: 20px 0;
     1382}
     1383
     1384.peiwm-export-section h3,
     1385.peiwm-import-section h3 {
     1386    margin-top: 0;
     1387    color: #23282d;
     1388    border-bottom: 1px solid #e1e1e1;
     1389    padding-bottom: 10px;
     1390}
     1391
     1392/* Responsive Design */
     1393@media (max-width: 768px) {
     1394    .peiwm-checkbox-grid {
     1395        grid-template-columns: 1fr;
     1396    }
     1397
     1398    .button-container {
     1399        flex-direction: column;
     1400        align-items: stretch;
     1401    }
     1402
     1403    .button-container .button {
     1404        width: 100%;
     1405        text-align: center;
     1406    }
     1407}
     1408
     1409/* Med
     1410ia Statistics Styles */
     1411.peiwm-stats-section {
     1412    background: #fff;
     1413    border: 1px solid #e1e1e1;
     1414    border-radius: 6px;
     1415    padding: 20px;
     1416    margin: 20px 0;
     1417}
     1418
     1419.peiwm-stats-section h3 {
     1420    margin-top: 0;
     1421    color: #23282d;
     1422    border-bottom: 1px solid #e1e1e1;
     1423    padding-bottom: 10px;
     1424}
     1425
     1426.peiwm-stats {
     1427    min-height: 100px;
     1428}
     1429
     1430.peiwm-stats-loader {
     1431    display: flex;
     1432    flex-direction: column;
     1433    align-items: center;
     1434    justify-content: center;
     1435    padding: 40px 20px;
     1436    text-align: center;
     1437}
     1438
     1439.peiwm-stats-loader-spinner {
     1440    width: 32px;
     1441    height: 32px;
     1442    border: 3px solid #f3f3f3;
     1443    border-top: 3px solid #0073aa;
     1444    border-radius: 50%;
     1445    animation: spin 1s linear infinite;
     1446    margin-bottom: 15px;
     1447}
     1448
     1449@keyframes spin {
     1450    0% {
     1451        transform: rotate(0deg);
     1452    }
     1453
     1454    100% {
     1455        transform: rotate(360deg);
     1456    }
     1457}
     1458
     1459.peiwm-stats-loader-text {
     1460    font-size: 16px;
     1461    font-weight: 600;
     1462    color: #23282d;
     1463    margin-bottom: 5px;
     1464}
     1465
     1466.peiwm-stats-loader-subtext {
     1467    font-size: 14px;
     1468    color: #666;
     1469}
     1470
     1471.peiwm-stats-grid {
     1472    display: grid;
     1473    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
     1474    gap: 20px;
     1475    margin-bottom: 30px;
     1476}
     1477
     1478.peiwm-stat-item {
     1479    background: #f8f9fa;
     1480    border: 1px solid #e9ecef;
     1481    border-radius: 8px;
     1482    padding: 20px;
     1483    text-align: center;
     1484    transition: all 0.2s ease;
     1485}
     1486
     1487.peiwm-stat-item:hover {
     1488    border-color: #0073aa;
     1489    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.1);
     1490}
     1491
     1492.peiwm-stat-number {
     1493    font-size: 28px;
     1494    font-weight: 700;
     1495    color: #0073aa;
     1496    margin-bottom: 8px;
     1497    line-height: 1;
     1498}
     1499
     1500.peiwm-stat-label {
     1501    font-size: 14px;
     1502    font-weight: 600;
     1503    color: #23282d;
     1504    text-transform: uppercase;
     1505    letter-spacing: 0.5px;
     1506    margin-bottom: 4px;
     1507}
     1508
     1509.peiwm-stat-detail {
     1510    font-size: 12px;
     1511    color: #666;
     1512    word-break: break-all;
     1513}
     1514
     1515.peiwm-file-types {
     1516    background: #f8f9fa;
     1517    border-radius: 8px;
     1518    padding: 20px;
     1519}
     1520
     1521.peiwm-file-types h4 {
     1522    margin: 0 0 15px 0;
     1523    color: #23282d;
     1524    font-size: 16px;
     1525}
     1526
     1527.peiwm-file-types-list {
     1528    display: grid;
     1529    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
     1530    gap: 10px;
     1531}
     1532
     1533.peiwm-file-type-item {
     1534    display: flex;
     1535    justify-content: space-between;
     1536    align-items: center;
     1537    background: #fff;
     1538    border: 1px solid #e9ecef;
     1539    border-radius: 4px;
     1540    padding: 8px 12px;
     1541    font-size: 13px;
     1542}
     1543
     1544.peiwm-file-type-name {
     1545    font-weight: 600;
     1546    color: #23282d;
     1547}
     1548
     1549.peiwm-file-type-count {
     1550    background: #0073aa;
     1551    color: #fff;
     1552    border-radius: 12px;
     1553    padding: 2px 8px;
     1554    font-size: 11px;
     1555    font-weight: 600;
     1556    min-width: 20px;
     1557    text-align: center;
     1558}
     1559
     1560.peiwm-stats-error {
     1561    background: #fff2cd;
     1562    border: 1px solid #f0ad4e;
     1563    border-radius: 4px;
     1564    padding: 15px;
     1565    color: #8a6d3b;
     1566    text-align: center;
     1567    font-weight: 600;
     1568}
     1569
     1570#peiwm-refresh-stats {
     1571    margin-top: 15px;
     1572}
     1573
     1574#peiwm-refresh-stats:disabled {
     1575    opacity: 0.6;
     1576    cursor: not-allowed;
     1577}
     1578
     1579/* Responsive Design for Stats */
     1580@media (max-width: 768px) {
     1581    .peiwm-stats-grid {
     1582        grid-template-columns: 1fr;
     1583    }
     1584
     1585    .peiwm-file-types-list {
     1586        grid-template-columns: 1fr;
     1587    }
     1588
     1589    .peiwm-stat-number {
     1590        font-size: 24px;
     1591    }
     1592}
     1593
     1594/* Settings Section Styles */
     1595.peiwm-settings-section {
     1596    background: #fff;
     1597    border: 1px solid #e1e1e1;
     1598    border-radius: 6px;
     1599    padding: 20px;
     1600    margin: 20px 0;
     1601}
     1602
     1603.peiwm-settings-section .form-table {
     1604    margin-top: 0;
     1605}
     1606
     1607.peiwm-settings-section .form-table th {
     1608    padding-left: 0;
     1609    font-weight: 600;
     1610}
     1611
     1612.peiwm-settings-section .form-table td {
     1613    padding-left: 0;
     1614}
     1615
     1616.peiwm-settings-section .description {
     1617    margin-top: 8px;
     1618    font-style: italic;
     1619    color: #666;
     1620}
     1621
     1622/* Admin Download Buttons Styles (for themes.php and plugins.php) */
     1623.peiwm-download-theme-btn {
     1624    background: #0073aa !important;
     1625    color: #fff !important;
     1626    border: none !important;
     1627    border-radius: 3px !important;
     1628    font-size: 11px !important;
     1629    padding: 4px 8px !important;
     1630    margin-left: 5px !important;
     1631    text-decoration: none !important;
     1632    display: inline-block !important;
     1633    transition: background-color 0.2s ease !important;
     1634}
     1635
     1636.peiwm-download-theme-btn:hover {
     1637    background: #005177 !important;
     1638    color: #fff !important;
     1639}
     1640
     1641.peiwm-download-theme-btn:disabled {
     1642    background: #ccc !important;
     1643    cursor: not-allowed !important;
     1644}
     1645
     1646.peiwm-download-plugin {
     1647    color: #666;
     1648}
     1649
     1650.peiwm-download-plugin-btn {
     1651    color: #0073aa;
     1652    text-decoration: none;
     1653    font-size: 13px;
     1654}
     1655
     1656.peiwm-download-plugin-btn:hover {
     1657    color: #005177;
     1658    text-decoration: underline;
     1659}
     1660
     1661/* Responsive adjustments */
     1662@media (max-width: 768px) {
     1663    .peiwm-download-theme-btn {
     1664        font-size: 10px !important;
     1665        padding: 3px 6px !important;
     1666    }
     1667}
     1668
     1669/*
     1670 Widgets & Menus Export Options */
     1671.peiwm-export-options {
     1672    display: flex;
     1673    gap: 10px;
     1674    flex-wrap: wrap;
     1675    margin: 15px 0;
     1676}
     1677
     1678.peiwm-export-options .button {
     1679    margin: 0;
     1680}
     1681
     1682/* Responsive adjustments for export options */
     1683@media (max-width: 768px) {
     1684    .peiwm-export-options {
     1685        flex-direction: column;
     1686    }
     1687
     1688    .peiwm-export-options .button {
     1689        width: 100%;
     1690        text-align: center;
     1691    }
     1692}
  • post-export-import-with-media/trunk/includes/class-admin-menu.php

    r3418865 r3425395  
    4242        add_action( 'admin_menu', array( $this, 'add_admin_menu' ) );
    4343        add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_scripts' ) );
     44        add_action( 'current_screen', array( $this, 'protect_plugin_pages' ) );
     45    }
     46
     47    /**
     48     * Protect our plugin pages from null post warnings
     49     */
     50    public function protect_plugin_pages() {
     51        $screen = get_current_screen();
     52       
     53        // Check if we're on one of our plugin pages
     54        if ( $screen && (
     55            strpos( $screen->id, 'peiwm' ) !== false ||
     56            strpos( $screen->id, 'export-import' ) !== false ||
     57            $screen->id === 'toplevel_page_peiwm-secure' ||
     58            strpos( $screen->id, 'peiwm-' ) !== false
     59        ) ) {
     60            // Add multiple protection layers for our pages
     61            add_action( 'admin_head', array( $this, 'ensure_valid_post_object' ), 1 );
     62            add_action( 'admin_footer', array( $this, 'ensure_valid_post_object' ), 1 );
     63            add_action( 'wp_ajax_peiwm_import_widgets_menus', array( $this, 'ensure_valid_post_object' ), 1 );
     64           
     65            // Monitor and fix global post throughout page lifecycle
     66            add_action( 'wp_loaded', array( $this, 'monitor_global_post' ), 999 );
     67        }
     68    }
     69
     70    /**
     71     * Ensure valid post object exists
     72     */
     73    public function ensure_valid_post_object() {
     74        global $post;
     75       
     76        if ( null === $post || ! is_object( $post ) ) {
     77            $post = new WP_Post( (object) array(
     78                'ID' => 0,
     79                'post_status' => 'publish',
     80                'post_type' => 'post',
     81                'post_title' => '',
     82                'post_content' => '',
     83                'post_excerpt' => '',
     84                'post_author' => get_current_user_id(),
     85                'post_date' => current_time( 'mysql' ),
     86                'post_modified' => current_time( 'mysql' ),
     87                'post_name' => '',
     88                'post_parent' => 0,
     89                'menu_order' => 0,
     90                'comment_status' => 'closed',
     91                'ping_status' => 'closed',
     92                'comment_count' => 0,
     93                'post_date_gmt' => current_time( 'mysql', 1 ),
     94                'post_modified_gmt' => current_time( 'mysql', 1 ),
     95                'post_content_filtered' => '',
     96                'post_password' => '',
     97                'to_ping' => '',
     98                'pinged' => '',
     99                'guid' => '',
     100                'post_mime_type' => '',
     101                'filter' => 'raw'
     102            ) );
     103        }
     104    }
     105
     106    /**
     107     * Monitor and maintain global post state
     108     */
     109    public function monitor_global_post() {
     110        // Set up a periodic check to ensure post object remains valid
     111        add_action( 'wp_footer', array( $this, 'ensure_valid_post_object' ), 999 );
     112        add_action( 'admin_footer', array( $this, 'ensure_valid_post_object' ), 999 );
    44113    }
    45114
     
    58127        );
    59128
     129        // Add pages submenu
     130        add_submenu_page(
     131            'peiwm-secure',
     132            esc_html__( 'Pages Export/Import', 'post-export-import-with-media' ),
     133            esc_html__( 'Pages Export/Import', 'post-export-import-with-media' ),
     134            'manage_options',
     135            'peiwm-pages',
     136            array( $this, 'pages_page' )
     137        );
     138
     139        // Add settings submenu
     140        add_submenu_page(
     141            'peiwm-secure',
     142            esc_html__( 'WordPress Settings', 'post-export-import-with-media' ),
     143            esc_html__( 'WordPress Settings', 'post-export-import-with-media' ),
     144            'manage_options',
     145            'peiwm-settings',
     146            array( $this, 'settings_page' )
     147        );
     148
     149        // Add themes & plugins submenu
     150        add_submenu_page(
     151            'peiwm-secure',
     152            esc_html__( 'Themes & Plugins Backup', 'post-export-import-with-media' ),
     153            esc_html__( 'Themes & Plugins', 'post-export-import-with-media' ),
     154            'manage_options',
     155            'peiwm-themes-plugins',
     156            array( $this, 'themes_plugins_page' )
     157        );
     158
    60159        // Add recommendations submenu
    61160        add_submenu_page(
     
    75174     */
    76175    public function enqueue_admin_scripts( $hook ) {
    77         // Main plugin page
     176        // Main plugin page (Posts & Media)
    78177        if ( 'toplevel_page_peiwm-secure' === $hook ) {
    79178            wp_enqueue_script(
     
    108207        }
    109208
     209        // Pages page
     210        if ( 'export-import-posts_page_peiwm-pages' === $hook ) {
     211            wp_enqueue_script(
     212                'peiwm-pages-js',
     213                PEIWM_PLUGIN_URL . 'assets/js/pages.js',
     214                array( 'jquery' ),
     215                PEIWM_VERSION,
     216                true
     217            );
     218
     219            wp_enqueue_style(
     220                'peiwm-admin-css',
     221                PEIWM_PLUGIN_URL . 'assets/css/admin.css',
     222                array(),
     223                PEIWM_VERSION
     224            );
     225
     226            wp_localize_script( 'peiwm-pages-js', 'peiwm_ajax', array(
     227                'ajax_url' => admin_url( 'admin-ajax.php' ),
     228                'nonce'    => wp_create_nonce( 'peiwm_secure_nonce' ),
     229                'strings'  => array(
     230                    'select_file'     => esc_html__( 'Please select a file to import.', 'post-export-import-with-media' ),
     231                    'file_too_large'  => esc_html__( 'File is too large. Please select a file smaller than 500MB.', 'post-export-import-with-media' ),
     232                    'select_json'     => esc_html__( 'Please select a JSON file.', 'post-export-import-with-media' ),
     233                    'processing'      => esc_html__( 'Processing...', 'post-export-import-with-media' ),
     234                    'success'         => esc_html__( 'Success!', 'post-export-import-with-media' ),
     235                    'error'           => esc_html__( 'Error:', 'post-export-import-with-media' ),
     236                    'complete'        => esc_html__( 'Complete!', 'post-export-import-with-media' ),
     237                    'confirm_delete'  => esc_html__( 'Are you sure you want to delete all items? This action cannot be undone.', 'post-export-import-with-media' ),
     238                ),
     239            ) );
     240        }
     241
     242        // Settings page
     243        if ( 'export-import-posts_page_peiwm-settings' === $hook ) {
     244            wp_enqueue_script(
     245                'peiwm-settings-js',
     246                PEIWM_PLUGIN_URL . 'assets/js/settings.js',
     247                array( 'jquery' ),
     248                PEIWM_VERSION,
     249                true
     250            );
     251
     252            wp_enqueue_style(
     253                'peiwm-admin-css',
     254                PEIWM_PLUGIN_URL . 'assets/css/admin.css',
     255                array(),
     256                PEIWM_VERSION
     257            );
     258
     259            wp_localize_script( 'peiwm-settings-js', 'peiwm_ajax', array(
     260                'ajax_url' => admin_url( 'admin-ajax.php' ),
     261                'nonce'    => wp_create_nonce( 'peiwm_secure_nonce' ),
     262                'strings'  => array(
     263                    'select_file'     => esc_html__( 'Please select a file to import.', 'post-export-import-with-media' ),
     264                    'file_too_large'  => esc_html__( 'File is too large. Please select a file smaller than 500MB.', 'post-export-import-with-media' ),
     265                    'select_json'     => esc_html__( 'Please select a JSON file.', 'post-export-import-with-media' ),
     266                    'processing'      => esc_html__( 'Processing...', 'post-export-import-with-media' ),
     267                    'success'         => esc_html__( 'Success!', 'post-export-import-with-media' ),
     268                    'error'           => esc_html__( 'Error:', 'post-export-import-with-media' ),
     269                    'complete'        => esc_html__( 'Complete!', 'post-export-import-with-media' ),
     270                    'confirm_delete'  => esc_html__( 'Are you sure you want to delete all items? This action cannot be undone.', 'post-export-import-with-media' ),
     271                ),
     272            ) );
     273        }
     274
     275        // Themes & Plugins page
     276        if ( 'export-import-posts_page_peiwm-themes-plugins' === $hook ) {
     277            wp_enqueue_script(
     278                'peiwm-themes-plugins-js',
     279                PEIWM_PLUGIN_URL . 'assets/js/themes-plugins.js',
     280                array( 'jquery' ),
     281                PEIWM_VERSION,
     282                true
     283            );
     284
     285            wp_enqueue_style(
     286                'peiwm-admin-css',
     287                PEIWM_PLUGIN_URL . 'assets/css/admin.css',
     288                array(),
     289                PEIWM_VERSION
     290            );
     291
     292            wp_localize_script( 'peiwm-themes-plugins-js', 'peiwm_ajax', array(
     293                'ajax_url' => admin_url( 'admin-ajax.php' ),
     294                'nonce'    => wp_create_nonce( 'peiwm_secure_nonce' ),
     295                'strings'  => array(
     296                    'select_file'     => esc_html__( 'Please select a file to import.', 'post-export-import-with-media' ),
     297                    'file_too_large'  => esc_html__( 'File is too large. Please select a file smaller than 500MB.', 'post-export-import-with-media' ),
     298                    'select_zip'      => esc_html__( 'Please select a ZIP file.', 'post-export-import-with-media' ),
     299                    'processing'      => esc_html__( 'Processing...', 'post-export-import-with-media' ),
     300                    'success'         => esc_html__( 'Success!', 'post-export-import-with-media' ),
     301                    'error'           => esc_html__( 'Error:', 'post-export-import-with-media' ),
     302                    'complete'        => esc_html__( 'Complete!', 'post-export-import-with-media' ),
     303                    'confirm_delete'  => esc_html__( 'Are you sure you want to delete all items? This action cannot be undone.', 'post-export-import-with-media' ),
     304                ),
     305            ) );
     306        }
     307
    110308        // Recommendations page
    111309        if ( 'export-import-posts_page_peiwm-recommendations' === $hook ) {
     
    335533                            <li><?php echo esc_html__( '✓ Run the System Test first to ensure your server can handle large files', 'post-export-import-with-media' ); ?></li>
    336534                            <li><?php echo esc_html__( '✓ Existing images with the same filename will be reused automatically', 'post-export-import-with-media' ); ?></li>
     535                            <li><?php echo esc_html__( '✓ If you enable "Download missing images from original URLs" and ensure the source site is live, media will be fetched directly from the original URLs. This means you won’t need to import media files separately, though the process may take additional time to download and complete.', 'post-export-import-with-media' ); ?></li>
    337536                        </ul>
    338537                    </div>
    339538                </div>
     539            </div>
     540        </div>
     541       
     542        <?php $this->render_modal_templates(); ?>
     543        <?php
     544    }
     545
     546    /**
     547     * Render pages page
     548     */
     549    public function pages_page() {
     550        if ( ! current_user_can( 'manage_options' ) ) {
     551            wp_die( esc_html__( 'You do not have sufficient permissions to access this page.', 'post-export-import-with-media' ) );
     552        }
     553
     554        ?>
     555        <div class="wrap peiwm-admin">
     556            <h1><?php echo esc_html__( 'Pages Export/Import', 'post-export-import-with-media' ); ?></h1>
     557           
     558            <div class="peiwm-container">
     559                <!-- Pages Section -->
     560                <div class="peiwm-section">
     561                    <h2><?php echo esc_html__( 'Pages Export/Import', 'post-export-import-with-media' ); ?></h2>
     562                   
     563                    <div class="peiwm-export-section">
     564                        <h3><?php echo esc_html__( 'Export Pages', 'post-export-import-with-media' ); ?></h3>
     565                        <p><?php echo esc_html__( 'Export all pages with their metadata, featured images, and hierarchy.', 'post-export-import-with-media' ); ?></p>
     566                        <button type="button" id="peiwm-export-pages" class="button button-primary">
     567                            <?php echo esc_html__( 'Export Pages', 'post-export-import-with-media' ); ?>
     568                        </button>
     569                    </div>
     570                   
     571                    <div class="peiwm-import-section">
     572                        <h3><?php echo esc_html__( 'Import Pages', 'post-export-import-with-media' ); ?></h3>
     573                        <p><?php echo esc_html__( 'Import pages from a previously exported JSON file.', 'post-export-import-with-media' ); ?></p>
     574                        <div class="button-container">
     575                            <input type="file" id="peiwm-pages-file" accept=".json" style="display: none;">
     576                            <button type="button" id="peiwm-select-pages-file" class="button button-secondary">
     577                                <?php echo esc_html__( 'Select JSON File', 'post-export-import-with-media' ); ?>
     578                            </button>
     579                            <button type="button" id="peiwm-import-pages" class="button button-primary" style="display: none;">
     580                                <?php echo esc_html__( 'Start Import', 'post-export-import-with-media' ); ?>
     581                            </button>
     582                        </div>
     583                       
     584                        <div class="peiwm-import-options" style="margin-top: 1rem;">
     585                            <label class="peiwm-checkbox-label">
     586                                <input type="checkbox" id="peiwm-download-missing-page-images">
     587                                <span class="peiwm-checkbox-text">
     588                                    <?php echo esc_html__( 'Download missing images from original URLs', 'post-export-import-with-media' ); ?>
     589                                    <small class="peiwm-checkbox-description">
     590                                        <?php echo esc_html__( 'If images are not found in media library, try to download them from their original locations', 'post-export-import-with-media' ); ?>
     591                                    </small>
     592                                </span>
     593                            </label>
     594                        </div>
     595                       
     596                        <div id="peiwm-pages-progress" class="peiwm-progress" style="display: none;">
     597                            <h4><?php echo esc_html__( 'Import Progress', 'post-export-import-with-media' ); ?></h4>
     598                            <div class="peiwm-progress-bar">
     599                                <div class="peiwm-progress-fill"></div>
     600                            </div>
     601                            <p class="peiwm-progress-text"><?php echo esc_html__( 'Starting...', 'post-export-import-with-media' ); ?></p>
     602                            <div class="peiwm-log"></div>
     603                        </div>
     604                    </div>
     605                   
     606                    <div class="peiwm-delete-section">
     607                        <h3><?php echo esc_html__( 'Delete All Pages', 'post-export-import-with-media' ); ?></h3>
     608                        <p><?php echo esc_html__( 'Permanently delete all pages from your website. This action cannot be undone.', 'post-export-import-with-media' ); ?></p>
     609                        <button type="button" id="peiwm-delete-pages" class="button button-secondary peiwm-danger-button">
     610                            <?php echo esc_html__( 'Delete All Pages', 'post-export-import-with-media' ); ?>
     611                        </button>
     612                       
     613                        <div id="peiwm-delete-pages-progress" class="peiwm-progress" style="display: none;">
     614                            <h4><?php echo esc_html__( 'Deletion Progress', 'post-export-import-with-media' ); ?></h4>
     615                            <div class="peiwm-progress-bar">
     616                                <div class="peiwm-progress-fill"></div>
     617                            </div>
     618                            <p class="peiwm-progress-text"><?php echo esc_html__( 'Starting...', 'post-export-import-with-media' ); ?></p>
     619                            <div class="peiwm-log"></div>
     620                        </div>
     621                    </div>
     622                </div>
     623            </div>
     624        </div>
     625       
     626        <?php $this->render_modal_templates(); ?>
     627        <?php
     628    }
     629
     630    /**
     631     * Render settings page
     632     */
     633    public function settings_page() {
     634        if ( ! current_user_can( 'manage_options' ) ) {
     635            wp_die( esc_html__( 'You do not have sufficient permissions to access this page.', 'post-export-import-with-media' ) );
     636        }
     637
     638        ?>
     639        <div class="wrap peiwm-admin">
     640            <h1><?php echo esc_html__( 'WordPress Settings Export/Import', 'post-export-import-with-media' ); ?></h1>
     641           
     642            <div class="peiwm-container">
     643                <!-- Settings Section -->
     644                <div class="peiwm-section">
     645                    <h2><?php echo esc_html__( 'WordPress Settings Export/Import', 'post-export-import-with-media' ); ?></h2>
     646                   
     647                    <div class="peiwm-export-section">
     648                        <h3><?php echo esc_html__( 'Export Settings', 'post-export-import-with-media' ); ?></h3>
     649                        <p><?php echo esc_html__( 'Export WordPress configuration settings from General, Writing, Reading, Discussion, Media, Permalinks, and Privacy sections.', 'post-export-import-with-media' ); ?></p>
     650                       
     651                        <div class="peiwm-settings-groups">
     652                            <h4><?php echo esc_html__( 'Select Settings Groups to Export:', 'post-export-import-with-media' ); ?></h4>
     653                            <div class="peiwm-checkbox-grid">
     654                                <label class="peiwm-checkbox-label">
     655                                    <input type="checkbox" name="export_settings_groups[]" value="general" checked>
     656                                    <span class="peiwm-checkbox-text"><?php echo esc_html__( 'General Settings', 'post-export-import-with-media' ); ?></span>
     657                                </label>
     658                                <label class="peiwm-checkbox-label">
     659                                    <input type="checkbox" name="export_settings_groups[]" value="writing" checked>
     660                                    <span class="peiwm-checkbox-text"><?php echo esc_html__( 'Writing Settings', 'post-export-import-with-media' ); ?></span>
     661                                </label>
     662                                <label class="peiwm-checkbox-label">
     663                                    <input type="checkbox" name="export_settings_groups[]" value="reading" checked>
     664                                    <span class="peiwm-checkbox-text"><?php echo esc_html__( 'Reading Settings', 'post-export-import-with-media' ); ?></span>
     665                                </label>
     666                                <label class="peiwm-checkbox-label">
     667                                    <input type="checkbox" name="export_settings_groups[]" value="discussion" checked>
     668                                    <span class="peiwm-checkbox-text"><?php echo esc_html__( 'Discussion Settings', 'post-export-import-with-media' ); ?></span>
     669                                </label>
     670                                <label class="peiwm-checkbox-label">
     671                                    <input type="checkbox" name="export_settings_groups[]" value="media" checked>
     672                                    <span class="peiwm-checkbox-text"><?php echo esc_html__( 'Media Settings', 'post-export-import-with-media' ); ?></span>
     673                                </label>
     674                                <label class="peiwm-checkbox-label">
     675                                    <input type="checkbox" name="export_settings_groups[]" value="permalinks" checked>
     676                                    <span class="peiwm-checkbox-text"><?php echo esc_html__( 'Permalink Settings', 'post-export-import-with-media' ); ?></span>
     677                                </label>
     678                                <label class="peiwm-checkbox-label">
     679                                    <input type="checkbox" name="export_settings_groups[]" value="privacy" checked>
     680                                    <span class="peiwm-checkbox-text"><?php echo esc_html__( 'Privacy Settings', 'post-export-import-with-media' ); ?></span>
     681                                </label>
     682                            </div>
     683                        </div>
     684                       
     685                        <button type="button" id="peiwm-export-settings" class="button button-primary">
     686                            <?php echo esc_html__( 'Export Settings', 'post-export-import-with-media' ); ?>
     687                        </button>
     688                    </div>
     689                   
     690                    <div class="peiwm-import-section">
     691                        <h3><?php echo esc_html__( 'Import Settings', 'post-export-import-with-media' ); ?></h3>
     692                        <p><?php echo esc_html__( 'Import WordPress settings from a previously exported JSON file.', 'post-export-import-with-media' ); ?></p>
     693                        <div class="button-container">
     694                            <input type="file" id="peiwm-settings-file" accept=".json" style="display: none;">
     695                            <button type="button" id="peiwm-select-settings-file" class="button button-secondary">
     696                                <?php echo esc_html__( 'Select JSON File', 'post-export-import-with-media' ); ?>
     697                            </button>
     698                            <button type="button" id="peiwm-import-settings" class="button button-primary" style="display: none;">
     699                                <?php echo esc_html__( 'Start Import', 'post-export-import-with-media' ); ?>
     700                            </button>
     701                        </div>
     702                       
     703                        <div id="peiwm-settings-preview" class="peiwm-settings-preview" style="display: none;">
     704                            <h4><?php echo esc_html__( 'Settings Preview & Selection:', 'post-export-import-with-media' ); ?></h4>
     705                            <div id="peiwm-settings-groups-selection"></div>
     706                        </div>
     707                       
     708                        <div id="peiwm-settings-progress" class="peiwm-progress" style="display: none;">
     709                            <h4><?php echo esc_html__( 'Import Progress', 'post-export-import-with-media' ); ?></h4>
     710                            <div class="peiwm-progress-bar">
     711                                <div class="peiwm-progress-fill"></div>
     712                            </div>
     713                            <p class="peiwm-progress-text"><?php echo esc_html__( 'Starting...', 'post-export-import-with-media' ); ?></p>
     714                            <div class="peiwm-log"></div>
     715                        </div>
     716                    </div>
     717                </div>
     718
     719                <!-- Widgets & Menus Section -->
     720                <div class="peiwm-section">
     721                    <h2><?php echo esc_html__( 'Widgets & Navigation Menus', 'post-export-import-with-media' ); ?></h2>
     722                   
     723                    <div class="peiwm-export-section">
     724                        <h3><?php echo esc_html__( 'Export Widgets & Menus', 'post-export-import-with-media' ); ?></h3>
     725                        <p><?php echo esc_html__( 'Export your widgets and navigation menus configuration.', 'post-export-import-with-media' ); ?></p>
     726                       
     727                        <div class="peiwm-export-options">
     728                            <button type="button" id="peiwm-export-widgets" class="button button-primary">
     729                                <?php echo esc_html__( 'Export Widgets Only', 'post-export-import-with-media' ); ?>
     730                            </button>
     731                            <button type="button" id="peiwm-export-nav-menus" class="button button-primary">
     732                                <?php echo esc_html__( 'Export Menus Only', 'post-export-import-with-media' ); ?>
     733                            </button>
     734                            <button type="button" id="peiwm-export-widgets-menus" class="button button-primary">
     735                                <?php echo esc_html__( 'Export Both', 'post-export-import-with-media' ); ?>
     736                            </button>
     737                        </div>
     738                    </div>
     739                   
     740                    <div class="peiwm-import-section">
     741                        <h3><?php echo esc_html__( 'Import Widgets & Menus', 'post-export-import-with-media' ); ?></h3>
     742                        <p><?php echo esc_html__( 'Import widgets and navigation menus from a previously exported JSON file.', 'post-export-import-with-media' ); ?></p>
     743                       
     744                        <div class="button-container">
     745                            <input type="file" id="peiwm-widgets-menus-file" accept=".json" style="display: none;">
     746                            <button type="button" id="peiwm-select-widgets-menus-file" class="button button-secondary">
     747                                <?php echo esc_html__( 'Select JSON File', 'post-export-import-with-media' ); ?>
     748                            </button>
     749                            <button type="button" id="peiwm-import-widgets-menus" class="button button-primary" style="display: none;">
     750                                <?php echo esc_html__( 'Start Import', 'post-export-import-with-media' ); ?>
     751                            </button>
     752                        </div>
     753                       
     754                        <div class="peiwm-import-options" id="peiwm-widgets-menus-import-options" style="display: none;">
     755                            <label class="peiwm-checkbox-label">
     756                                <input type="checkbox" id="peiwm-replace-existing-widgets-menus" checked>
     757                                <span class="peiwm-checkbox-text">
     758                                    <?php echo esc_html__( 'Replace existing widgets and menus', 'post-export-import-with-media' ); ?>
     759                                    <small class="peiwm-checkbox-description"><?php echo esc_html__( 'Clear existing widgets and menus before importing', 'post-export-import-with-media' ); ?></small>
     760                                </span>
     761                            </label>
     762                        </div>
     763                       
     764                        <div id="peiwm-widgets-menus-progress" class="peiwm-progress" style="display: none;">
     765                            <h4><?php echo esc_html__( 'Import Progress', 'post-export-import-with-media' ); ?></h4>
     766                            <div class="peiwm-progress-bar">
     767                                <div class="peiwm-progress-fill"></div>
     768                            </div>
     769                            <p class="peiwm-progress-text"><?php echo esc_html__( 'Starting...', 'post-export-import-with-media' ); ?></p>
     770                            <div class="peiwm-log"></div>
     771                        </div>
     772                    </div>
     773                </div>
     774            </div>
     775        </div>
     776       
     777        <?php $this->render_modal_templates(); ?>
     778        <?php
     779    }
     780
     781    /**
     782     * Render themes & plugins page
     783     */
     784    public function themes_plugins_page() {
     785        if ( ! current_user_can( 'manage_options' ) ) {
     786            wp_die( esc_html__( 'You do not have sufficient permissions to access this page.', 'post-export-import-with-media' ) );
     787        }
     788        ?>
     789        <div class="wrap peiwm-admin">
     790            <h1><?php echo esc_html__( 'Themes & Plugins Backup', 'post-export-import-with-media' ); ?></h1>
     791           
     792            <div class="peiwm-container">
     793               
     794
     795                <!-- Themes Section -->
     796                <div class="peiwm-section">
     797                    <h2><?php echo esc_html__( 'Themes Backup', 'post-export-import-with-media' ); ?></h2>
     798                   
     799                    <div class="peiwm-export-section">
     800                        <h3><?php echo esc_html__( 'Export Themes', 'post-export-import-with-media' ); ?></h3>
     801                        <p><?php echo esc_html__( 'Create a backup of your themes as a ZIP file.', 'post-export-import-with-media' ); ?></p>
     802                       
     803                        <div class="peiwm-theme-options">
     804                            <label class="peiwm-checkbox-label">
     805                                <input type="radio" name="theme_export_type" value="active" checked>
     806                                <span class="peiwm-checkbox-text"><?php echo esc_html__( 'Active Theme Only', 'post-export-import-with-media' ); ?></span>
     807                            </label>
     808                            <label class="peiwm-checkbox-label">
     809                                <input type="radio" name="theme_export_type" value="all">
     810                                <span class="peiwm-checkbox-text"><?php echo esc_html__( 'All Installed Themes', 'post-export-import-with-media' ); ?></span>
     811                            </label>
     812                            <label class="peiwm-checkbox-label">
     813                                <input type="radio" name="theme_export_type" value="selected">
     814                                <span class="peiwm-checkbox-text"><?php echo esc_html__( 'Selected Themes', 'post-export-import-with-media' ); ?></span>
     815                            </label>
     816                        </div>
     817                       
     818                        <div id="peiwm-theme-selection" class="peiwm-selection-grid" style="display: none;">
     819                            <!-- Theme selection will be populated by JavaScript -->
     820                        </div>
     821                       
     822                        <button type="button" id="peiwm-export-themes" class="button button-primary">
     823                            <?php echo esc_html__( 'Export Themes', 'post-export-import-with-media' ); ?>
     824                        </button>
     825                       
     826                        <div id="peiwm-themes-export-progress" class="peiwm-progress" style="display: none;">
     827                            <h4><?php echo esc_html__( 'Export Progress', 'post-export-import-with-media' ); ?></h4>
     828                            <div class="peiwm-progress-bar">
     829                                <div class="peiwm-progress-fill"></div>
     830                            </div>
     831                            <p class="peiwm-progress-text"><?php echo esc_html__( 'Starting...', 'post-export-import-with-media' ); ?></p>
     832                            <div class="peiwm-log"></div>
     833                        </div>
     834                    </div>
     835                   
     836                    <div class="peiwm-import-section">
     837                        <h3><?php echo esc_html__( 'Import Themes', 'post-export-import-with-media' ); ?></h3>
     838                        <p><?php echo esc_html__( 'Import themes from a previously exported ZIP file.', 'post-export-import-with-media' ); ?></p>
     839                       
     840                        <div class="button-container">
     841                            <input type="file" id="peiwm-themes-file" accept=".zip" style="display: none;">
     842                            <button type="button" id="peiwm-select-themes-file" class="button button-secondary">
     843                                <?php echo esc_html__( 'Select ZIP File', 'post-export-import-with-media' ); ?>
     844                            </button>
     845                            <button type="button" id="peiwm-import-themes" class="button button-primary" style="display: none;">
     846                                <?php echo esc_html__( 'Start Import', 'post-export-import-with-media' ); ?>
     847                            </button>
     848                        </div>
     849                       
     850                        <div class="peiwm-import-options" id="peiwm-themes-import-options" style="display: none;">
     851                            <label class="peiwm-checkbox-label">
     852                                <input type="checkbox" id="peiwm-replace-existing-themes" checked>
     853                                <span class="peiwm-checkbox-text">
     854                                    <?php echo esc_html__( 'Replace existing themes', 'post-export-import-with-media' ); ?>
     855                                    <small class="peiwm-checkbox-description"><?php echo esc_html__( 'Overwrite themes that already exist', 'post-export-import-with-media' ); ?></small>
     856                                </span>
     857                            </label>
     858                            <label class="peiwm-checkbox-label">
     859                                <input type="checkbox" id="peiwm-activate-imported-theme">
     860                                <span class="peiwm-checkbox-text">
     861                                    <?php echo esc_html__( 'Activate imported theme', 'post-export-import-with-media' ); ?>
     862                                    <small class="peiwm-checkbox-description"><?php echo esc_html__( 'Switch to the first imported theme', 'post-export-import-with-media' ); ?></small>
     863                                </span>
     864                            </label>
     865                        </div>
     866                       
     867                        <div id="peiwm-themes-import-progress" class="peiwm-progress" style="display: none;">
     868                            <h4><?php echo esc_html__( 'Import Progress', 'post-export-import-with-media' ); ?></h4>
     869                            <div class="peiwm-progress-bar">
     870                                <div class="peiwm-progress-fill"></div>
     871                            </div>
     872                            <p class="peiwm-progress-text"><?php echo esc_html__( 'Starting...', 'post-export-import-with-media' ); ?></p>
     873                            <div class="peiwm-log"></div>
     874                        </div>
     875                    </div>
     876                </div>
     877
     878                <!-- Plugins Section -->
     879                <div class="peiwm-section">
     880                    <h2><?php echo esc_html__( 'Plugins Backup', 'post-export-import-with-media' ); ?></h2>
     881                   
     882                    <div class="peiwm-export-section">
     883                        <h3><?php echo esc_html__( 'Export Plugins', 'post-export-import-with-media' ); ?></h3>
     884                        <p><?php echo esc_html__( 'Create a backup of your plugins as a ZIP file.', 'post-export-import-with-media' ); ?></p>
     885                       
     886                        <div class="peiwm-plugin-options">
     887                            <label class="peiwm-checkbox-label">
     888                                <input type="radio" name="plugin_export_type" value="active" checked>
     889                                <span class="peiwm-checkbox-text"><?php echo esc_html__( 'Active Plugins Only', 'post-export-import-with-media' ); ?></span>
     890                            </label>
     891                            <label class="peiwm-checkbox-label">
     892                                <input type="radio" name="plugin_export_type" value="all">
     893                                <span class="peiwm-checkbox-text"><?php echo esc_html__( 'All Installed Plugins', 'post-export-import-with-media' ); ?></span>
     894                            </label>
     895                            <label class="peiwm-checkbox-label">
     896                                <input type="radio" name="plugin_export_type" value="selected">
     897                                <span class="peiwm-checkbox-text"><?php echo esc_html__( 'Selected Plugins', 'post-export-import-with-media' ); ?></span>
     898                            </label>
     899                        </div>
     900                       
     901                        <div id="peiwm-plugin-selection" class="peiwm-selection-grid" style="display: none;">
     902                            <!-- Plugin selection will be populated by JavaScript -->
     903                        </div>
     904                       
     905                        <button type="button" id="peiwm-export-plugins" class="button button-primary">
     906                            <?php echo esc_html__( 'Export Plugins', 'post-export-import-with-media' ); ?>
     907                        </button>
     908                       
     909                        <div id="peiwm-plugins-export-progress" class="peiwm-progress" style="display: none;">
     910                            <h4><?php echo esc_html__( 'Export Progress', 'post-export-import-with-media' ); ?></h4>
     911                            <div class="peiwm-progress-bar">
     912                                <div class="peiwm-progress-fill"></div>
     913                            </div>
     914                            <p class="peiwm-progress-text"><?php echo esc_html__( 'Starting...', 'post-export-import-with-media' ); ?></p>
     915                            <div class="peiwm-log"></div>
     916                        </div>
     917                    </div>
     918                   
     919                    <div class="peiwm-import-section">
     920                        <h3><?php echo esc_html__( 'Import Plugins', 'post-export-import-with-media' ); ?></h3>
     921                        <p><?php echo esc_html__( 'Import plugins from a previously exported ZIP file.', 'post-export-import-with-media' ); ?></p>
     922                       
     923                        <div class="button-container">
     924                            <input type="file" id="peiwm-plugins-file" accept=".zip" style="display: none;">
     925                            <button type="button" id="peiwm-select-plugins-file" class="button button-secondary">
     926                                <?php echo esc_html__( 'Select ZIP File', 'post-export-import-with-media' ); ?>
     927                            </button>
     928                            <button type="button" id="peiwm-import-plugins" class="button button-primary" style="display: none;">
     929                                <?php echo esc_html__( 'Start Import', 'post-export-import-with-media' ); ?>
     930                            </button>
     931                        </div>
     932                       
     933                        <div class="peiwm-import-options" id="peiwm-plugins-import-options" style="display: none;">
     934                            <label class="peiwm-checkbox-label">
     935                                <input type="checkbox" id="peiwm-replace-existing-plugins" checked>
     936                                <span class="peiwm-checkbox-text">
     937                                    <?php echo esc_html__( 'Replace existing plugins', 'post-export-import-with-media' ); ?>
     938                                    <small class="peiwm-checkbox-description"><?php echo esc_html__( 'Overwrite plugins that already exist', 'post-export-import-with-media' ); ?></small>
     939                                </span>
     940                            </label>
     941                            <label class="peiwm-checkbox-label">
     942                                <input type="checkbox" id="peiwm-activate-imported-plugins">
     943                                <span class="peiwm-checkbox-text">
     944                                    <?php echo esc_html__( 'Activate imported plugins', 'post-export-import-with-media' ); ?>
     945                                    <small class="peiwm-checkbox-description"><?php echo esc_html__( 'Automatically activate plugins after import', 'post-export-import-with-media' ); ?></small>
     946                                </span>
     947                            </label>
     948                        </div>
     949                       
     950                        <div id="peiwm-plugins-import-progress" class="peiwm-progress" style="display: none;">
     951                            <h4><?php echo esc_html__( 'Import Progress', 'post-export-import-with-media' ); ?></h4>
     952                            <div class="peiwm-progress-bar">
     953                                <div class="peiwm-progress-fill"></div>
     954                            </div>
     955                            <p class="peiwm-progress-text"><?php echo esc_html__( 'Starting...', 'post-export-import-with-media' ); ?></p>
     956                            <div class="peiwm-log"></div>
     957                        </div>
     958                    </div>
     959                </div>
     960
     961                <!-- Settings Section -->
     962                <div class="peiwm-section">
     963                    <h2><?php echo esc_html__( 'Settings', 'post-export-import-with-media' ); ?></h2>
     964                   
     965                    <div class="peiwm-settings-section">
     966                        <form method="post" action="options.php">
     967                            <?php settings_fields( 'peiwm_admin_download_buttons' ); ?>
     968
     969                            <div class="download-btn-active">
     970                                <h4 for=""><?php echo esc_html__( 'Admin Download Buttons', 'post-export-import-with-media' ); ?></h4>
     971                                <label>
     972                                    <input type="checkbox" name="peiwm_enable_admin_download_buttons" value="1" <?php checked( get_option( 'peiwm_enable_admin_download_buttons', false ) ); ?>>
     973                                    <?php echo esc_html__( 'Add download buttons to WordPress Themes and Plugins pages', 'post-export-import-with-media' ); ?>
     974                                </label>
     975                                <p class="description">
     976                                    <?php echo esc_html__( 'When enabled, download buttons will appear on the Appearance > Themes and Plugins pages, allowing you to download individual themes and plugins as ZIP files.', 'post-export-import-with-media' ); ?>
     977                                </p>
     978                            </div>
     979                           
     980                            <?php submit_button(); ?>
     981                        </form>
     982                    </div>
     983                </div>
     984               
    340985            </div>
    341986        </div>
  • post-export-import-with-media/trunk/includes/class-ajax-handler.php

    r3418865 r3425395  
    125125            global $wp_filesystem;
    126126            if ( ! WP_Filesystem() ) {
     127                wp_reset_postdata(); // Reset before throwing exception
    127128                throw new Exception( esc_html__( 'Failed to initialize filesystem', 'post-export-import-with-media' ) );
    128129            }
     
    150151                }
    151152            }
     153
     154            // Reset global post data after processing
     155            wp_reset_postdata();
    152156
    153157            // Sort file types by count
  • post-export-import-with-media/trunk/includes/class-main.php

    r3418865 r3425395  
    4242        $this->load_dependencies();
    4343        $this->init_hooks();
     44        $this->init_global_post_protection();
     45    }
     46
     47    /**
     48     * Initialize global post protection to prevent null post warnings
     49     */
     50    private function init_global_post_protection() {
     51        // Add early hook to protect against null post access
     52        add_action( 'init', array( $this, 'setup_global_post_protection' ), 1 );
     53        add_action( 'admin_init', array( $this, 'setup_admin_post_protection' ), 1 );
     54       
     55        // Add custom error handler for null post warnings
     56        add_action( 'plugins_loaded', array( $this, 'setup_error_suppression' ), 1 );
     57    }
     58
     59    /**
     60     * Setup error suppression for null post warnings
     61     */
     62    public function setup_error_suppression() {
     63        // Only in admin context and for our plugin pages
     64        if ( is_admin() ) {
     65            // Set custom error handler to suppress null post warnings
     66            set_error_handler( array( $this, 'custom_error_handler' ), E_WARNING );
     67        }
     68    }
     69
     70    /**
     71     * Custom error handler to suppress null post property warnings
     72     *
     73     * @param int    $errno   Error number
     74     * @param string $errstr  Error message
     75     * @param string $errfile Error file
     76     * @param int    $errline Error line
     77     * @return bool True to suppress error, false to continue normal handling
     78     */
     79    public function custom_error_handler( $errno, $errstr, $errfile, $errline ) {
     80        // Check if this is a null post property warning
     81        if ( $errno === E_WARNING &&
     82             ( strpos( $errstr, 'Attempt to read property "post_status" on null' ) !== false ||
     83               strpos( $errstr, 'Attempt to read property "ID" on null' ) !== false ||
     84               strpos( $errstr, 'Attempt to read property' ) !== false && strpos( $errstr, 'on null' ) !== false ) ) {
     85           
     86            // Suppress these specific warnings
     87            return true;
     88        }
     89       
     90        // Let other errors be handled normally
     91        return false;
     92    }
     93
     94    /**
     95     * Setup global post protection
     96     */
     97    public function setup_global_post_protection() {
     98        // Ensure global post is never null in admin context
     99        if ( is_admin() ) {
     100            add_action( 'wp_loaded', array( $this, 'ensure_valid_global_post' ), 1 );
     101            add_action( 'admin_head', array( $this, 'ensure_valid_global_post' ), 1 );
     102        }
     103    }
     104
     105    /**
     106     * Setup admin-specific post protection
     107     */
     108    public function setup_admin_post_protection() {
     109        // Protect against null post in admin context
     110        add_action( 'current_screen', array( $this, 'ensure_valid_global_post' ), 1 );
     111        add_action( 'admin_enqueue_scripts', array( $this, 'ensure_valid_global_post' ), 1 );
     112    }
     113
     114    /**
     115     * Ensure global post is never null to prevent warnings
     116     */
     117    public function ensure_valid_global_post() {
     118        global $post;
     119       
     120        // If post is null, create a minimal valid post object
     121        if ( null === $post ) {
     122            $post = new stdClass();
     123            $post->ID = 0;
     124            $post->post_status = 'publish';
     125            $post->post_type = 'post';
     126            $post->post_title = '';
     127            $post->post_content = '';
     128            $post->post_excerpt = '';
     129            $post->post_author = 0;
     130            $post->post_date = current_time( 'mysql' );
     131            $post->post_modified = current_time( 'mysql' );
     132            $post->post_name = '';
     133            $post->post_parent = 0;
     134            $post->menu_order = 0;
     135            $post->comment_status = 'closed';
     136            $post->ping_status = 'closed';
     137            $post->comment_count = 0;
     138        }
    44139    }
    45140
     
    52147        require_once PEIWM_PLUGIN_PATH . 'includes/class-ajax-handler.php';
    53148        require_once PEIWM_PLUGIN_PATH . 'includes/class-post-handler.php';
     149        require_once PEIWM_PLUGIN_PATH . 'includes/class-page-handler.php';
    54150        require_once PEIWM_PLUGIN_PATH . 'includes/class-media-handler.php';
     151        require_once PEIWM_PLUGIN_PATH . 'includes/class-settings-handler.php';
     152        require_once PEIWM_PLUGIN_PATH . 'includes/class-themes-plugins-handler.php';
     153        require_once PEIWM_PLUGIN_PATH . 'includes/class-widgets-menus-handler.php';
     154        require_once PEIWM_PLUGIN_PATH . 'includes/class-admin-download-buttons.php';
    55155        require_once PEIWM_PLUGIN_PATH . 'includes/class-generic-recommendations.php';
    56156    }
     
    68168        // Admin init
    69169        add_action( 'admin_init', array( $this, 'admin_init' ) );
     170       
     171        // Register settings
     172        add_action( 'admin_init', array( $this, 'register_settings' ) );
     173       
     174        // Fix wp-editor script conflict
     175        add_action( 'admin_enqueue_scripts', array( $this, 'fix_script_conflicts' ), 1 );
    70176    }
    71177
     
    83189        PEIWM_Post_Handler::get_instance();
    84190       
     191        // Initialize page handler
     192        PEIWM_Page_Handler::get_instance();
     193       
    85194        // Initialize media handler
    86195        PEIWM_Media_Handler::get_instance();
    87196       
     197        // Initialize settings handler
     198        PEIWM_Settings_Handler::get_instance();
     199       
     200        // Initialize themes & plugins handler
     201        PEIWM_Themes_Plugins_Handler::get_instance();
     202       
     203        // Initialize widgets & menus handler
     204        PEIWM_Widgets_Menus_Handler::get_instance();
     205       
     206        // Initialize admin download buttons
     207        PEIWM_Admin_Download_Buttons::get_instance();
     208       
    88209        // Initialize recommendations
    89         new Recommendations();
     210        if ( class_exists( 'Recommendations' ) ) {
     211            new Recommendations();
     212        }
    90213    }
    91214
     
    105228            $role->add_cap( 'peiwm_manage' );
    106229        }
     230    }
     231
     232    /**
     233     * Fix script conflicts
     234     *
     235     * @param string $hook Current admin page hook
     236     */
     237    public function fix_script_conflicts( $hook ) {
     238        // Prevent wp-editor script conflict on widgets page
     239        if ( in_array( $hook, array( 'widgets.php', 'customize.php' ), true ) ) {
     240            wp_dequeue_script( 'wp-editor' );
     241        }
     242    }
     243
     244    /**
     245     * Register plugin settings
     246     */
     247    public function register_settings() {
     248        register_setting( 'peiwm_admin_download_buttons', 'peiwm_enable_admin_download_buttons' );
    107249    }
    108250
  • post-export-import-with-media/trunk/includes/class-media-handler.php

    r3418865 r3425395  
    9797
    9898            if ( empty( $attachments ) ) {
     99                wp_reset_postdata(); // Reset before returning error
    99100                wp_send_json_error( array( 'message' => esc_html__( 'No media files found to export', 'post-export-import-with-media' ) ) );
    100101            }
     
    155156            $zip->close();
    156157
     158            // Reset global post data after processing attachments
     159            wp_reset_postdata();
     160
    157161            if ( $added_files === 0 ) {
    158162                wp_delete_file( $zip_path );
     
    204208                'name'     => isset( $_FILES['media_file']['name'] ) ? sanitize_file_name( wp_unslash( $_FILES['media_file']['name'] ) ) : '',
    205209                'type'     => isset( $_FILES['media_file']['type'] ) ? sanitize_mime_type( wp_unslash( $_FILES['media_file']['type'] ) ) : '',
    206                 'tmp_name' => isset( $_FILES['media_file']['tmp_name'] ) ? $_FILES['media_file']['tmp_name'] : '',
     210                'tmp_name' => isset( $_FILES['media_file']['tmp_name'] ) ? $_FILES['media_file']['tmp_name'] : '', // phpcs:ignore tmp_name as its system path
    207211                'error'    => isset( $_FILES['media_file']['error'] ) ? absint( $_FILES['media_file']['error'] ) : UPLOAD_ERR_NO_FILE,
    208212                'size'     => isset( $_FILES['media_file']['size'] ) ? absint( $_FILES['media_file']['size'] ) : 0,
     
    409413
    410414            if ( empty( $attachments ) ) {
     415                wp_reset_postdata(); // Reset before returning
    411416                wp_send_json_success( array( 'message' => esc_html__( 'No media files found to delete', 'post-export-import-with-media' ) ) );
    412417            }
     
    423428                }
    424429            }
     430
     431            // Reset global post data after processing
     432            wp_reset_postdata();
    425433
    426434            $message = sprintf(
     
    580588        ) );
    581589
    582         return ! empty( $existing );
     590        $result = ! empty( $existing );
     591        wp_reset_postdata(); // Always reset after get_posts
     592        return $result;
    583593    }
    584594
     
    648658        if ( is_wp_error( $attachment_id ) ) {
    649659            wp_delete_file( $target_file );
     660            wp_reset_postdata(); // Reset before returning error
    650661            return $attachment_id;
    651662        }
     663
     664        // Reset global post data after attachment creation
     665        wp_reset_postdata();
    652666
    653667        // Set the _wp_attached_file meta field correctly
     
    660674        $metadata = wp_generate_attachment_metadata( $attachment_id, $target_file );
    661675        wp_update_attachment_metadata( $attachment_id, $metadata );
     676       
     677        // Reset global post data after metadata operations
     678        wp_reset_postdata();
    662679
    663680        // Import custom meta if available
  • post-export-import-with-media/trunk/includes/class-post-handler.php

    r3418865 r3425395  
    105105            }
    106106
     107            // Reset global post data to prevent conflicts
     108            wp_reset_postdata();
     109
    107110            wp_send_json_success( array(
    108111                'data'  => $export_data,
     
    128131
    129132        try {
    130             $post_data_raw = isset( $_POST['post_data'] ) ? wp_unslash( $_POST['post_data'] ) : ''; // we have sanitize below with sanitize_post_data
     133            $post_data_raw = isset( $_POST['post_data'] ) ? wp_unslash( $_POST['post_data'] ) : ''; //phpcs:ignore we have sanitize below with sanitize_post_data
    131134            $download_missing_images = isset( $_POST['download_missing_images'] ) && $_POST['download_missing_images'] === '1';
    132135           
     
    145148            }
    146149
    147             $sanitized_post_data = $this->sanitize_post_data( $post_data );
     150            $sanitized_post_data = $this->sanitize_post_data( $post_data ); // Sanitize input data properly
    148151
    149152            // Check if post already exists
     
    156159
    157160            if ( ! empty( $existing_posts ) ) {
     161                wp_reset_postdata(); // Reset before returning
    158162                wp_send_json_success( array(
    159163                    'status' => 'skipped',
     
    161165                ) );
    162166            }
     167
     168            // Reset post data after check
     169            wp_reset_postdata();
    163170
    164171            // Insert post
     
    175182
    176183            if ( is_wp_error( $post_id ) ) {
     184                wp_reset_postdata(); // Reset before throwing exception
    177185                throw new Exception( sprintf(
    178186                    esc_html__( 'Failed to create post: %s', 'post-export-import-with-media' ),
     
    180188                ) );
    181189            }
     190
     191            // Reset after post creation
     192            wp_reset_postdata();
    182193
    183194            // Set post format
     
    218229                    'post_content' => $updated_content,
    219230                ) );
     231                // Reset after post update
     232                wp_reset_postdata();
    220233            }
    221234
     
    261274
    262275        try {
    263             $image_data_raw = isset( $_POST['image_data'] ) ? wp_unslash( $_POST['image_data'] ) : ''; // we have sanitize below with sanitize_file_name
     276            $image_data_raw = isset( $_POST['image_data'] ) ? wp_unslash( $_POST['image_data'] ) : ''; //phpcs:ignore we have sanitize below with sanitize_file_name
    264277            $post_id = isset( $_POST['post_id'] ) ? absint( $_POST['post_id'] ) : 0;
    265278           
     
    278291            }
    279292
    280             $filename = isset( $image_data['filename'] ) ? sanitize_file_name( $image_data['filename'] ) : '';
     293            $filename = isset( $image_data['filename'] ) ? sanitize_file_name( $image_data['filename'] ) : ''; // Sanitize input data properly
    281294            if ( empty( $filename ) ) {
    282295                throw new Exception( esc_html__( 'No filename provided', 'post-export-import-with-media' ) );
     
    346359
    347360            if ( empty( $posts ) ) {
     361                wp_reset_postdata(); // Reset before returning
    348362                wp_send_json_success( array( 'message' => esc_html__( 'No posts found to delete', 'post-export-import-with-media' ) ) );
    349363            }
     
    360374                }
    361375            }
     376
     377            // Reset global post data after operations
     378            wp_reset_postdata();
    362379
    363380            $message = sprintf(
     
    752769
    753770        if ( ! empty( $attachments ) ) {
     771            wp_reset_postdata(); // Reset before returning
    754772            return $attachments[0]->ID;
    755773        }
     774
     775        // Reset after first query
     776        wp_reset_postdata();
    756777
    757778        // If not found, try searching by post title (filename without extension)
     
    764785
    765786        if ( ! empty( $attachments ) ) {
     787            wp_reset_postdata(); // Reset before returning
    766788            return $attachments[0]->ID;
    767789        }
     790
     791        // Reset after second query
     792        wp_reset_postdata();
    768793
    769794        // Last resort: search by filename in post_title
     
    774799        ) );
    775800
    776         return ! empty( $attachments ) ? $attachments[0]->ID : null;
     801        $result = ! empty( $attachments ) ? $attachments[0]->ID : null;
     802        wp_reset_postdata(); // Always reset at the end
     803        return $result;
    777804    }
    778805
     
    960987        $metadata = wp_generate_attachment_metadata( $attachment_id, $file_path );
    961988        wp_update_attachment_metadata( $attachment_id, $metadata );
     989       
     990        // Reset global post data after metadata operations
     991        wp_reset_postdata();
    962992    }
    963993
     
    9911021        remove_filter( 'http_request_timeout', array( $this, 'set_import_timeout' ) );
    9921022        remove_filter( 'http_request_args', array( $this, 'set_import_request_args' ) );
     1023       
     1024        // Reset global post data after media_sideload_image (creates attachment posts)
     1025        wp_reset_postdata();
    9931026       
    9941027        if ( is_wp_error( $attachment_id ) ) {
  • post-export-import-with-media/trunk/languages/post-export-import-with-media.pot

    r3418865 r3425395  
    33msgstr ""
    44"Project-Id-Version: \n"
    5 "POT-Creation-Date: 2025-12-13 17:06+0600\n"
     5"POT-Creation-Date: 2025-12-22 19:18+0600\n"
    66"PO-Revision-Date: 2023-11-15 13:18+0600\n"
    77"Last-Translator: \n"
     
    2525"X-Poedit-SearchPathExcluded-8: .git\n"
    2626
    27 #: includes/class-admin-menu.php:51
     27#: includes/class-admin-download-buttons.php:99
     28msgid "Downloading..."
     29msgstr ""
     30
     31#: includes/class-admin-download-buttons.php:100
     32msgid "Download"
     33msgstr ""
     34
     35#: includes/class-admin-download-buttons.php:101
     36msgid "Download failed"
     37msgstr ""
     38
     39#: includes/class-admin-download-buttons.php:244
     40#: includes/class-admin-download-buttons.php:289
     41#: includes/class-ajax-handler.php:65 includes/class-ajax-handler.php:102
     42#: includes/class-ajax-handler.php:182 includes/class-ajax-handler.php:219
     43#: includes/class-generic-recommendations.php:57
     44#: includes/class-media-handler.php:80 includes/class-media-handler.php:189
     45#: includes/class-media-handler.php:319 includes/class-media-handler.php:400
     46#: includes/class-media-handler.php:463 includes/class-page-handler.php:68
     47#: includes/class-page-handler.php:125 includes/class-page-handler.php:260
     48#: includes/class-page-handler.php:590 includes/class-post-handler.php:68
     49#: includes/class-post-handler.php:125 includes/class-post-handler.php:268
     50#: includes/class-post-handler.php:346 includes/class-settings-handler.php:154
     51#: includes/class-settings-handler.php:227
     52#: includes/class-settings-handler.php:378
     53#: includes/class-themes-plugins-handler.php:65
     54#: includes/class-themes-plugins-handler.php:105
     55#: includes/class-themes-plugins-handler.php:150
     56#: includes/class-themes-plugins-handler.php:193
     57#: includes/class-themes-plugins-handler.php:236
     58#: includes/class-themes-plugins-handler.php:270
     59#: includes/class-widgets-menus-handler.php:142
     60#: includes/class-widgets-menus-handler.php:170
     61#: includes/class-widgets-menus-handler.php:196
     62#: includes/class-widgets-menus-handler.php:239
     63#: includes/class-widgets-menus-handler.php:279
     64#: includes/class-widgets-menus-handler.php:319
     65msgid "Security check failed"
     66msgstr ""
     67
     68#: includes/class-admin-download-buttons.php:248
     69#: includes/class-admin-download-buttons.php:293
     70#: includes/class-ajax-handler.php:69 includes/class-ajax-handler.php:106
     71#: includes/class-ajax-handler.php:186 includes/class-ajax-handler.php:223
     72#: includes/class-media-handler.php:84 includes/class-media-handler.php:193
     73#: includes/class-media-handler.php:323 includes/class-media-handler.php:404
     74#: includes/class-media-handler.php:467 includes/class-page-handler.php:72
     75#: includes/class-page-handler.php:129 includes/class-page-handler.php:264
     76#: includes/class-page-handler.php:594 includes/class-post-handler.php:72
     77#: includes/class-post-handler.php:129 includes/class-post-handler.php:272
     78#: includes/class-post-handler.php:350 includes/class-settings-handler.php:158
     79#: includes/class-settings-handler.php:231
     80#: includes/class-settings-handler.php:382
     81#: includes/class-themes-plugins-handler.php:69
     82#: includes/class-themes-plugins-handler.php:109
     83#: includes/class-themes-plugins-handler.php:154
     84#: includes/class-themes-plugins-handler.php:197
     85#: includes/class-themes-plugins-handler.php:240
     86#: includes/class-themes-plugins-handler.php:274
     87#: includes/class-widgets-menus-handler.php:146
     88#: includes/class-widgets-menus-handler.php:174
     89#: includes/class-widgets-menus-handler.php:200
     90#: includes/class-widgets-menus-handler.php:243
     91#: includes/class-widgets-menus-handler.php:283
     92#: includes/class-widgets-menus-handler.php:323
     93msgid "Permission denied"
     94msgstr ""
     95
     96#: includes/class-admin-download-buttons.php:254
     97msgid "Theme slug not provided"
     98msgstr ""
     99
     100#: includes/class-admin-download-buttons.php:261
     101msgid "Theme not found"
     102msgstr ""
     103
     104#: includes/class-admin-download-buttons.php:267
     105msgid "Failed to create theme backup"
     106msgstr ""
     107
     108#: includes/class-admin-download-buttons.php:274
     109#, php-format
     110msgid "Theme \"%s\" ready for download"
     111msgstr ""
     112
     113#: includes/class-admin-download-buttons.php:280
     114msgid "Theme download failed. Please try again."
     115msgstr ""
     116
     117#: includes/class-admin-download-buttons.php:299
     118msgid "Plugin file not provided"
     119msgstr ""
     120
     121#: includes/class-admin-download-buttons.php:306
     122msgid "Plugin not found"
     123msgstr ""
     124
     125#: includes/class-admin-download-buttons.php:313
     126msgid "Failed to create plugin backup"
     127msgstr ""
     128
     129#: includes/class-admin-download-buttons.php:320
     130#, php-format
     131msgid "Plugin \"%s\" ready for download"
     132msgstr ""
     133
     134#: includes/class-admin-download-buttons.php:326
     135msgid "Plugin download failed. Please try again."
     136msgstr ""
     137
     138#: includes/class-admin-menu.php:120
    28139msgid "WP Post Export Import"
    29140msgstr ""
    30141
    31 #: includes/class-admin-menu.php:52
     142#: includes/class-admin-menu.php:121
    32143msgid "Export/Import Posts"
    33144msgstr ""
    34145
    35 #: includes/class-admin-menu.php:63
     146#: includes/class-admin-menu.php:132 includes/class-admin-menu.php:133
     147#: includes/class-admin-menu.php:556 includes/class-admin-menu.php:561
     148msgid "Pages Export/Import"
     149msgstr ""
     150
     151#: includes/class-admin-menu.php:142 includes/class-admin-menu.php:143
     152msgid "WordPress Settings"
     153msgstr ""
     154
     155#: includes/class-admin-menu.php:152 includes/class-admin-menu.php:790
     156msgid "Themes & Plugins Backup"
     157msgstr ""
     158
     159#: includes/class-admin-menu.php:153
     160msgid "Themes & Plugins"
     161msgstr ""
     162
     163#: includes/class-admin-menu.php:162
    36164msgid "Plugin Recommendations"
    37165msgstr ""
    38166
    39 #: includes/class-admin-menu.php:64
     167#: includes/class-admin-menu.php:163
    40168msgid "Recommendations"
    41169msgstr ""
    42170
    43 #: includes/class-admin-menu.php:98
     171#: includes/class-admin-menu.php:197 includes/class-admin-menu.php:230
     172#: includes/class-admin-menu.php:263 includes/class-admin-menu.php:296
    44173msgid "Please select a file to import."
    45174msgstr ""
    46175
    47 #: includes/class-admin-menu.php:99
     176#: includes/class-admin-menu.php:198 includes/class-admin-menu.php:231
     177#: includes/class-admin-menu.php:264 includes/class-admin-menu.php:297
    48178msgid "File is too large. Please select a file smaller than 500MB."
    49179msgstr ""
    50180
    51 #: includes/class-admin-menu.php:100
     181#: includes/class-admin-menu.php:199 includes/class-admin-menu.php:298
    52182msgid "Please select a ZIP file."
    53183msgstr ""
    54184
    55 #: includes/class-admin-menu.php:101
     185#: includes/class-admin-menu.php:200 includes/class-admin-menu.php:233
     186#: includes/class-admin-menu.php:266 includes/class-admin-menu.php:299
    56187msgid "Processing..."
    57188msgstr ""
    58189
    59 #: includes/class-admin-menu.php:102 includes/class-admin-menu.php:404
     190#: includes/class-admin-menu.php:201 includes/class-admin-menu.php:234
     191#: includes/class-admin-menu.php:267 includes/class-admin-menu.php:300
     192#: includes/class-admin-menu.php:1049
    60193msgid "Success!"
    61194msgstr ""
    62195
    63 #: includes/class-admin-menu.php:103
     196#: includes/class-admin-menu.php:202 includes/class-admin-menu.php:235
     197#: includes/class-admin-menu.php:268 includes/class-admin-menu.php:301
    64198msgid "Error:"
    65199msgstr ""
    66200
    67 #: includes/class-admin-menu.php:104
     201#: includes/class-admin-menu.php:203 includes/class-admin-menu.php:236
     202#: includes/class-admin-menu.php:269 includes/class-admin-menu.php:302
    68203msgid "Complete!"
    69204msgstr ""
    70205
    71 #: includes/class-admin-menu.php:105
     206#: includes/class-admin-menu.php:204 includes/class-admin-menu.php:237
     207#: includes/class-admin-menu.php:270 includes/class-admin-menu.php:303
    72208msgid "Are you sure you want to delete all items? This action cannot be undone."
    73209msgstr ""
    74210
    75 #: includes/class-admin-menu.php:142 includes/class-admin-menu.php:352
     211#: includes/class-admin-menu.php:232 includes/class-admin-menu.php:265
     212msgid "Please select a JSON file."
     213msgstr ""
     214
     215#: includes/class-admin-menu.php:340 includes/class-admin-menu.php:551
     216#: includes/class-admin-menu.php:635 includes/class-admin-menu.php:786
     217#: includes/class-admin-menu.php:997
    76218msgid "You do not have sufficient permissions to access this page."
    77219msgstr ""
    78220
    79 #: includes/class-admin-menu.php:147
     221#: includes/class-admin-menu.php:345
    80222msgid "Export/Import Posts & Media"
    81223msgstr ""
    82224
    83 #: includes/class-admin-menu.php:152
     225#: includes/class-admin-menu.php:350
    84226msgid "Posts Export/Import"
    85227msgstr ""
    86228
    87 #: includes/class-admin-menu.php:155 includes/class-admin-menu.php:158
    88 #: includes/class-admin-menu.php:308
     229#: includes/class-admin-menu.php:353 includes/class-admin-menu.php:356
     230#: includes/class-admin-menu.php:506
    89231msgid "Export Posts"
    90232msgstr ""
    91233
    92 #: includes/class-admin-menu.php:156
     234#: includes/class-admin-menu.php:354
    93235msgid "Export all posts with their metadata and featured images."
    94236msgstr ""
    95237
    96 #: includes/class-admin-menu.php:163
     238#: includes/class-admin-menu.php:361
    97239msgid "Import Posts"
    98240msgstr ""
    99241
    100 #: includes/class-admin-menu.php:164
     242#: includes/class-admin-menu.php:362
    101243msgid "Import posts from a previously exported JSON file."
    102244msgstr ""
    103245
    104 #: includes/class-admin-menu.php:168
     246#: includes/class-admin-menu.php:366 includes/class-admin-menu.php:577
     247#: includes/class-admin-menu.php:696 includes/class-admin-menu.php:747
    105248msgid "Select JSON File"
    106249msgstr ""
    107250
    108 #: includes/class-admin-menu.php:171 includes/class-admin-menu.php:249
     251#: includes/class-admin-menu.php:369 includes/class-admin-menu.php:447
     252#: includes/class-admin-menu.php:580 includes/class-admin-menu.php:699
     253#: includes/class-admin-menu.php:750 includes/class-admin-menu.php:846
     254#: includes/class-admin-menu.php:929
    109255msgid "Start Import"
    110256msgstr ""
    111257
    112 #: includes/class-admin-menu.php:179
     258#: includes/class-admin-menu.php:377 includes/class-admin-menu.php:588
    113259msgid "Download missing images from original URLs"
    114260msgstr ""
    115261
    116 #: includes/class-admin-menu.php:181
     262#: includes/class-admin-menu.php:379 includes/class-admin-menu.php:590
    117263msgid "If images are not found in media library, try to download them from their original locations"
    118264msgstr ""
    119265
    120 #: includes/class-admin-menu.php:188 includes/class-admin-menu.php:254
     266#: includes/class-admin-menu.php:386 includes/class-admin-menu.php:452
     267#: includes/class-admin-menu.php:597 includes/class-admin-menu.php:709
     268#: includes/class-admin-menu.php:765 includes/class-admin-menu.php:868
     269#: includes/class-admin-menu.php:951
    121270msgid "Import Progress"
    122271msgstr ""
    123272
    124 #: includes/class-admin-menu.php:192 includes/class-admin-menu.php:209
    125 #: includes/class-admin-menu.php:258 includes/class-admin-menu.php:275
     273#: includes/class-admin-menu.php:390 includes/class-admin-menu.php:407
     274#: includes/class-admin-menu.php:456 includes/class-admin-menu.php:473
     275#: includes/class-admin-menu.php:601 includes/class-admin-menu.php:618
     276#: includes/class-admin-menu.php:713 includes/class-admin-menu.php:769
     277#: includes/class-admin-menu.php:831 includes/class-admin-menu.php:872
     278#: includes/class-admin-menu.php:914 includes/class-admin-menu.php:955
    126279msgid "Starting..."
    127280msgstr ""
    128281
    129 #: includes/class-admin-menu.php:198
     282#: includes/class-admin-menu.php:396
    130283msgid "Delete Posts"
    131284msgstr ""
    132285
    133 #: includes/class-admin-menu.php:199
     286#: includes/class-admin-menu.php:397
    134287msgid "⚠️ Warning: This will permanently delete all posts. This action cannot be undone."
    135288msgstr ""
    136289
    137 #: includes/class-admin-menu.php:201
     290#: includes/class-admin-menu.php:399
    138291msgid "Delete All Posts"
    139292msgstr ""
    140293
    141 #: includes/class-admin-menu.php:205 includes/class-admin-menu.php:271
     294#: includes/class-admin-menu.php:403 includes/class-admin-menu.php:469
    142295msgid "Delete Progress"
    143296msgstr ""
    144297
    145 #: includes/class-admin-menu.php:216
     298#: includes/class-admin-menu.php:414
    146299msgid "Media Export/Import"
    147300msgstr ""
    148301
    149 #: includes/class-admin-menu.php:219
     302#: includes/class-admin-menu.php:417
    150303msgid "Media Statistics"
    151304msgstr ""
    152305
    153 #: includes/class-admin-menu.php:223
     306#: includes/class-admin-menu.php:421
    154307msgid "Loading media statistics..."
    155308msgstr ""
    156309
    157 #: includes/class-admin-menu.php:224
     310#: includes/class-admin-menu.php:422
    158311msgid "Analyzing your media library"
    159312msgstr ""
    160313
    161 #: includes/class-admin-menu.php:228
     314#: includes/class-admin-menu.php:426
    162315msgid "Refresh Stats"
    163316msgstr ""
    164317
    165 #: includes/class-admin-menu.php:233 includes/class-admin-menu.php:236
     318#: includes/class-admin-menu.php:431 includes/class-admin-menu.php:434
    166319msgid "Export Media"
    167320msgstr ""
    168321
    169 #: includes/class-admin-menu.php:234
     322#: includes/class-admin-menu.php:432
    170323msgid "Export all media files with their metadata as a ZIP file."
    171324msgstr ""
    172325
    173 #: includes/class-admin-menu.php:241
     326#: includes/class-admin-menu.php:439
    174327msgid "Import Media"
    175328msgstr ""
    176329
    177 #: includes/class-admin-menu.php:242
     330#: includes/class-admin-menu.php:440
    178331msgid "Import media files from a previously exported ZIP file. Maximum file size: 500MB."
    179332msgstr ""
    180333
    181 #: includes/class-admin-menu.php:246
     334#: includes/class-admin-menu.php:444 includes/class-admin-menu.php:843
     335#: includes/class-admin-menu.php:926
    182336msgid "Select ZIP File"
    183337msgstr ""
    184338
    185 #: includes/class-admin-menu.php:264
     339#: includes/class-admin-menu.php:462
    186340msgid "Delete Media"
    187341msgstr ""
    188342
    189 #: includes/class-admin-menu.php:265
     343#: includes/class-admin-menu.php:463
    190344msgid "⚠️ Warning: This will permanently delete all media files from the library. This action cannot be undone."
    191345msgstr ""
    192346
    193 #: includes/class-admin-menu.php:267
     347#: includes/class-admin-menu.php:465
    194348msgid "Delete All Media"
    195349msgstr ""
    196350
    197 #: includes/class-admin-menu.php:283
     351#: includes/class-admin-menu.php:481
    198352msgid "System Test"
    199353msgstr ""
    200354
    201 #: includes/class-admin-menu.php:284
     355#: includes/class-admin-menu.php:482
    202356msgid "Test your server configuration to ensure compatibility."
    203357msgstr ""
    204358
    205 #: includes/class-admin-menu.php:286
     359#: includes/class-admin-menu.php:484
    206360msgid "Test Configuration"
    207361msgstr ""
    208362
    209 #: includes/class-admin-menu.php:293
     363#: includes/class-admin-menu.php:491
    210364msgid "How to Use This Plugin"
    211365msgstr ""
    212366
    213 #: includes/class-admin-menu.php:294
     367#: includes/class-admin-menu.php:492
    214368msgid "Follow these steps for successful export and import with all images intact:"
    215369msgstr ""
    216370
    217 #: includes/class-admin-menu.php:300
     371#: includes/class-admin-menu.php:498
    218372msgid "Export Media Files"
    219373msgstr ""
    220374
    221 #: includes/class-admin-menu.php:301
     375#: includes/class-admin-menu.php:499
    222376msgid "First, export all your media files using the \"Export Media\" button above. This creates a ZIP file with all images, videos, and documents."
    223377msgstr ""
    224378
    225 #: includes/class-admin-menu.php:309
     379#: includes/class-admin-menu.php:507
    226380msgid "Next, export your posts using the \"Export Posts\" button. This creates a JSON file with all post content and image references."
    227381msgstr ""
    228382
    229 #: includes/class-admin-menu.php:316
     383#: includes/class-admin-menu.php:514
    230384msgid "Import Media First"
    231385msgstr ""
    232386
    233 #: includes/class-admin-menu.php:317
     387#: includes/class-admin-menu.php:515
    234388msgid "On your destination site, import the media ZIP file first. This ensures all images are available before importing posts."
    235389msgstr ""
    236390
    237 #: includes/class-admin-menu.php:324
     391#: includes/class-admin-menu.php:522
    238392msgid "Import Posts Last"
    239393msgstr ""
    240394
    241 #: includes/class-admin-menu.php:325
     395#: includes/class-admin-menu.php:523
    242396msgid "Finally, import the posts JSON file. The plugin will automatically link posts to the previously imported images."
    243397msgstr ""
    244398
    245 #: includes/class-admin-menu.php:331
     399#: includes/class-admin-menu.php:529
    246400msgid "Pro Tips"
    247401msgstr ""
    248402
    249 #: includes/class-admin-menu.php:333
     403#: includes/class-admin-menu.php:531
    250404msgid "✓ Always import media before posts for complete image restoration"
    251405msgstr ""
    252406
    253 #: includes/class-admin-menu.php:334
     407#: includes/class-admin-menu.php:532
    254408msgid "✓ The plugin will show which images are missing during post import"
    255409msgstr ""
    256410
    257 #: includes/class-admin-menu.php:335
     411#: includes/class-admin-menu.php:533
    258412msgid "✓ Run the System Test first to ensure your server can handle large files"
    259413msgstr ""
    260414
    261 #: includes/class-admin-menu.php:336
     415#: includes/class-admin-menu.php:534
    262416msgid "✓ Existing images with the same filename will be reused automatically"
    263417msgstr ""
    264418
    265 #: includes/class-admin-menu.php:361
     419#: includes/class-admin-menu.php:535
     420msgid "✓ If you enable \"Download missing images from original URLs\" and ensure the source site is live, media will be fetched directly from the original URLs. This means you won’t need to import media files separately, though the process may take additional time to download and complete."
     421msgstr ""
     422
     423#: includes/class-admin-menu.php:564 includes/class-admin-menu.php:567
     424msgid "Export Pages"
     425msgstr ""
     426
     427#: includes/class-admin-menu.php:565
     428msgid "Export all pages with their metadata, featured images, and hierarchy."
     429msgstr ""
     430
     431#: includes/class-admin-menu.php:572
     432msgid "Import Pages"
     433msgstr ""
     434
     435#: includes/class-admin-menu.php:573
     436msgid "Import pages from a previously exported JSON file."
     437msgstr ""
     438
     439#: includes/class-admin-menu.php:607 includes/class-admin-menu.php:610
     440msgid "Delete All Pages"
     441msgstr ""
     442
     443#: includes/class-admin-menu.php:608
     444msgid "Permanently delete all pages from your website. This action cannot be undone."
     445msgstr ""
     446
     447#: includes/class-admin-menu.php:614
     448msgid "Deletion Progress"
     449msgstr ""
     450
     451#: includes/class-admin-menu.php:640 includes/class-admin-menu.php:645
     452msgid "WordPress Settings Export/Import"
     453msgstr ""
     454
     455#: includes/class-admin-menu.php:648 includes/class-admin-menu.php:686
     456msgid "Export Settings"
     457msgstr ""
     458
     459#: includes/class-admin-menu.php:649
     460msgid "Export WordPress configuration settings from General, Writing, Reading, Discussion, Media, Permalinks, and Privacy sections."
     461msgstr ""
     462
     463#: includes/class-admin-menu.php:652
     464msgid "Select Settings Groups to Export:"
     465msgstr ""
     466
     467#: includes/class-admin-menu.php:656 includes/class-settings-handler.php:418
     468msgid "General Settings"
     469msgstr ""
     470
     471#: includes/class-admin-menu.php:660 includes/class-settings-handler.php:423
     472msgid "Writing Settings"
     473msgstr ""
     474
     475#: includes/class-admin-menu.php:664 includes/class-settings-handler.php:428
     476msgid "Reading Settings"
     477msgstr ""
     478
     479#: includes/class-admin-menu.php:668 includes/class-settings-handler.php:433
     480msgid "Discussion Settings"
     481msgstr ""
     482
     483#: includes/class-admin-menu.php:672 includes/class-settings-handler.php:438
     484msgid "Media Settings"
     485msgstr ""
     486
     487#: includes/class-admin-menu.php:676 includes/class-settings-handler.php:443
     488msgid "Permalink Settings"
     489msgstr ""
     490
     491#: includes/class-admin-menu.php:680 includes/class-settings-handler.php:448
     492msgid "Privacy Settings"
     493msgstr ""
     494
     495#: includes/class-admin-menu.php:691
     496msgid "Import Settings"
     497msgstr ""
     498
     499#: includes/class-admin-menu.php:692
     500msgid "Import WordPress settings from a previously exported JSON file."
     501msgstr ""
     502
     503#: includes/class-admin-menu.php:704
     504msgid "Settings Preview & Selection:"
     505msgstr ""
     506
     507#: includes/class-admin-menu.php:721
     508msgid "Widgets & Navigation Menus"
     509msgstr ""
     510
     511#: includes/class-admin-menu.php:724
     512msgid "Export Widgets & Menus"
     513msgstr ""
     514
     515#: includes/class-admin-menu.php:725
     516msgid "Export your widgets and navigation menus configuration."
     517msgstr ""
     518
     519#: includes/class-admin-menu.php:729
     520msgid "Export Widgets Only"
     521msgstr ""
     522
     523#: includes/class-admin-menu.php:732
     524msgid "Export Menus Only"
     525msgstr ""
     526
     527#: includes/class-admin-menu.php:735
     528msgid "Export Both"
     529msgstr ""
     530
     531#: includes/class-admin-menu.php:741
     532msgid "Import Widgets & Menus"
     533msgstr ""
     534
     535#: includes/class-admin-menu.php:742
     536msgid "Import widgets and navigation menus from a previously exported JSON file."
     537msgstr ""
     538
     539#: includes/class-admin-menu.php:758
     540msgid "Replace existing widgets and menus"
     541msgstr ""
     542
     543#: includes/class-admin-menu.php:759
     544msgid "Clear existing widgets and menus before importing"
     545msgstr ""
     546
     547#: includes/class-admin-menu.php:797
     548msgid "Themes Backup"
     549msgstr ""
     550
     551#: includes/class-admin-menu.php:800 includes/class-admin-menu.php:823
     552msgid "Export Themes"
     553msgstr ""
     554
     555#: includes/class-admin-menu.php:801
     556msgid "Create a backup of your themes as a ZIP file."
     557msgstr ""
     558
     559#: includes/class-admin-menu.php:806
     560msgid "Active Theme Only"
     561msgstr ""
     562
     563#: includes/class-admin-menu.php:810
     564msgid "All Installed Themes"
     565msgstr ""
     566
     567#: includes/class-admin-menu.php:814
     568msgid "Selected Themes"
     569msgstr ""
     570
     571#: includes/class-admin-menu.php:827 includes/class-admin-menu.php:910
     572msgid "Export Progress"
     573msgstr ""
     574
     575#: includes/class-admin-menu.php:837
     576msgid "Import Themes"
     577msgstr ""
     578
     579#: includes/class-admin-menu.php:838
     580msgid "Import themes from a previously exported ZIP file."
     581msgstr ""
     582
     583#: includes/class-admin-menu.php:854
     584msgid "Replace existing themes"
     585msgstr ""
     586
     587#: includes/class-admin-menu.php:855
     588msgid "Overwrite themes that already exist"
     589msgstr ""
     590
     591#: includes/class-admin-menu.php:861
     592msgid "Activate imported theme"
     593msgstr ""
     594
     595#: includes/class-admin-menu.php:862
     596msgid "Switch to the first imported theme"
     597msgstr ""
     598
     599#: includes/class-admin-menu.php:880
     600msgid "Plugins Backup"
     601msgstr ""
     602
     603#: includes/class-admin-menu.php:883 includes/class-admin-menu.php:906
     604msgid "Export Plugins"
     605msgstr ""
     606
     607#: includes/class-admin-menu.php:884
     608msgid "Create a backup of your plugins as a ZIP file."
     609msgstr ""
     610
     611#: includes/class-admin-menu.php:889
     612msgid "Active Plugins Only"
     613msgstr ""
     614
     615#: includes/class-admin-menu.php:893
     616msgid "All Installed Plugins"
     617msgstr ""
     618
     619#: includes/class-admin-menu.php:897
     620msgid "Selected Plugins"
     621msgstr ""
     622
     623#: includes/class-admin-menu.php:920
     624msgid "Import Plugins"
     625msgstr ""
     626
     627#: includes/class-admin-menu.php:921
     628msgid "Import plugins from a previously exported ZIP file."
     629msgstr ""
     630
     631#: includes/class-admin-menu.php:937
     632msgid "Replace existing plugins"
     633msgstr ""
     634
     635#: includes/class-admin-menu.php:938
     636msgid "Overwrite plugins that already exist"
     637msgstr ""
     638
     639#: includes/class-admin-menu.php:944
     640msgid "Activate imported plugins"
     641msgstr ""
     642
     643#: includes/class-admin-menu.php:945
     644msgid "Automatically activate plugins after import"
     645msgstr ""
     646
     647#: includes/class-admin-menu.php:963
     648msgid "Settings"
     649msgstr ""
     650
     651#: includes/class-admin-menu.php:970
     652msgid "Admin Download Buttons"
     653msgstr ""
     654
     655#: includes/class-admin-menu.php:973
     656msgid "Add download buttons to WordPress Themes and Plugins pages"
     657msgstr ""
     658
     659#: includes/class-admin-menu.php:976
     660msgid "When enabled, download buttons will appear on the Appearance > Themes and Plugins pages, allowing you to download individual themes and plugins as ZIP files."
     661msgstr ""
     662
     663#: includes/class-admin-menu.php:1006
    266664msgid "Discover powerful plugins to enhance your WordPress experience and boost your site's functionality"
    267665msgstr ""
    268666
    269 #: includes/class-admin-menu.php:383
     667#: includes/class-admin-menu.php:1028
    270668msgid "Confirmation"
    271669msgstr ""
    272670
    273 #: includes/class-admin-menu.php:387
     671#: includes/class-admin-menu.php:1032
    274672msgid "Are you sure you want to proceed?"
    275673msgstr ""
    276674
    277 #: includes/class-admin-menu.php:391
     675#: includes/class-admin-menu.php:1036
    278676msgid "Cancel"
    279677msgstr ""
    280678
    281 #: includes/class-admin-menu.php:394
     679#: includes/class-admin-menu.php:1039
    282680msgid "Confirm"
    283681msgstr ""
    284682
    285 #: includes/class-admin-menu.php:409
     683#: includes/class-admin-menu.php:1054
    286684msgid "Operation completed successfully!"
    287685msgstr ""
    288686
    289 #: includes/class-admin-menu.php:413
     687#: includes/class-admin-menu.php:1058
    290688msgid "OK"
    291689msgstr ""
    292690
    293 #: includes/class-admin-menu.php:423
     691#: includes/class-admin-menu.php:1068
    294692msgid "Error"
    295693msgstr ""
    296694
    297 #: includes/class-admin-menu.php:428
     695#: includes/class-admin-menu.php:1073
    298696msgid "An error occurred."
    299697msgstr ""
    300698
    301 #: includes/class-admin-menu.php:432
     699#: includes/class-admin-menu.php:1077
    302700msgid "Close"
    303 msgstr ""
    304 
    305 #: includes/class-ajax-handler.php:65 includes/class-ajax-handler.php:102
    306 #: includes/class-ajax-handler.php:178 includes/class-ajax-handler.php:215
    307 #: includes/class-generic-recommendations.php:57
    308 #: includes/class-media-handler.php:80 includes/class-media-handler.php:185
    309 #: includes/class-media-handler.php:315 includes/class-media-handler.php:396
    310 #: includes/class-media-handler.php:455 includes/class-post-handler.php:68
    311 #: includes/class-post-handler.php:122 includes/class-post-handler.php:255
    312 #: includes/class-post-handler.php:333
    313 msgid "Security check failed"
    314 msgstr ""
    315 
    316 #: includes/class-ajax-handler.php:69 includes/class-ajax-handler.php:106
    317 #: includes/class-ajax-handler.php:182 includes/class-ajax-handler.php:219
    318 #: includes/class-media-handler.php:84 includes/class-media-handler.php:189
    319 #: includes/class-media-handler.php:319 includes/class-media-handler.php:400
    320 #: includes/class-media-handler.php:459 includes/class-post-handler.php:72
    321 #: includes/class-post-handler.php:126 includes/class-post-handler.php:259
    322 #: includes/class-post-handler.php:337
    323 msgid "Permission denied"
    324701msgstr ""
    325702
     
    328705msgstr ""
    329706
    330 #: includes/class-ajax-handler.php:127
     707#: includes/class-ajax-handler.php:128
    331708msgid "Failed to initialize filesystem"
    332709msgstr ""
    333710
    334 #: includes/class-ajax-handler.php:169
     711#: includes/class-ajax-handler.php:173
    335712msgid "Failed to get media statistics"
    336713msgstr ""
    337714
    338 #: includes/class-ajax-handler.php:188 includes/class-ajax-handler.php:225
     715#: includes/class-ajax-handler.php:192 includes/class-ajax-handler.php:229
    339716msgid "File not specified"
    340717msgstr ""
    341718
    342 #: includes/class-ajax-handler.php:195 includes/class-ajax-handler.php:232
     719#: includes/class-ajax-handler.php:199 includes/class-ajax-handler.php:236
    343720msgid "File not found"
    344721msgstr ""
     
    404781msgstr ""
    405782
    406 #: includes/class-media-handler.php:99
     783#: includes/class-media-handler.php:100
    407784msgid "No media files found to export"
    408785msgstr ""
    409786
    410 #: includes/class-media-handler.php:106
     787#: includes/class-media-handler.php:107
    411788msgid "Could not create export directory"
    412789msgstr ""
    413790
    414 #: includes/class-media-handler.php:114
     791#: includes/class-media-handler.php:115
    415792msgid "Could not create ZIP file"
    416793msgstr ""
    417794
    418 #: includes/class-media-handler.php:159
     795#: includes/class-media-handler.php:163
    419796msgid "No valid media files found to export"
    420797msgstr ""
    421798
    422 #: includes/class-media-handler.php:176
     799#: includes/class-media-handler.php:180
    423800msgid "Media export failed"
    424801msgstr ""
    425802
    426 #: includes/class-media-handler.php:195
     803#: includes/class-media-handler.php:199
    427804msgid "No file uploaded"
    428805msgstr ""
    429806
    430 #: includes/class-media-handler.php:199
     807#: includes/class-media-handler.php:203
    431808msgid "ZipArchive class is not available on this server"
    432809msgstr ""
    433810
    434 #: includes/class-media-handler.php:226
     811#: includes/class-media-handler.php:230
    435812msgid "Upload directory is not writable"
    436813msgstr ""
    437814
    438 #: includes/class-media-handler.php:231
     815#: includes/class-media-handler.php:235
     816#: includes/class-themes-plugins-handler.php:529
     817#: includes/class-themes-plugins-handler.php:675
    439818msgid "Failed to create temporary directory"
    440819msgstr ""
    441820
    442 #: includes/class-media-handler.php:240
     821#: includes/class-media-handler.php:244
    443822msgid "Temporary file not found or invalid"
    444823msgstr ""
    445824
    446 #: includes/class-media-handler.php:246
     825#: includes/class-media-handler.php:250
     826#: includes/class-themes-plugins-handler.php:538
     827#: includes/class-themes-plugins-handler.php:684
    447828msgid "Failed to move uploaded file"
    448829msgstr ""
    449830
    450 #: includes/class-media-handler.php:255
     831#: includes/class-media-handler.php:259
    451832#, php-format
    452833msgid "Failed to open ZIP file - file may be corrupted (Error: %d)"
    453834msgstr ""
    454835
    455 #: includes/class-media-handler.php:263
     836#: includes/class-media-handler.php:267
    456837msgid "Failed to extract ZIP contents"
    457838msgstr ""
    458839
    459 #: includes/class-media-handler.php:273
     840#: includes/class-media-handler.php:277
    460841msgid "Invalid media export file - metadata not found"
    461842msgstr ""
    462843
    463 #: includes/class-media-handler.php:282
     844#: includes/class-media-handler.php:286
    464845#, php-format
    465846msgid "Invalid JSON in metadata file: %s"
    466847msgstr ""
    467848
    468 #: includes/class-media-handler.php:290
     849#: includes/class-media-handler.php:294
    469850msgid "Invalid media data format"
    470851msgstr ""
    471852
    472 #: includes/class-media-handler.php:328
     853#: includes/class-media-handler.php:332
    473854msgid "Invalid batch ID"
    474855msgstr ""
    475856
    476 #: includes/class-media-handler.php:334
     857#: includes/class-media-handler.php:338
    477858msgid "Batch not found or expired"
    478859msgstr ""
    479860
    480 #: includes/class-media-handler.php:341
     861#: includes/class-media-handler.php:345
    481862msgid "File index not found"
    482863msgstr ""
    483864
    484 #: includes/class-media-handler.php:353
     865#: includes/class-media-handler.php:357
    485866#, php-format
    486867msgid "Source file not found: %s (looking in: %s)"
    487868msgstr ""
    488869
    489 #: includes/class-media-handler.php:364
     870#: includes/class-media-handler.php:368
    490871msgid "File already exists in media library"
    491872msgstr ""
    492873
    493 #: includes/class-media-handler.php:411
     874#: includes/class-media-handler.php:416
    494875msgid "No media files found to delete"
    495876msgstr ""
    496877
    497 #: includes/class-media-handler.php:427
     878#: includes/class-media-handler.php:435
    498879#, php-format
    499880msgid "Deleted %d media files successfully"
    500881msgstr ""
    501882
    502 #: includes/class-media-handler.php:433
     883#: includes/class-media-handler.php:441
    503884#, php-format
    504885msgid ". Failed to delete %d files."
    505886msgstr ""
    506887
    507 #: includes/class-media-handler.php:446 includes/class-post-handler.php:383
     888#: includes/class-media-handler.php:454 includes/class-page-handler.php:314
     889#: includes/class-post-handler.php:400
    508890msgid "Delete operation failed. Please try again."
    509891msgstr ""
    510892
    511 #: includes/class-media-handler.php:475
     893#: includes/class-media-handler.php:483
    512894msgid "Cleanup completed"
    513895msgstr ""
    514896
    515 #: includes/class-media-handler.php:487
     897#: includes/class-media-handler.php:495
    516898msgid "File is too large (exceeds upload_max_filesize)"
    517899msgstr ""
    518900
    519 #: includes/class-media-handler.php:489
     901#: includes/class-media-handler.php:497
    520902msgid "File is too large (exceeds MAX_FILE_SIZE)"
    521903msgstr ""
    522904
    523 #: includes/class-media-handler.php:491
     905#: includes/class-media-handler.php:499
    524906msgid "File was only partially uploaded"
    525907msgstr ""
    526908
    527 #: includes/class-media-handler.php:493
     909#: includes/class-media-handler.php:501
    528910msgid "No file was uploaded"
    529911msgstr ""
    530912
    531 #: includes/class-media-handler.php:495
     913#: includes/class-media-handler.php:503
    532914msgid "Missing temporary folder"
    533915msgstr ""
    534916
    535 #: includes/class-media-handler.php:497
     917#: includes/class-media-handler.php:505
    536918msgid "Failed to write file to disk"
    537919msgstr ""
    538920
    539 #: includes/class-media-handler.php:499
     921#: includes/class-media-handler.php:507
    540922msgid "File upload stopped by extension"
    541923msgstr ""
    542924
    543 #: includes/class-media-handler.php:501
     925#: includes/class-media-handler.php:509
    544926msgid "Unknown upload error"
    545927msgstr ""
    546928
    547 #: includes/class-media-handler.php:514
     929#: includes/class-media-handler.php:522
    548930msgid "File is too large. Maximum size is 500MB."
    549931msgstr ""
    550932
    551 #: includes/class-media-handler.php:520
     933#: includes/class-media-handler.php:528
    552934msgid "Only ZIP files are allowed"
    553935msgstr ""
    554936
    555 #: includes/class-media-handler.php:525
     937#: includes/class-media-handler.php:533
    556938msgid "Invalid file type. Only ZIP files are allowed."
    557939msgstr ""
    558940
    559 #: includes/class-media-handler.php:618
     941#: includes/class-media-handler.php:628
    560942msgid "Could not create upload directory"
    561943msgstr ""
    562944
    563 #: includes/class-media-handler.php:626
     945#: includes/class-media-handler.php:636
    564946msgid "Source file not found"
    565947msgstr ""
    566948
    567 #: includes/class-media-handler.php:630
     949#: includes/class-media-handler.php:640
    568950msgid "Source is a directory, not a file"
    569951msgstr ""
    570952
    571 #: includes/class-media-handler.php:634
     953#: includes/class-media-handler.php:644
    572954msgid "Could not copy file to upload directory"
    573955msgstr ""
    574956
    575 #: includes/class-post-handler.php:113
     957#: includes/class-page-handler.php:116 includes/class-post-handler.php:116
    576958msgid "Export failed. Please try again."
    577959msgstr ""
    578960
    579 #: includes/class-post-handler.php:134
     961#: includes/class-page-handler.php:137
     962msgid "No page data provided"
     963msgstr ""
     964
     965#: includes/class-page-handler.php:143 includes/class-page-handler.php:608
     966#: includes/class-post-handler.php:143 includes/class-post-handler.php:286
     967#: includes/class-settings-handler.php:245
     968#: includes/class-widgets-menus-handler.php:258
     969#: includes/class-widgets-menus-handler.php:298
     970#: includes/class-widgets-menus-handler.php:338
     971msgid "Invalid JSON data provided"
     972msgstr ""
     973
     974#: includes/class-page-handler.php:147
     975msgid "Invalid page data"
     976msgstr ""
     977
     978#: includes/class-page-handler.php:164
     979msgid "Page already exists"
     980msgstr ""
     981
     982#: includes/class-page-handler.php:188
     983#, php-format
     984msgid "Failed to create page: %s"
     985msgstr ""
     986
     987#: includes/class-page-handler.php:251 includes/class-post-handler.php:259
     988msgid "Import failed. Please check the file format."
     989msgstr ""
     990
     991#: includes/class-page-handler.php:276
     992msgid "No pages found to delete"
     993msgstr ""
     994
     995#: includes/class-page-handler.php:295
     996#, php-format
     997msgid "Deleted %d pages successfully"
     998msgstr ""
     999
     1000#: includes/class-page-handler.php:301
     1001#, php-format
     1002msgid ". Failed to delete %d pages."
     1003msgstr ""
     1004
     1005#: includes/class-page-handler.php:602 includes/class-post-handler.php:280
     1006msgid "No image data provided"
     1007msgstr ""
     1008
     1009#: includes/class-page-handler.php:612 includes/class-post-handler.php:290
     1010msgid "Invalid image data"
     1011msgstr ""
     1012
     1013#: includes/class-page-handler.php:617 includes/class-post-handler.php:295
     1014msgid "No filename provided"
     1015msgstr ""
     1016
     1017#: includes/class-post-handler.php:137
    5801018msgid "No post data provided"
    5811019msgstr ""
    5821020
    583 #: includes/class-post-handler.php:140 includes/class-post-handler.php:273
    584 msgid "Invalid JSON data provided"
    585 msgstr ""
    586 
    587 #: includes/class-post-handler.php:144
     1021#: includes/class-post-handler.php:147
    5881022msgid "Invalid post data"
    5891023msgstr ""
    5901024
    591 #: includes/class-post-handler.php:160
     1025#: includes/class-post-handler.php:164
    5921026msgid "Post already exists"
    5931027msgstr ""
    5941028
    595 #: includes/class-post-handler.php:178
     1029#: includes/class-post-handler.php:186
    5961030#, php-format
    5971031msgid "Failed to create post: %s"
    5981032msgstr ""
    5991033
    600 #: includes/class-post-handler.php:246
    601 msgid "Import failed. Please check the file format."
    602 msgstr ""
    603 
    604 #: includes/class-post-handler.php:267
    605 msgid "No image data provided"
    606 msgstr ""
    607 
    608 #: includes/class-post-handler.php:277
    609 msgid "Invalid image data"
    610 msgstr ""
    611 
    612 #: includes/class-post-handler.php:282
    613 msgid "No filename provided"
    614 msgstr ""
    615 
    616 #: includes/class-post-handler.php:348
     1034#: includes/class-post-handler.php:362
    6171035msgid "No posts found to delete"
    6181036msgstr ""
    6191037
    620 #: includes/class-post-handler.php:364
     1038#: includes/class-post-handler.php:381
    6211039#, php-format
    6221040msgid "Deleted %d posts successfully"
    6231041msgstr ""
    6241042
    625 #: includes/class-post-handler.php:370
     1043#: includes/class-post-handler.php:387
    6261044#, php-format
    6271045msgid ". Failed to delete %d posts."
    6281046msgstr ""
     1047
     1048#: includes/class-settings-handler.php:218
     1049msgid "Settings export failed. Please try again."
     1050msgstr ""
     1051
     1052#: includes/class-settings-handler.php:239
     1053msgid "No settings data provided"
     1054msgstr ""
     1055
     1056#: includes/class-settings-handler.php:249
     1057msgid "Invalid settings data format"
     1058msgstr ""
     1059
     1060#: includes/class-settings-handler.php:354
     1061#, php-format
     1062msgid "Settings import completed: %d imported, %d skipped, %d failed"
     1063msgstr ""
     1064
     1065#: includes/class-settings-handler.php:406
     1066msgid "Failed to get settings preview"
     1067msgstr ""
     1068
     1069#: includes/class-settings-handler.php:419
     1070msgid "Site title, tagline, admin email, timezone, date/time formats"
     1071msgstr ""
     1072
     1073#: includes/class-settings-handler.php:424
     1074msgid "Default category, post format, email posting settings"
     1075msgstr ""
     1076
     1077#: includes/class-settings-handler.php:429
     1078msgid "Homepage settings, posts per page, RSS settings, search engine visibility"
     1079msgstr ""
     1080
     1081#: includes/class-settings-handler.php:434
     1082msgid "Comments, pingbacks, avatars, moderation settings"
     1083msgstr ""
     1084
     1085#: includes/class-settings-handler.php:439
     1086msgid "Image sizes, upload folder organization"
     1087msgstr ""
     1088
     1089#: includes/class-settings-handler.php:444
     1090msgid "URL structure, category and tag bases"
     1091msgstr ""
     1092
     1093#: includes/class-settings-handler.php:449
     1094msgid "Privacy policy page"
     1095msgstr ""
     1096
     1097#: includes/class-themes-plugins-handler.php:96
     1098msgid "Failed to get themes list"
     1099msgstr ""
     1100
     1101#: includes/class-themes-plugins-handler.php:141
     1102msgid "Failed to get plugins list"
     1103msgstr ""
     1104
     1105#: includes/class-themes-plugins-handler.php:164
     1106msgid "No themes selected for export"
     1107msgstr ""
     1108
     1109#: includes/class-themes-plugins-handler.php:170
     1110msgid "Failed to create themes backup"
     1111msgstr ""
     1112
     1113#: includes/class-themes-plugins-handler.php:178
     1114#, php-format
     1115msgid "Successfully exported %d theme(s)"
     1116msgstr ""
     1117
     1118#: includes/class-themes-plugins-handler.php:184
     1119msgid "Themes export failed. Please try again."
     1120msgstr ""
     1121
     1122#: includes/class-themes-plugins-handler.php:207
     1123msgid "No plugins selected for export"
     1124msgstr ""
     1125
     1126#: includes/class-themes-plugins-handler.php:213
     1127msgid "Failed to create plugins backup"
     1128msgstr ""
     1129
     1130#: includes/class-themes-plugins-handler.php:221
     1131#, php-format
     1132msgid "Successfully exported %d plugin(s)"
     1133msgstr ""
     1134
     1135#: includes/class-themes-plugins-handler.php:227
     1136msgid "Plugins export failed. Please try again."
     1137msgstr ""
     1138
     1139#: includes/class-themes-plugins-handler.php:245
     1140#: includes/class-themes-plugins-handler.php:279
     1141msgid "No file uploaded or upload error"
     1142msgstr ""
     1143
     1144#: includes/class-themes-plugins-handler.php:261
     1145msgid "Themes import failed. Please try again."
     1146msgstr ""
     1147
     1148#: includes/class-themes-plugins-handler.php:295
     1149msgid "Plugins import failed. Please try again."
     1150msgstr ""
     1151
     1152#: includes/class-themes-plugins-handler.php:519
     1153#: includes/class-themes-plugins-handler.php:665
     1154msgid "ZipArchive class not available"
     1155msgstr ""
     1156
     1157#: includes/class-themes-plugins-handler.php:547
     1158#: includes/class-themes-plugins-handler.php:693
     1159msgid "Failed to open ZIP file"
     1160msgstr ""
     1161
     1162#: includes/class-themes-plugins-handler.php:630
     1163#, php-format
     1164msgid "Themes import completed: %d imported, %d skipped, %d failed"
     1165msgstr ""
     1166
     1167#: includes/class-themes-plugins-handler.php:637
     1168#, php-format
     1169msgid ". Activated theme: %s"
     1170msgstr ""
     1171
     1172#: includes/class-themes-plugins-handler.php:779
     1173#, php-format
     1174msgid "Plugins import completed: %d imported, %d skipped, %d failed"
     1175msgstr ""
     1176
     1177#: includes/class-themes-plugins-handler.php:786
     1178#, php-format
     1179msgid ". Activated %d plugin(s)"
     1180msgstr ""
     1181
     1182#: includes/class-widgets-menus-handler.php:156
     1183msgid "Widgets exported successfully"
     1184msgstr ""
     1185
     1186#: includes/class-widgets-menus-handler.php:160
     1187msgid "Widgets export failed. Please try again."
     1188msgstr ""
     1189
     1190#: includes/class-widgets-menus-handler.php:183
     1191msgid "Navigation menus exported successfully"
     1192msgstr ""
     1193
     1194#: includes/class-widgets-menus-handler.php:187
     1195msgid "Navigation menus export failed. Please try again."
     1196msgstr ""
     1197
     1198#: includes/class-widgets-menus-handler.php:226
     1199msgid "Widgets and navigation menus exported successfully"
     1200msgstr ""
     1201
     1202#: includes/class-widgets-menus-handler.php:230
     1203msgid "Widgets and menus export failed. Please try again."
     1204msgstr ""
     1205
     1206#: includes/class-widgets-menus-handler.php:252
     1207msgid "No widgets data provided"
     1208msgstr ""
     1209
     1210#: includes/class-widgets-menus-handler.php:292
     1211msgid "No menus data provided"
     1212msgstr ""
     1213
     1214#: includes/class-widgets-menus-handler.php:332
     1215msgid "No data provided"
     1216msgstr ""
     1217
     1218#: includes/class-widgets-menus-handler.php:358
     1219#, php-format
     1220msgid "Import completed: %d widgets and %d menus imported"
     1221msgstr ""
     1222
     1223#: includes/class-widgets-menus-handler.php:492
     1224msgid "No widgets data found"
     1225msgstr ""
     1226
     1227#: includes/class-widgets-menus-handler.php:545
     1228#, php-format
     1229msgid "Widgets import completed: %d imported, %d skipped, %d failed"
     1230msgstr ""
     1231
     1232#: includes/class-widgets-menus-handler.php:574
     1233msgid "No menus data found"
     1234msgstr ""
     1235
     1236#: includes/class-widgets-menus-handler.php:642
     1237#, php-format
     1238msgid "Navigation menus import completed: %d imported, %d skipped, %d failed"
     1239msgstr ""
  • post-export-import-with-media/trunk/post-export-import-with-media.php

    r3418865 r3425395  
    33 * Plugin Name: Post Export Import with Media
    44 *
    5  * @author            sambyte
    6  * @copyright         2024- sambyte
     5 * @author            wpazleen
     6 * @copyright         2024- wpazleen
    77 * @license           GPL-2.0-or-later
    88 * @package           Post_Export_Import_With_Media
     
    1212 * Plugin URI: https://wordpress.org/plugins/post-export-import-with-media/
    1313 * Description: Post Export Import with Media: A secure plugin to export and import WordPress posts and media files with real-time progress.
    14  * Version:           1.1.0
     14 * Version:           1.2.0
    1515 * Requires at least: 6.7
    1616 * Requires PHP:      7.4
    17  * Author:            sambyte
    18  * Author URI:        https://profiles.wordpress.org/sambyte/
     17 * Author:            wpazleen
     18 * Author URI:        https://profiles.wordpress.org/wpazleen/
    1919 * Text Domain:       post-export-import-with-media
    2020 * Domain Path: /languages/
     
    3030// Define plugin constants for better maintainability
    3131if ( ! defined( 'PEIWM_VERSION' ) ) {
    32     define( 'PEIWM_VERSION', '1.1.0' );
     32    define( 'PEIWM_VERSION', '1.2.0' );
    3333}
    3434
  • post-export-import-with-media/trunk/readme.txt

    r3418865 r3425395  
    11=== Post Export Import with Media ===
    2 Contributors: sambyte
    3 Tags: export-media, media, post-export
     2Contributors: wpazleen, sambyte
     3Tags: export-media, import, post-export, page-export, migration
    44Requires at least: 6.7
    55Tested up to: 6.9
    66Requires PHP: 7.4
    7 Stable Tag: 1.1.0
     7Stable Tag: 1.2.0
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
    1010
    11 Easily export and import WP posts with their media files- secure, fast, and with real-time progress.
     11Easily export and import WP posts, pages, media, widgets, menus, themes, plugins & settings with their media files- secure, fast, and with real-time progress.
    1212
    1313== Description ==
    14 **Post Export Import with Media** is a simple yet powerful WordPress plugin that helps you securely transfer posts along with their media files between WordPress sites. Unlike the default exporter, this plugin ensures that images and attachments are included, so you don’t end up with broken links or missing media. 
     14**Post Export Import with Media** is a simple yet powerful WordPress plugin that helps you securely transfer posts, pages, media, widgets, menus, themes, plugins & settings along with their media files between WordPress sites. Unlike the default exporter, this plugin ensures that images and attachments are included, so you don’t end up with broken links or missing media. 
     15
     16Whether you're moving to a new host, creating staging sites, or backing up your content, this plugin handles everything with professional-grade reliability and user-friendly interface.
    1517
    1618### ✨ Key Features 
    17 - Export and import posts with all attached media files 
     19- Export and import posts with all attached media files, metadata, categories, tags, and custom fields 
     20- Automatic media file detection and download during import
    1821- Real-time progress tracking for smooth migration 
     22- Smart image handling - reuses existing media, downloads missing files
     23- Support for featured images and inline content images
     24- Bulk delete functionality with confirmation dialogs
    1925- Secure data handling to prevent errors or data loss 
    2026- Lightweight and beginner-friendly interface 
    2127- Works for bloggers, developers, and site administrators 
    2228
    23 Whether you’re moving a blog to a new domain, setting up a staging site, or backing up your posts with media, this plugin makes the process seamless and reliable. 
     29#### **Pages Export/Import**
     30* Complete page hierarchy preservation
     31* Template assignments and page metadata
     32* Featured images and content images handling
     33* Parent-child page relationships maintained
     34* Custom page attributes and settings
     35
     36#### **WordPress Settings Backup**
     37* 7 settings categories: General, Writing, Reading, Discussion, Media, Permalinks, Privacy
     38* Site icon export/import with URL information
     39* Selective import - choose which settings to import
     40* Detailed import logs showing success/failure for each setting
     41* Handles deprecated WordPress options automatically
     42
     43#### **Widgets & Navigation Menus**
     44* Complete widget configuration export/import
     45* Widget positions and sidebar assignments
     46* Navigation menu structure with all items
     47* Menu locations and theme assignments
     48* Menu item hierarchy and custom properties
     49* Support for all widget types including custom HTML, media widgets
     50
     51#### **Themes & Plugins Backup**
     52* Export active theme, all themes, or selected themes
     53* Export active plugins, all plugins, or selected plugins
     54* ZIP file creation with proper directory structure
     55* Import with replace existing or keep both options
     56* Automatic theme/plugin activation after import
     57
     58#### **Advanced Admin Features**
     59* **Admin Download Buttons** - Add download buttons to WordPress themes.php and plugins.php pages
     60* **Media Statistics** - Comprehensive media library analysis with file types, sizes, and usage
     61* **System Configuration Test** - Check server capabilities and requirements
     62* **Plugin Recommendations** - Curated list of useful WordPress plugins
     63
     64### 🎯 **Perfect For**
     65
     66* **Web Developers** - Quickly clone sites for development and testing
     67* **Site Migrations** - Move WordPress sites between hosts seamlessly 
     68* **Backup Solutions** - Create complete site backups including media
     69* **Staging Sites** - Duplicate production sites for safe testing
     70* **Client Handoffs** - Package complete sites for client delivery
     71* **Multi-site Management** - Sync content between multiple WordPress installations
     72
     73### 🔧 **Technical Excellence**
     74
     75* **Security First** - All operations use WordPress nonces and capability checks
     76* **Memory Efficient** - Handles large sites without memory issues
     77* **Cross-Platform** - Works on Windows, Linux, and macOS servers
     78* **Error Recovery** - Comprehensive error handling and user feedback
     79* **Progress Tracking** - Real-time updates during long operations
     80* **Clean Code** - Well-documented, maintainable codebase following WordPress standards
     81
     82### 📊 **Real-time Progress & Logging**
     83
     84Every operation provides detailed feedback:
     85* Progress bars showing completion percentage
     86* Timestamped logs with success/warning/error indicators
     87* Detailed statistics (items imported, skipped, failed)
     88* Clear error messages with actionable solutions
     89* Import/export summaries with file information
     90
     91### 🎨 **User Experience**
     92
     93* **Intuitive Interface** - Clean, modern admin interface
     94* **Responsive Design** - Works perfectly on desktop and mobile
     95* **Modal Confirmations** - Safe operations with confirmation dialogs
     96* **Detailed Help** - Comprehensive descriptions and usage instructions
     97* **Professional Styling** - Matches WordPress admin design language
    2498
    2599
     
    58132== Changelog ==
    59133
     134### 1.2.0 – 22 Dec 2025
     135- **WordPress Pages Export & Import**
     136  - Export WordPress pages
     137  - Import pages into any WordPress site without data loss
     138  - Preserves page content, titles, and other structure
     139  - Ideal for site migration, staging, and backups
     140
     141- **WordPress Settings Export & Import**
     142  - Backup and restore core WordPress settings
     143  - Quickly replicate configurations across multiple sites
     144  - Useful for development, testing, and production environments
     145
     146- **Widgets & Navigation Menus Export & Import**
     147  - Export all active widgets and sidebar configurations
     148  - Backup navigation menus and menu locations
     149  - Seamlessly restore widgets and menus on another site
     150
     151- **Themes & Plugins Backup**
     152  - Create backups of installed WordPress themes and plugins
     153  - Add download buttons to WordPress themes and plugins pages to download in one click
     154  - Restore themes and plugins in case of accidental deletion or site failure
     155  - Simplifies site recovery and version management
     156
    60157### 1.1.0 – 13 Dec 2025
    61158- **New:** Download missing images from original URLs
Note: See TracChangeset for help on using the changeset viewer.