Plugin Directory

Changeset 3330681


Ignore:
Timestamp:
07/19/2025 04:32:55 PM (9 months ago)
Author:
demispatti
Message:

Updated the code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cb-parallax/trunk/admin/menu/includes/class-options.php

    r3330678 r3330681  
    702702     * @return array
    703703     */
    704     public function get_plugin_options($post = false) : array
     704    public function get_plugin_options($post) : array
    705705    {
    706706        global $post;
     
    979979     * @return array $image_options
    980980     */
    981     public function get_image_options($post = false) : array
     981    public function get_image_options($post) : array
    982982    {
    983983        global $post;
     
    988988        $is_post = is_a($post, 'WP_Post');
    989989        $post_meta = $is_post ? get_post_meta($post->ID, 'cb_parallax', true) : false;
     990       
    990991        $source_type = 'none';
    991        
    992992        if ($parallax_enabled) {
    993993            $source_type = 'global';
     
    996996            $source_type = 'per_post';
    997997        }
    998 
    999         if ('per_post' === $source_type) {
     998       
     999        if ('per_post' === $source_type && false !== $post_meta) {
    10001000            $options = array_merge($options, $post_meta);
    10011001        }
Note: See TracChangeset for help on using the changeset viewer.