Plugin Directory

Changeset 3330678


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

Updated the code

Location:
cb-parallax/trunk
Files:
21 edited

Legend:

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

    r3330672 r3330678  
    132132     * @return void
    133133     */
    134     private function include_post_type_support()
     134    private function include_post_type_support() : void
    135135    {
    136136        $post_type_support = new AdminIncludes\cb_parallax_post_type_support();
     
    144144     * @since 0.9.0
    145145     */
    146     public function add_hooks()
     146    public function add_hooks() : void
    147147    {
    148148        $stored_options = get_option('cb_parallax_options');
     
    185185     * @return void
    186186     */
    187     private function include_theme_support()
     187    private function include_theme_support() : void
    188188    {
    189189        $wp_support = new AdminIncludes\cb_parallax_theme_support();
     
    196196     * @return void
    197197     */
    198     private function include_contextual_help()
     198    private function include_contextual_help() : void
    199199    {
    200200        $Help_Tab = new AdminIncludes\cb_parallax_contextual_help($this->domain);
     
    207207     * @return void
    208208     */
    209     private function include_settings_page()
     209    private function include_settings_page() : void
    210210    {
    211211        $menu = new AdminMenu\cb_parallax_settings_page($this->domain, $this->screen_ids, $this->options);
     
    218218     * @return void
    219219     */
    220     private function include_ajax_functionality()
     220    private function include_ajax_functionality() : void
    221221    {
    222222        $ajax = new MenuIncludes\cb_parallax_ajax($this->domain, $this->options);
     
    230230     * @since 0.9.0
    231231     */
    232     public function enqueue_styles()
     232    public function enqueue_styles() : void
    233233    {
    234234        $screen = get_current_screen();
     
    260260     * @since 0.9.0
    261261     */
    262     public function enqueue_scripts()
     262    public function enqueue_scripts() : void
    263263    {
    264264        $screen = get_current_screen();
     
    322322     * @return void
    323323     */
    324     public function include_meta_box()
     324    public function include_meta_box() : void
    325325    {
    326326        $meta_box = new AdminIncludes\cb_parallax_meta_box($this->domain, $this->screen_ids, $this->options);
     
    333333     * @return void
    334334     */
    335     public function include_script_localisation()
     335    public function include_script_localisation() : void
    336336    {
    337337        $script_localisation = new AdminIncludes\cb_parallax_localisation($this->domain, $this->screen_ids, $this->options);
     
    347347     * @return array $meta
    348348     */
    349     public function filter_plugin_row_meta(array $meta, string $file)
     349    public function filter_plugin_row_meta(array $meta, string $file) : array
    350350    {
    351351        $plugin = plugin_basename('cb-parallax/cb-parallax.php');
     
    364364     * and runs it.
    365365     */
    366     public function run_cb_parallax_upgrade()
     366    public function run_cb_parallax_upgrade() : void
    367367    {
    368368        $upgrader = new Includes\cb_parallax_upgrade($this->domain, $this->version);
  • cb-parallax/trunk/admin/includes/class-contextual-help.php

    r3330670 r3330678  
    6262     * @since 0.9.0
    6363     */
    64     private function initialize()
     64    private function initialize() : void
    6565    {
    6666        add_action("load-{$GLOBALS['pagenow']}", array(
     
    7676     * @since 0.9.0
    7777     */
    78     public function add_hooks()
     78    public function add_hooks() : void
    7979    {
    8080        add_action('in_admin_header', array(
     
    103103     * @since 0.9.0
    104104     */
    105     public function add_contextual_help()
     105    public function add_contextual_help() : void
    106106    {
    107107        $current_screen = get_current_screen();
  • cb-parallax/trunk/admin/includes/class-localisation.php

    r3330672 r3330678  
    4040     * @var array $screen_ids
    4141     */
    42     private $screen_ids;
     42    private array $screen_ids;
    4343   
    4444    /**
     
    8585     * @since 0.9.0
    8686     */
    87     public function add_hooks()
     87    public function add_hooks() : void
    8888    {
    8989        if (is_admin()) {
     
    108108     * @param bool false | \WP_Post $post
    109109     */
    110     public function retrieve_image_options()
     110    public function retrieve_image_options() : void
    111111    {
    112112        $current_screen = get_current_screen();
     
    192192     * @return void
    193193     */
    194     public function localize()
     194    public function localize() : void
    195195    {
    196196        global $post;
     
    240240     * @param bool false | WP_Post $post
    241241     */
    242     private function set_plugin_options($post = false)
     242    private function set_plugin_options($post = false) : void
    243243    {
    244244        $this->plugin_options = $this->options->get_plugin_options($post);
     
    250250     * @param bool false | \WP_Post $post
    251251     */
    252     private function set_image_options($post = false)
     252    private function set_image_options($post = false) : void
    253253    {
    254254        $this->image_options = $this->options->get_image_options($post);
     
    263263     * @return array $image_data
    264264     */
    265     private function get_image_data($attachment_id)
     265    private function get_image_data($attachment_id) : array
    266266    {
    267267        $image_data = null;
     
    285285     * @return array
    286286     */
    287     public function get_strings()
     287    public function get_strings() : array
    288288    {
    289289        return array_merge(array(
     
    326326     * @return string $image_data javascript-conform value for true or false
    327327     */
    328     private function can_parallax(array $image_data)
     328    private function can_parallax(array $image_data) : string
    329329    {
    330330        $min_width = '1080';
     
    340340     * @return void
    341341     */
    342     public function localize_media_frame()
     342    public function localize_media_frame() : void
    343343    {
    344344        wp_localize_script('cb-parallax-settings-display-js', 'cbParallaxMediaFrame', array(
  • cb-parallax/trunk/admin/includes/class-meta-box.php

    r3330673 r3330678  
    8484     * @var      array $screen_ids
    8585     */
    86     private $screen_ids;
     86    private array $screen_ids;
    8787   
    8888    /**
     
    9393     * @param MenuIncludes\cb_parallax_options $options
    9494     */
    95     public function __construct(string $domain, $screen_ids, MenuIncludes\cb_parallax_options $options)
     95    public function __construct(string $domain, array $screen_ids, MenuIncludes\cb_parallax_options $options)
    9696    {
    9797        $this->domain = $domain;
     
    114114     * @since 0.9.0
    115115     */
    116     public function add_hooks()
     116    public function add_hooks() : void
    117117    {
    118118        //add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
     
    144144     * @return void
    145145     */
    146     private function retrieve_options()
     146    private function retrieve_options() : void
    147147    {
    148148        $this->allowed_image_options = $this->options->get_image_options_whitelist();
     
    153153     * Adds the actions that add the meta box and add the callback for when the user saves a page or post.
    154154     */
    155     public function load_post()
     155    public function load_post() : void
    156156    {
    157157        $screen = get_current_screen();
     
    189189     * @return void
    190190     */
    191     public function add_meta_box(string $post_type)
     191    public function add_meta_box(string $post_type) : void
    192192    {
    193193        $screen = get_current_screen();
     
    206206     * @param \WP_Post $post
    207207     */
    208     public function meta_box_display($post)
     208    public function meta_box_display($post) : void
    209209    {
    210210        global $post;
     
    282282     * @return void
    283283     */
    284     public function save_post($post_id, $post)
     284    public function save_post($post_id, $post) : void
    285285    {
    286286        // Verify the nonce.
  • cb-parallax/trunk/admin/includes/class-post-type-support.php

    r3330670 r3330678  
    4747     * @since 0.9.0
    4848     */
    49     public function add_hooks()
     49    public function add_hooks() : void
    5050    {
    5151        add_action('init', array(
     
    5858     * Calls the WordPress function that adds support for the given feature applied on the given post type.
    5959     */
    60     public function add_post_type_support()
     60    public function add_post_type_support() : void
    6161    {
    6262        foreach ($this->get_supported_post_types() as $post_type) {
     
    7070     * @return array
    7171     */
    72     public function get_supported_post_types()
     72    public function get_supported_post_types() : array
    7373    {
    7474        $excluded_posttypes = array(
  • cb-parallax/trunk/admin/includes/class-theme-support.php

    r3330670 r3330678  
    3939     * @since 0.9.0
    4040     */
    41     public function add_hooks()
     41    public function add_hooks() : void
    4242    {
    4343        add_action('after_setup_theme', array(
     
    5050     * Calls the WordPress function that adds theme support for the given feature.
    5151     */
    52     public function add_theme_support()
     52    public function add_theme_support() : void
    5353    {
    5454        add_theme_support($this->feature);
  • cb-parallax/trunk/admin/menu/class-settings-page.php

    r3330673 r3330678  
    5656     * @var array $screen_ids
    5757     */
    58     private $screen_ids;
     58    private array $screen_ids;
    5959   
    6060    /**
     
    8989     * @since 0.9.0
    9090     */
    91     public function add_hooks()
     91    public function add_hooks() : void
    9292    {
    9393        add_action('admin_enqueue_scripts', array(
     
    117117     * if we're on a white-listed screen.
    118118     */
    119     private function init()
     119    private function init() : void
    120120    {
    121121        if (in_array($this->screen_id, $this->screen_ids, true)) {
     
    139139     * @since 0.9.0
    140140     */
    141     public function enqueue_styles(string $hook_suffix)
     141    public function enqueue_styles(string $hook_suffix) : void
    142142    {
    143143        if (isset($hook_suffix) && $hook_suffix === $this->screen_id) {
     
    161161     * @since 0.9.0
    162162     */
    163     public function enqueue_scripts(string $hook_suffix)
     163    public function enqueue_scripts(string $hook_suffix) : void
    164164    {
    165165        if (isset($hook_suffix) && $hook_suffix === $this->screen_id) {
     
    201201     * @return string $classes
    202202     */
    203     public function add_body_class(string $classes)
     203    public function add_body_class(string $classes) : string
    204204    {
    205205        $classes .= 'cb-parallax-settings-page ';
     
    213213     * @param string $hook_suffix
    214214     */
    215     public function include_menu_localisation(string $hook_suffix)
     215    public function include_menu_localisation(string $hook_suffix) : void
    216216    {
    217217        if (isset($hook_suffix) && $hook_suffix === $this->screen_id) {
     
    226226     * @return void
    227227     */
    228     public function add_options_page()
     228    public function add_options_page() : void
    229229    {
    230230        add_options_page(__('cbParallax Settings Page', $this->domain), 'cbParallax', 'manage_options', 'cb-parallax.php', array(
     
    239239     * @echo
    240240     */
    241     public function settings_display()
     241    public function settings_display() : void
    242242    {
    243243        /**
     
    249249       
    250250        $stored_options = get_option('cb_parallax_options');
    251         $attachment_id = isset($stored_options['cb_parallax_attachment_id']) ? $stored_options['cb_parallax_attachment_id'] : false;
     251        $attachment_id = isset($stored_options['cb_parallax_attachment_id']) ? $stored_options['cb_parallax_attachment_id'] : null;
    252252        $canParallax = isset($stored_options['cb_parallax_can_parallax']) ? $stored_options['cb_parallax_can_parallax'] : false;
    253253        $parallax_enabled = isset($stored_options['cb_parallax_can_parallax']) ? $stored_options['cb_parallax_can_parallax'] : false;
     
    255255        // Get image meta data
    256256        $image = null;
    257         if (false !== $attachment_id) {
     257        if (isset($attachment_id)) {
    258258            $image = wp_get_attachment_image_src(absint($attachment_id), 'full');
    259259        }
  • cb-parallax/trunk/admin/menu/includes/class-ajax.php

    r3330672 r3330678  
    7171     * @since 0.9.0
    7272     */
    73     public function add_hooks()
     73    public function add_hooks() : void
    7474    {
    7575        add_action('wp_ajax_cb_parallax_save_options', array(
     
    9292     * @since 0.9.0
    9393     */
    94     public function cb_parallax_save_options()
     94    public function cb_parallax_save_options() : void
    9595    {
    9696        $nonce = $_REQUEST['nonce'];
     
    163163     * @since 0.9.0
    164164     */
    165     public function cb_parallax_reset_options()
     165    public function cb_parallax_reset_options() : void
    166166    {
    167167        $nonce = isset($_POST['nonce']) ? $_POST['nonce'] : false;
  • cb-parallax/trunk/admin/menu/includes/class-options.php

    r3330670 r3330678  
    7171     * @return mixed
    7272     */
    73     private function plugin_options_whitelist()
     73    private function plugin_options_whitelist() : mixed
    7474    {
    7575        $plugin_options['cb_parallax_allow_override'] = array(
     
    120120        return $plugin_options;
    121121    }
    122     private function image_options_whitelist()
     122    private function image_options_whitelist() : array
    123123    {
    124124        $image_options_whitelist['cb_parallax_attachment_id'] = array();
     
    203203     * @return array $output
    204204     */
    205     private function convert_overlay_image_names_for_display(array $input)
     205    private function convert_overlay_image_names_for_display(array $input) : array
    206206    {
    207207        $output = array();
     
    233233     * @return mixed | bool false | array $names_list
    234234     */
    235     private function retrieve_overlay_image_names()
     235    private function retrieve_overlay_image_names() : mixed
    236236    {
    237237        $path = CBPARALLAX_ROOT_DIR.'public/images/overlays/';
     
    262262     * @return array|mixed
    263263     */
    264     public function get_image_options_whitelist()
     264    public function get_image_options_whitelist() : mixed
    265265    {
    266266        return $this->image_options_whitelist;
     
    272272     * @return array|mixed
    273273     */
    274     public function get_plugin_options_whitelist()
     274    public function get_plugin_options_whitelist() : mixed
    275275    {
    276276        return $this->plugin_options_whitelist;
     
    284284     * @return array $args
    285285     */
    286     public function get_options_arguments(string $section = '')
     286    public function get_options_arguments(string $section = '') : array
    287287    {
    288288        if ('plugin' === $section) {
     
    318318     * @return array
    319319     */
    320     private function plugin_options()
     320    private function plugin_options() : array
    321321    {
    322322        return array_merge(array(
     
    395395     * @return array
    396396     */
    397     private function image_options()
     397    private function image_options() : array
    398398    {
    399399        return array(
     
    573573     * @return array|bool
    574574     */
    575     public function get_section_heading(string $section)
     575    public function get_section_heading(string $section) : bool|array
    576576    {
    577577        $background_image_heading = array(
     
    656656     * @return string $result
    657657     */
    658     public function determine_image_source()
     658    public function determine_image_source() : string
    659659    {
    660660        global $post;
     
    682682     * @return array $default_image_options
    683683     */
    684     public function get_default_image_options()
     684    public function get_default_image_options() : array
    685685    {
    686686        $default_image_options = array();
     
    702702     * @return array
    703703     */
    704     public function get_plugin_options($post = false)
    705     {
     704    public function get_plugin_options($post = false) : array
     705    {
     706        global $post;
     707       
    706708        $plugin_options = array();
    707709        $stored_options = get_option('cb_parallax_options');
     
    711713        // If a page or post is requested AND the options are fetched on a per post basis
    712714        if (is_a($post, '\WP_Post') && 'per_page' === $this->determine_options_source($post)) {
    713             /**
    714              * @var \WP_Post $post
    715              */
    716715            $post_meta = get_post_meta($post->ID, 'cb_parallax', true);
    717716            // Maybe overwrite the value with the one from the post meta data
     
    733732     * @return array $keys
    734733     */
    735     public function get_all_option_keys(string $section = '')
     734    public function get_all_option_keys(string $section = '') : array
    736735    {
    737736        if ('plugin' === $section) {
     
    759758     * @return array $default_plugin_options
    760759     */
    761     public function get_default_plugin_options()
     760    public function get_default_plugin_options() : array
    762761    {
    763762        $default_plugin_options = array();
     
    784783     * @return string $result
    785784     */
    786     public function determine_options_source($post)
     785    public function determine_options_source($post) : string
    787786    {
    788787        $stored_options = get_option('cb_parallax_options');
     
    820819     * @return bool|\WP_Error
    821820     */
    822     public function save_options(array $input, $post_id = '')
     821    public function save_options(array $input, $post_id = '') : WP_Error|bool
    823822    {
    824823        $validation = new MenuIncludes\cb_parallax_validation($this->domain, $this);
     
    863862     * @return  \WP_Error | bool true
    864863     */
    865     public function reset_options($post_id)
     864    public function reset_options($post_id) : WP_Error|bool
    866865    {
    867866        delete_option('cb_parallax_options');
     
    890889     * @return array
    891890     */
    892     public function get_default_options(string $section = '')
     891    public function get_default_options(string $section = '') : array
    893892    {
    894893        if ('image' == $section) {
     
    936935     * @return bool
    937936     */
    938     public function is_image_in_media_library($post)
     937    public function is_image_in_media_library($post) : bool
    939938    {
    940939        $stored_image_options = $this->get_image_options($post);
     
    980979     * @return array $image_options
    981980     */
    982     public function get_image_options($post = false)
     981    public function get_image_options($post = false) : array
    983982    {
    984983        global $post;
  • cb-parallax/trunk/admin/menu/includes/class-validation.php

    r3330672 r3330678  
    8989     * and the default options, too.
    9090     */
    91     private function retrieve_options()
     91    private function retrieve_options() : void
    9292    {
    9393        $this->image_options_whitelist = $this->options->get_image_options_whitelist();
     
    104104     * @return array
    105105     */
    106     public function run($post_id, array $input)
     106    public function run($post_id, array $input) : array
    107107    {
    108108        $input = $this->sanitize($input);
     
    118118     * @return array $output
    119119     */
    120     private function sanitize(array $input)
     120    private function sanitize(array $input) : array
    121121    {
    122122        $output = array();
     
    139139     * @return array $output
    140140     */
    141     public function validate_input($post_id, array $input)
     141    public function validate_input($post_id, array $input) : array
    142142    {
    143143        if ('' === $post_id) {
  • cb-parallax/trunk/admin/partials/class-help-sidebar-display.php

    r3330669 r3330678  
    2929     * @since 0.9.0
    3030     */
    31     public static function help_sidebar_display(string $domain, $current_screen)
     31    public static function help_sidebar_display(string $domain, $current_screen) : string
    3232    {
    3333        $html = $current_screen->get_help_sidebar();
  • cb-parallax/trunk/admin/partials/class-help-tab-display.php

    r3330669 r3330678  
    2828     * @since 0.9.0
    2929     */
    30     public static function help_tab_display(string $domain)
     30    public static function help_tab_display(string $domain) : string
    3131    {
    3232        ob_start();
     
    6262     * @since 0.9.0
    6363     */
    64     public static function tab_content_general_settings(string $domain)
     64    public static function tab_content_general_settings(string $domain) : string
    6565    {
    6666        /**
     
    106106     * @since 0.9.0
    107107     */
    108     public static function tab_content_scroll_directions(string $domain)
     108    public static function tab_content_scroll_directions(string $domain) : string
    109109    {
    110110        $img_postfix = 'de_DE' === get_locale() ? 'de' : 'default';
     
    202202     * @since 0.9.0
    203203     */
    204     public static function tab_content_plugin_information_and_privacy_notices(string $domain)
     204    public static function tab_content_plugin_information_and_privacy_notices(string $domain) : string
    205205    {
    206206        ob_start();
  • cb-parallax/trunk/admin/partials/class-settings-display.php

    r3330673 r3330678  
    104104     * Holds the reference to the class that's responsible for validation operations.
    105105     */
    106     private function set_validation_instance()
     106    private function set_validation_instance() : void
    107107    {
    108108        $this->validation = new MenuIncludes\cb_parallax_validation($this->domain, $this->options);
     
    112112     * Holds the array containing the default plugin options.
    113113     */
    114     private function set_default_plugin_options()
     114    private function set_default_plugin_options() : void
    115115    {
    116116        $this->default_plugin_options = $this->options->get_default_plugin_options();
     
    120120     * Holds the array containing the default image options.
    121121     */
    122     private function set_default_image_options()
     122    private function set_default_image_options() : void
    123123    {
    124124        $this->default_image_options = $this->options->get_default_image_options();
     
    136136     * @return string $html
    137137     */
    138     public function get_hidden_fields_display($attachment_id, string $url, $canParallax, $parallax_enabled)
     138    public function get_hidden_fields_display($attachment_id, string $url, $canParallax, $parallax_enabled) : string
    139139    {
    140140        ob_start();
     
    173173     * @return string $html
    174174     */
    175     public function get_media_button_display()
     175    public function get_media_button_display() : string
    176176    {
    177177        ob_start();
     
    196196     * @return string $html
    197197     */
    198     public function get_background_image_display(string $url, string $section = 'image')
     198    public function get_background_image_display(string $url, string $section = 'image') : string
    199199    {
    200200        $placeholder_image_class = '' === $url ? '' : 'hidden';
     
    231231     * @return string $html
    232232     */
    233     public function get_checkbox_display($value, array $args)
     233    public function get_checkbox_display($value, array $args) : string
    234234    {
    235235        $option_key = $args['option_key'];
     
    273273     * @return string $html
    274274     */
    275     public function get_color_picker_field($value, array $args)
     275    public function get_color_picker_field($value, array $args) : string
    276276    {
    277277        $option_key = $args['option_key'];
     
    308308     * @return string $html
    309309     */
    310     public function get_select_field($value, array $args)
     310    public function get_select_field($value, array $args) : string
    311311    {
    312312        $option_key = $args['option_key'];
     
    341341     * @return string
    342342     */
    343     public function get_form_title()
     343    public function get_form_title() : string
    344344    {
    345345        return '<h1>'.__('cbParallax Settings', $this->domain).'</h1>';
     
    353353     * @return string
    354354     */
    355     public function get_settings_title(string $section)
     355    public function get_settings_title(string $section) : string
    356356    {
    357357        if ('meta-box' === $section) {
  • cb-parallax/trunk/cb-parallax.php

    r3327032 r3330678  
    7979 * @since    0.1.0
    8080 */
    81 function activate_plugin()
     81function activate_plugin() : void
    8282{
    8383    Includes\cb_parallax_activator::activate();
     
    9191 * @since    0.1.0
    9292 */
    93 function deactivate_plugin()
     93function deactivate_plugin() : void
    9494{
    9595    Includes\cb_parallax_deactivator::deactivate();
     
    119119 * @since    0.1.0
    120120 */
    121 function run_cb_parallax()
     121function run_cb_parallax() : void
    122122{
    123123    $plugin = new Includes\cb_parallax();
  • cb-parallax/trunk/includes/class-activator.php

    r3330670 r3330678  
    3838     * @return void
    3939     */
    40     public static function activate()
     40    public static function activate() : void
    4141    {
    4242        // Gets the administrator role.
  • cb-parallax/trunk/includes/class-cb-parallax-upgrade.php

    r3330673 r3330678  
    109109     * and sets the required option values.
    110110     */
    111     private function retrieve_options()
     111    private function retrieve_options() : void
    112112    {
    113113        $this->options = new MenuIncludes\cb_parallax_options($this->domain);
     
    120120     * Kicks off the options upgrader.
    121121     */
    122     public function run()
     122    public function run() : void
    123123    {
    124124        // Upgrade options and post meta and Add a "flag" on success
     
    130130        }
    131131    }
    132    
    133     private function upgrade_plugin_options()
     132    private function upgrade_plugin_options() : bool
    134133    {
    135134        // Upgrade post meta of all posts and pages
     
    256255        }
    257256    }
    258    
    259     private function add_upgrade_flag()
     257    private function add_upgrade_flag() : void
    260258    {
    261259        update_option('cb_parallax_plugin', [
  • cb-parallax/trunk/includes/class-cb-parallax.php

    r3330673 r3330678  
    9999     * @return void
    100100     */
    101     private function set_options_instance()
     101    private function set_options_instance() : void
    102102    {
    103103        $this->options = new MenuIncludes\cb_parallax_options($this->domain);
     
    110110     * @return void
    111111     */
    112     private function include_plugin_text_domain()
     112    private function include_plugin_text_domain() : void
    113113    {
    114114        $i18n = new cb_parallax_i18n($this->domain);
     
    122122     * @return void
    123123     */
    124     public function run()
     124    public function run() : void
    125125    {
    126126        $this->ensure_options();
     
    128128        $this->run_public();
    129129    }
    130    
    131     private function ensure_options()
     130    private function ensure_options() : void
    132131    {
    133132        $options = get_option('cb_parallax_options');
     
    136135        }
    137136    }
    138    
    139     public function set_initial_plugin_options()
     137    public function set_initial_plugin_options() : void
    140138    {
    141139        $cb_parallax_options = new MenuIncludes\cb_parallax_options('cb-parallax');
     
    150148     * @return void
    151149     */
    152     private function run_admin()
     150    private function run_admin() : void
    153151    {
    154152        if (!is_admin()) {
     
    166164     * @return void
    167165     */
    168     private function run_public()
     166    private function run_public() : void
    169167    {
    170168        // If it's admin, which it shouldn't be, we stop here
  • cb-parallax/trunk/includes/class-deactivator.php

    r3330670 r3330678  
    3939     * @return void
    4040     */
    41     public static function deactivate()
     41    public static function deactivate() : void
    4242    {
    4343        // Gets the administrator role.
  • cb-parallax/trunk/includes/class-i18n.php

    r3330670 r3330678  
    5252     * @since 0.9.0
    5353     */
    54     public function add_hooks()
     54    public function add_hooks() : void
    5555    {
    5656        add_action('init', array(
     
    6363     * Calls the WordPress function that loads this plugin's translated strings.
    6464     */
    65     public function load_plugin_textdomain()
     65    public function load_plugin_textdomain() : void
    6666    {
    6767        load_plugin_textdomain($this->domain, false, dirname(dirname(plugin_basename(__FILE__))).'/languages/');
  • cb-parallax/trunk/public/class-public.php

    r3330673 r3330678  
    8181     * @param bool false | WP_Post $post
    8282     */
    83     private function set_plugin_options($post = false)
     83    private function set_plugin_options($post = false) : void
    8484    {
    8585        $this->plugin_options = $this->options->get_plugin_options($post);
     
    9292     * @since 0.9.0
    9393     */
    94     private function include_public_localisation()
     94    private function include_public_localisation() : void
    9595    {
    9696        $localisation = new PublicIncludes\cb_parallax_public_localisation($this->domain, $this->options);
     
    104104     * @since 0.9.0
    105105     */
    106     public function add_hooks()
     106    public function add_hooks() : void
    107107    {
    108108        add_action('wp_enqueue_scripts', [
     
    127127     * @since 0.9.0
    128128     */
    129     public function enqueue_styles()
     129    public function enqueue_styles() : void
    130130    {
    131131        /**
     
    149149     * @since 0.9.0
    150150     */
    151     public function enqueue_scripts()
     151    public function enqueue_scripts() : void
    152152    {
    153153        /**
     
    188188        }
    189189    }
    190    
    191     public function enqueue_layout_scripts()
     190    public function enqueue_layout_scripts() : void
    192191    {
    193192        /**
     
    216215        }
    217216    }
    218    
    219     public function enqueue_parallax_scripts()
     217    public function enqueue_parallax_scripts() : void
    220218    {
    221219        /**
  • cb-parallax/trunk/public/includes/class-public-localisation.php

    r3330673 r3330678  
    9595     * @param bool false | \WP_Post $post
    9696     */
    97     private function set_image_options($post = false)
     97    private function set_image_options($post = false) : void
    9898    {
    9999        $this->image_options = $this->options->get_image_options($post);
     
    105105     * @param bool false | WP_Post $post
    106106     */
    107     private function set_plugin_options($post = false)
     107    private function set_plugin_options($post = false) : void
    108108    {
    109109        $this->plugin_options = $this->options->get_plugin_options($post);
     
    116116     * @since 0.9.0
    117117     */
    118     public function add_hooks()
     118    public function add_hooks() : void
    119119    {
    120120        add_action('wp_enqueue_scripts', [
     
    130130     * @return void
    131131     */
    132     public function localize_frontend()
     132    public function localize_frontend() : void
    133133    {
    134134        /**
     
    161161        }
    162162    }
    163    
    164     private function getPrepareData()
     163    private function getPrepareData() : array
    165164    {
    166165        /**
     
    215214     * @return array $image_data
    216215     */
    217     private function get_image_data($attachment_id)
     216    private function get_image_data($attachment_id) : array
    218217    {
    219218        $image_data = array();
     
    238237     * @return array $overlay_options
    239238     */
    240     private function get_overlay_options(array $stored_image_options)
     239    private function get_overlay_options(array $stored_image_options) : array
    241240    {
    242241        $overlay_image_select_values = $this->options->get_image_options_whitelist();
     
    268267     * @return string $image_data javascript-conform value for true or false
    269268     */
    270     private function can_parallax(array $image_data)
     269    private function can_parallax(array $image_data) : string
    271270    {
    272271        $min_width = '1080';
Note: See TracChangeset for help on using the changeset viewer.