Skip to content

Optimised code in the selected_posts_in_widget.php file#3

Open
hn4733 wants to merge 1 commit into
InfoDevkota:masterfrom
hn4733:code-optimisation
Open

Optimised code in the selected_posts_in_widget.php file#3
hn4733 wants to merge 1 commit into
InfoDevkota:masterfrom
hn4733:code-optimisation

Conversation

@hn4733

@hn4733 hn4733 commented Oct 10, 2018

Copy link
Copy Markdown

I have optimised the file selected_posts_in_widget.php and formatted the code. There were a lot of repetitive coding so I used the foreach loop to make it cleaner and easier to read.
I've also created a global variable to store values to use in the foreach loop.
All outputs are stored in variables and echo'ed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant