Plugin Directory

Changeset 3330746


Ignore:
Timestamp:
07/19/2025 10:48:40 PM (8 months ago)
Author:
demispatti
Message:

Updated the code

Location:
cb-parallax/trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • cb-parallax/trunk/admin/includes/class-contextual-help.php

    r3330678 r3330746  
    113113            ));
    114114       
    115         $current_screen->set_help_sidebar(AdminPartials\cb_parallax_help_sidebar_display::help_sidebar_display($this->domain, $current_screen));
     115        $current_screen->set_help_sidebar(AdminPartials\cb_parallax_help_sidebar_display::help_sidebar_display($current_screen));
    116116    }
    117117}
  • cb-parallax/trunk/admin/includes/class-localisation.php

    r3330682 r3330746  
    128128        }
    129129       
    130         $post_data = null;
    131130        $options = null;
    132131        $pattern = '/cb_parallax_/';
  • cb-parallax/trunk/admin/menu/includes/class-ajax.php

    r3330678 r3330746  
    4747     * @access   protected
    4848     */
    49     protected $nonce_error_text;
     49    protected ?string $nonce_error_text;
    5050   
    5151    /**
  • cb-parallax/trunk/admin/menu/includes/class-options.php

    r3330683 r3330746  
    207207        $output = array();
    208208       
    209         foreach ($input as $option_key => $value) {
     209        foreach ($input as $value) {
    210210            // Remove the file extension
    211211            $name = preg_replace(array(
  • cb-parallax/trunk/admin/menu/includes/class-validation.php

    r3330678 r3330746  
    149149        $options_meta = $this->options->get_options_arguments('image');
    150150        $data = array();
    151         $validation_value = null;
    152151        $rgba_pattern = '/(^[a-zA-Z]+$)|(#(?:[0-9a-f]{2}){2,4}|#[0-9a-f]{3}|(?:rgba?|hsla?)\((?:\d+%?(?:deg|rad|grad|turn)?(?:,|\s)+){2,3}[\s\/]*[\d\.]+%?\))/i';
    153152        $url_pattern = '/^(http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)?[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?$/i';
  • cb-parallax/trunk/admin/partials/class-help-sidebar-display.php

    r3330683 r3330746  
    2525     * Returns a string containing the content of the 'Help Sidebar'.
    2626     *
    27      * @param string     $domain
    2827     * @param \WP_Screen $current_screen
    2928     *
     
    3130     * @since 0.9.0
    3231     */
    33     public static function help_sidebar_display(string $domain, WP_Screen $current_screen) : string
     32    public static function help_sidebar_display(WP_Screen $current_screen) : string
    3433    {
    3534        $html = $current_screen->get_help_sidebar();
  • cb-parallax/trunk/admin/partials/class-settings-display.php

    r3330678 r3330746  
    136136     * @return string $html
    137137     */
    138     public function get_hidden_fields_display($attachment_id, string $url, $canParallax, $parallax_enabled) : string
     138    public function get_hidden_fields_display(string $attachment_id, string $url, $canParallax, $parallax_enabled) : string
    139139    {
    140140        ob_start();
     
    322322                        data-key="<?php echo $option_key; ?>"
    323323                        data-input="cb-parallax" id="<?php echo 'cb_parallax_options' ?>[<?php echo $option_key; ?>]">
    324                     <?php foreach ($select_values as $key => $select_value) { ?>
     324                    <?php foreach ($select_values as $select_value) { ?>
    325325                        <option value="<?php echo $select_value ?>" <?php echo selected($value, $select_value, false); ?> ><?php echo translate($select_value, $this->domain); ?></option>
    326326                    <?php } ?>
  • cb-parallax/trunk/includes/class-cb-parallax-upgrade.php

    r3330678 r3330746  
    223223                // Fill missing options
    224224                $option_keys = $this->options->get_all_option_keys('image');
    225                 foreach ($option_keys as $i => $option_key) {
     225                foreach ($option_keys as $option_key) {
    226226                    if (!in_array($post_meta[$option_key], $post_meta)) {
    227227                        $post_meta[$option_key] = $default_plugin_options[$option_key];
  • cb-parallax/trunk/public/class-public.php

    r3330678 r3330746  
    129129    public function enqueue_styles() : void
    130130    {
    131         /**
    132          * @var \WP_Post $post
    133          */ global $post;
    134        
    135         // If there is no image at all, we stop here
    136         /*if (false === (new MenuIncludes\cb_parallax_options($this->domain))->determine_image_source()) {
    137             return;
    138         }*/
    139        
    140         //$this->set_plugin_options($post);
    141        
    142131        wp_enqueue_style('cb-parallax-public-css', CBPARALLAX_ROOT_URL.'public/css/public.css', [], $this->version);
    143132    }
  • cb-parallax/trunk/public/includes/class-public-localisation.php

    r3330682 r3330746  
    214214     * @return array $image_data
    215215     */
    216     private function get_image_data($attachment_id) : array
     216    private function get_image_data(string $attachment_id) : array
    217217    {
    218218        $image_data = array();
Note: See TracChangeset for help on using the changeset viewer.