Plugin Directory

Changeset 3319569


Ignore:
Timestamp:
06/29/2025 08:27:36 PM (9 months ago)
Author:
pattihis
Message:

Version 2.1.3

Location:
link-juice-keeper
Files:
29 added
18 edited

Legend:

Unmodified
Added
Removed
  • link-juice-keeper/trunk/admin/class-link-juice-keeper-admin.php

    r3020198 r3319569  
    99 * @subpackage Link_Juice_Keeper/admin
    1010 */
     11
     12if ( ! defined( 'ABSPATH' ) ) {
     13    exit; // Exit if accessed directly.
     14}
    1115
    1216/**
     
    133137     *
    134138     * @param mixed $option Option name.
    135      * @param mixed $default Default value if not exist.
     139     * @param mixed $def_value Default value if not exist.
    136140     *
    137141     * @since  2.0.0
     
    140144     * @return string|array
    141145     */
    142     public function link_juice_keeper_get_option( $option = false, $default = false ) {
     146    public function link_juice_keeper_get_option( $option = false, $def_value = false ) {
    143147
    144148        if ( ! $option ) {
    145             return $default;
     149            return $def_value;
    146150        }
    147151
     
    151155        // Return false, if not exist.
    152156        if ( empty( $settings[ $option ] ) ) {
    153             return $default;
     157            return $def_value;
    154158        }
    155159
  • link-juice-keeper/trunk/admin/class-link-juice-keeper-logs.php

    r3020198 r3319569  
    1010 * @author     George Pattihis <gpattihis@gmail.com>
    1111 */
     12
     13if ( ! defined( 'ABSPATH' ) ) {
     14    exit; // Exit if accessed directly.
     15}
    1216
    1317// Load base class if it doesn't exist.
     
    849853     *
    850854     * @param string $key Key to get from request.
    851      * @param mixed  $default Default value.
     855     * @param mixed  $def_value Default value.
    852856     *
    853857     * @since  2.0.0
     
    856860     * @return array|string
    857861     */
    858     public function link_juice_keeper_from_request( $key = '', $default = '' ) {
     862    public function link_juice_keeper_from_request( $key = '', $def_value = '' ) {
    859863
    860864        // Return default value if key is not given.
    861865        if ( empty( $key ) || ! is_string( $key ) ) {
    862             return $default;
     866            return $def_value;
    863867        }
    864868
     
    866870        // Return default value if key not set.
    867871        if (!isset($_REQUEST[$key])) {
    868             return $default;
     872            return $def_value;
    869873        }
    870874
     
    877881        //phpcs:enable
    878882
    879         return $default;
     883        return $def_value;
    880884    }
    881885
  • link-juice-keeper/trunk/admin/css/link-juice-keeper-admin.css

    r3020198 r3319569  
    11.ljk_main_header {
    2   background: white;
    3   border-radius: 8px;
    4   padding: 10px;
    5   max-width: 580px;
    6   margin: 16px 0;
     2    background: white;
     3    border-radius: 8px;
     4    padding: 10px;
     5    max-width: 580px;
     6    margin: 16px 0;
    77}
    88
    99.ljk_main_wrap {
    10   display: flex;
    11   flex-direction: row;
    12   justify-content: space-between;
    13   max-width: 1000px;
     10    display: flex;
     11    flex-direction: row;
     12    justify-content: space-between;
     13    max-width: 1000px;
    1414}
    1515
    1616.ljk_main_left {
    17   background: #ffffff;
    18   border-radius: 8px;
    19   padding: 0 16px;
    20   width: 600px;
     17    background: #ffffff;
     18    border-radius: 8px;
     19    padding: 0 16px;
     20    width: 600px;
    2121}
    2222
    2323.ljk_main_right {
    24   background: #ffffff;
    25   border-radius: 8px;
    26   padding: 16px;
    27   width: 380px;
    28   margin-left: 20px;
     24    background: #ffffff;
     25    border-radius: 8px;
     26    padding: 16px;
     27    width: 380px;
     28    margin-left: 20px;
    2929}
    3030
    3131.ljk_main_right h4 {
    32   text-decoration: underline;
     32    text-decoration: underline;
    3333}
    3434
    3535@media only screen and (max-width: 992px) {
    36   .ljk_main_header {
    37     max-width: unset;
    38     margin-right: 20px;
    39   }
     36    .ljk_main_header {
     37    max-width: unset;
     38    margin-right: 20px;
     39    }
    4040
    41   .ljk_main_wrap {
    42     flex-direction: column;
    43   }
     41    .ljk_main_wrap {
     42    flex-direction: column;
     43    }
    4444
    45   .ljk_main_left,
    46   .ljk_main_right {
    47     margin: 0 20px 30px 0;
    48     width: unset;
    49   }
     45    .ljk_main_left,
     46    .ljk_main_right {
     47    margin: 0 20px 30px 0;
     48    width: unset;
     49    }
    5050}
  • link-juice-keeper/trunk/admin/index.php

    r3008511 r3319569  
    1 <?php //phpcs:ignore
    2 // Silence is golden
     1<?php
     2/**
     3 * Silence is golden.
     4 */
  • link-juice-keeper/trunk/admin/js/link-juice-keeper-admin.js

    r3008511 r3319569  
    11(function ($) {
    22    'use strict';
    3     window.addEventListener("load", function (event) {
     3    window.addEventListener(
     4        "load",
     5        function (event) {
    46
    5         if ($('.ljk_main_wrap').length) {
    6             toggleOptions();
    7             $('#ljk_redirect_to').change(function () {
     7            if ($( '.ljk_main_wrap' ).length) {
    88                toggleOptions();
    9             });
     9                $( '#ljk_redirect_to' ).change(
     10                    function () {
     11                        toggleOptions();
     12                    }
     13                );
     14            }
     15
    1016        }
    11 
    12 
    13     });
     17    );
    1418
    1519    function toggleOptions() {
    16         $('#custom_page').hide();
    17         $('#custom_post').hide();
    18         $('#custom_url').hide();
    19         var set = $('#ljk_redirect_to').val();
     20        $( '#custom_page' ).hide();
     21        $( '#custom_post' ).hide();
     22        $( '#custom_url' ).hide();
     23        var set = $( '#ljk_redirect_to' ).val();
    2024        switch (set) {
    2125            case 'page':
    22                 $('#custom_page').show();
     26                $( '#custom_page' ).show();
    2327                break;
    2428            case 'post':
    25                 $('#custom_post').show();
     29                $( '#custom_post' ).show();
    2630                break;
    2731            case 'link':
    28                 $('#custom_url').show();
     32                $( '#custom_url' ).show();
    2933                break;
    3034        }
    3135    }
    3236
    33 })(jQuery);
     37})( jQuery );
  • link-juice-keeper/trunk/admin/partials/link-juice-keeper-admin-display-logs.php

    r3020198 r3319569  
    1111 * @subpackage Link_Juice_Keeper/admin/partials
    1212 */
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    exit; // Exit if accessed directly.
     16}
    1317
    1418global $wpdb;
  • link-juice-keeper/trunk/admin/partials/link-juice-keeper-admin-display.php

    r3020198 r3319569  
    1111 * @subpackage Link_Juice_Keeper/admin/partials
    1212 */
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    exit; // Exit if accessed directly.
     16}
    1317
    1418$plugin_admin = new Link_Juice_Keeper_Admin( 'link-juice-keeper', LINK_JUICE_KEEPER_VERSION );
  • link-juice-keeper/trunk/includes/class-link-juice-keeper-activator.php

    r3008511 r3319569  
    99 * @subpackage Link_Juice_Keeper/includes
    1010 */
     11
     12if ( ! defined( 'ABSPATH' ) ) {
     13    exit; // Exit if accessed directly.
     14}
    1115
    1216/**
  • link-juice-keeper/trunk/includes/class-link-juice-keeper-deactivator.php

    r3008511 r3319569  
    99 * @subpackage Link_Juice_Keeper/includes
    1010 */
     11
     12if ( ! defined( 'ABSPATH' ) ) {
     13    exit; // Exit if accessed directly.
     14}
    1115
    1216/**
  • link-juice-keeper/trunk/includes/class-link-juice-keeper-i18n.php

    r3008511 r3319569  
    1212 * @subpackage Link_Juice_Keeper/includes
    1313 */
     14
     15if ( ! defined( 'ABSPATH' ) ) {
     16    exit; // Exit if accessed directly.
     17}
    1418
    1519/**
  • link-juice-keeper/trunk/includes/class-link-juice-keeper-loader.php

    r3008511 r3319569  
    99 * @subpackage Link_Juice_Keeper/includes
    1010 */
     11
     12if ( ! defined( 'ABSPATH' ) ) {
     13    exit; // Exit if accessed directly.
     14}
    1115
    1216/**
  • link-juice-keeper/trunk/includes/class-link-juice-keeper.php

    r3199998 r3319569  
    1212 * @subpackage Link_Juice_Keeper/includes
    1313 */
     14
     15if ( ! defined( 'ABSPATH' ) ) {
     16    exit; // Exit if accessed directly.
     17}
    1418
    1519/**
     
    7074            $this->version = LINK_JUICE_KEEPER_VERSION;
    7175        } else {
    72             $this->version = '2.1.2';
     76            $this->version = '2.1.3';
    7377        }
    7478        $this->plugin_name = 'link-juice-keeper';
     
    102106         * core plugin.
    103107         */
    104         require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-link-juice-keeper-loader.php';
     108        require_once plugin_dir_path( __DIR__ ) . 'includes/class-link-juice-keeper-loader.php';
    105109
    106110        /**
     
    108112         * of the plugin.
    109113         */
    110         require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-link-juice-keeper-i18n.php';
     114        require_once plugin_dir_path( __DIR__ ) . 'includes/class-link-juice-keeper-i18n.php';
    111115
    112116        /**
    113117         * The class responsible for defining all actions that occur in the admin area.
    114118         */
    115         require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-link-juice-keeper-admin.php';
     119        require_once plugin_dir_path( __DIR__ ) . 'admin/class-link-juice-keeper-admin.php';
    116120
    117121        /**
    118122         * The class responsible for displaying logs in a WP_List_Table format
    119123         */
    120         require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-link-juice-keeper-logs.php';
     124        require_once plugin_dir_path( __DIR__ ) . 'admin/class-link-juice-keeper-logs.php';
    121125
    122126        /**
     
    124128         * side of the site.
    125129         */
    126         require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-link-juice-keeper-public.php';
     130        require_once plugin_dir_path( __DIR__ ) . 'public/class-link-juice-keeper-public.php';
    127131
    128132        $this->loader = new Link_Juice_Keeper_Loader();
  • link-juice-keeper/trunk/includes/index.php

    r2530197 r3319569  
    1 <?php // Silence is golden
     1<?php
     2/**
     3 * Silence is golden.
     4 */
  • link-juice-keeper/trunk/index.php

    r3008511 r3319569  
    1 <?php //phpcs:ignore
    2 // Silence is golden
     1<?php
     2/**
     3 * Silence is golden.
     4 */
  • link-juice-keeper/trunk/link-juice-keeper.php

    r3199998 r3319569  
    1414 * Plugin URI:        https://wordpress.org/plugins/link-juice-keeper/
    1515 * Description:       Improve your SEO and keep your link juice by automatically redirecting all 404 errors to any page/post/url. User friendly options and log feature.
    16  * Version:           2.1.2
     16 * Version:           2.1.3
    1717 * Requires at least: 5.3.0
    18  * Tested up to:      6.7.1
     18 * Tested up to:      6.8
    1919 * Requires PHP:      7.2
    2020 * Author:            George Pattichis
     
    6868 * Current plugin version.
    6969 */
    70 define( 'LINK_JUICE_KEEPER_VERSION', '2.1.2' );
     70define( 'LINK_JUICE_KEEPER_VERSION', '2.1.3' );
    7171
    7272/**
  • link-juice-keeper/trunk/public/class-link-juice-keeper-public.php

    r3008724 r3319569  
    99 * @subpackage Link_Juice_Keeper/public
    1010 */
     11
     12if ( ! defined( 'ABSPATH' ) ) {
     13    exit; // Exit if accessed directly.
     14}
    1115
    1216/**
  • link-juice-keeper/trunk/public/index.php

    r3008511 r3319569  
    1 <?php //phpcs:ignore
    2 // Silence is golden
     1<?php
     2/**
     3 * Silence is golden.
     4 */
  • link-juice-keeper/trunk/readme.txt

    r3199998 r3319569  
    11=== Link Juice Keeper ===
    22Contributors: pattihis
    3 Tags: 404, not found, link, links, error, redirect, seo
     3Tags: 404, redirect, seo, link, error
    44Donate link: https://profiles.wordpress.org/pattihis/
    55Requires at least: 5.3.0
    6 Tested up to: 6.7.1
     6Tested up to: 6.8
    77Requires PHP: 7.2
    8 Stable tag: 2.1.2
     8Stable tag: 2.1.3
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    7272
    7373= 2.1.2 =
     74* Ensure compatibility with WP 6.8
     75* Reduced tags to the 5 most useful and relevant ones
     76* Ensured full WordPress coding standards compliance (PHPCS)
     77
     78= 2.1.2 =
    7479* Compatibility with WordPress 6.7
    7580
Note: See TracChangeset for help on using the changeset viewer.