• Stars
    star
    7
  • Rank 2,294,772 (Top 46 %)
  • Language
  • License
    MIT License
  • Created over 4 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

ManageWP Code Snippets Collections

ManageWP Code Snippets Maintained by Waren Gonzaga

ManageWP code snippets collection for WordPress.

How To Use

Just copy and paste the available code snippets below and load it to your ManageWP code snippets editor.

Code Snippets

Here's the collections of code snippets.

Info & Debugging

  • List Plugins - This will list all of the available plugin in the WordPress plugin directory. Useful to check the installed plugins in your installation.

    <?php
    
    // Directory to scan
    $files = scandir("wp-content/plugins");
    
    // Return the result of the scan
    foreach($files as $file) {
        echo $file."\n";
    }
  • Test Database Connection - This will return a database connection status. This is useful to when you want to make sure your database credentials are working correctly or not.

    <?php
    
    // Test Database Connection
    $servername = "localhost";
    $username = "username-here";
    $password = "password-here";
    
    // Create connection
    $conn = new mysqli($servername, $username, $password);
    
    // Check connection
    if ($conn->connect_error) {
        die("Connection failed: " . $conn->connect_error);
    }
    echo "Connected successfully";
  • View File Contents - Able to view file contents in your installation. For example, you want to check the wp-config.php contents.

    <?php
    
    // define specific file
    $file = "./wp-config.php";
    
    // do the magic
    $view = file_get_contents($file, true);
    
    // return the results
    echo $view;
  • Check Free Disk Space - This will return the total free disk space on your web server.

    <?php
    
    // checking disk space
    $bytes = disk_free_space(".");
    
    // setting up arraw for prefix
    $si_prefix = array( 'B', 'KB', 'MB', 'GB', 'TB', 'EB', 'ZB', 'YB' );
    
    // do the magic with math!
    $base = 1024;
    $class = min((int)log($bytes , $base) , count($si_prefix) - 1);
    
    // return the result
    echo "Remaining disk space is " . sprintf('%1.2f' , $bytes / pow($base,$class)) . ' ' . $si_prefix[$class];

Contributing

Contributions are welcome, create a pull request to this repo and I will review your code. Please consider to submit your pull request to the dev branch. Thank you!

Issues

If you're facing any problems with the code snippets please let me know by creating an issue to this repository. Thank you!

To Do

  • Add more code snippets

Community

Wanna see other projects I made? Join today!

Community

Donate or Support

If you love this collection please consider to donate or support the maintainer.

Donate Support

License

ManageWP Code Snippets is licensed under MIT - https://opensource.org/licenses/MIT

Author

ManageWP Code Snippets is Maintained by Waren Gonzaga

Facebook Twitter LinkedIn YouTube


💻 Made with ❤️ by Waren Gonzaga with YHWH 🙏

More Repositories

1

css-text-portrait-builder

A popular pure CSS text portrait builder for your loved ones. 🥰
JavaScript
345
star
2

wifi-passview

An open source batch script based WiFi Passview for Windows!
Batchfile
282
star
3

wrn-cleaner

A free maintenance tool that can automatically or manually clean up your Windows machine in a simple and reliable way. 😉💻🧹
Batchfile
68
star
4

awesome-thirdweb

A curated list of awesome thirdweb resources, libraries, examples, showcase, and open source projects. 📌✨
55
star
5

buymeacoffee.js

Simple and lightweight community contributed JavaScript SDK for Buy Me a Coffee REST API. 💻☕⚡
TypeScript
55
star
6

warengonzaga

My Personal GitHub ReadMe. 💻💖☕
52
star
7

gathertown.js

Simple and lightweight community contributed unofficial JS/TS SDK for Gather Town's HTTPS and WebSocket APIs. 🌏🕹💬
TypeScript
38
star
8

daisy.js

📢 MAINTENANCE MODE: Web animation javascript plugin for beautiful background particle systems. The Maintained and LTS version of popular Particleground.
JavaScript
35
star
9

fork-corner

A modern and global open source fork corner label for your project's landing page.
SCSS
27
star
10

thirdweb-wp

A community WordPress plugin for thirdweb. Turn your WordPress website into Web3 instantly and easily with thirdweb. 🚀💻🧩
PHP
23
star
11

awesome-css-text-portrait

Awesome list of CSS Text Portrait Tutorials, Resources, Generators, and Builders. 😎
11
star
12

magic-commit

You can do magicc, you can build anything that you desire. 🪄🔮💻
JavaScript
10
star
13

love-cards

A highly customizable interactive love cards web application for your loved ones. 🌷💘💌
CSS
9
star
14

bini-theme

A Visual Studio Code theme for Bloom programmers and developers. 🌸💻🎨
9
star
15

nft-dummy-assets

Dummy NFT art assets for testing or demo purposes. 🖼️
JavaScript
9
star
16

ipfs-support-extension

Adding standalone IPFS native URL support for chromium based browsers without installing IPFS in your machine. 📦🌐🧩
HTML
9
star
17

animatecssplugin

This is the plugin for improvising Animate.css animations into GSAP.
JavaScript
9
star
18

thirdweb-art-engine

The official art engine for the thirdweb community.
JavaScript
8
star
19

thirdweb-tools-cli

A community-contributed NodeJS command line tool for thirdweb to create, develop and manage your Web3 projects without leaving your terminal. 🚀🌏🦄
7
star
20

waren-universal-discord-rules

Standard and universal set of rules for moderating community on Discord. 📜💻🌈
7
star
21

waren-discord-bot

A general-purpose Discord bot for the modern technology community.
6
star
22

wrn-fix-it

Your Windows companion toolset for fixing common issues.
Batchfile
6
star
23

chillradio-discord-bot

ChillRadio official discord bot for community servers.
JavaScript
6
star
24

gitbook.js

📢 COMING SOON: A simple and lightweight but powerful Node.js client for GitBook API.
6
star
25

xplorescan

Never memorize a blockchain explorer again. 🛰️🌐💻
JavaScript
6
star
26

oss-homepage-builder

📢 COMING SOON: A simple but powerful landing page builder for Open Source projects.
5
star
27

disease-tracker-wp

All-in-one disease tracker for WordPress.
PHP
5
star
28

faucets-discord-bot

A simple Discord bot that dispenses ETH test network tokens. 🤖🚀
TypeScript
4
star
29

gumroad.js

Simple and lightweight community contributed JavaScript SDK for Gumroad REST API. 💻💸⚡
4
star
30

hashnode.js

🚧 WORK IN PROGRESS 🚧 A simple and lightweight but powerful Node.js client for Hashnode GraphQL API.
4
star
31

suspend-wp

A WordPress plugin to suspend WordPress sites automagically. Simple and lightweight, no annoying ads and fancy settings.
PHP
4
star
32

spinupwp.js

Simple and lightweight community contributed JavaScript SDK for SpinupWP REST API. 💻🚀⚡
JavaScript
4
star
33

thirdweb-faucet-discord-bot

A dedicated thirdweb community Discord bot that dispenses ETH test network tokens. 🐱‍👤🔥
TypeScript
4
star
34

3m-logo-builder

Make your logo worth 3M by adding crazy gradient overlay into it programmatically. 🫡
JavaScript
4
star
35

laboum.js

HTML5 Radio Player for the Modern Web
4
star
36

shortcodes-wp

A WordPress shortcode plugin to automagically display WordPress information. Simple and lightweight, no annoying ads and fancy settings.
PHP
4
star
37

wudr-site

Waren's Discord Server Rules (WUDR) official website.
3
star
38

bmc-updates-bot

Official open-source project for branded update Discord bot for Buy Me a Coffee Discord community server.
JavaScript
3
star
39

forum-based-support-discord-bot

A self-hosted forum-based support Discord bot for your communities.
JavaScript
3
star
40

sample-nextjs-app

Welcome to Sample NextJS App
CSS
3
star
41

googlemotanga

Learn how to Google things in no time
HTML
3
star
42

polywork.js

📢 COMING SOON: A simple and lightweight but powerful Node.js client for Polywork API.
3
star
43

awesome-buymeacoffee

A curated list of awesome Buy Me a Coffee pages
3
star
44

better-redirection-wp

A better and simple way to create WordPress redirections.
3
star
45

update-your-footer-wp

Simple and lightweight WordPress shortcode plugin to automagically update your footer year notice. No annoying ads! 📅💻🧩
PHP
3
star
46

gh-repo-builder

📢 RESERVED: A faster way to set up your open-source project repository. 🐱‍👤
3
star
47

karin.js

A table sorting Javascript library.
3
star
48

arweave-support-extension

Adding standalone Arweave native URL support for Chromium-based browsers without installing Arweave on your machine. 📦🌐🌊
HTML
3
star
49

awesome-opensource-alternatives

Awesome list of open source alternatives.
3
star
50

lookup.js.org

A web app lookup tool for JS.ORG subdomains.
3
star
51

thirdweb-engine-deploy-locally

The easiest way to deploy thirdweb Engine locally.
JavaScript
2
star
52

thread-based-support-discord-bot

A self-hosted thread-based support Discord bot for communities.
JavaScript
2
star
53

better-maintenance-wp

A better less ads maintenance mode plugin for WordPress.
2
star
54

emily.css

A simple lightweight, highly customizable responsive CSS grid framework.
SCSS
2
star
55

banner-studio

Banner Ad Boilerplate for Faster HTML5 Banner Ad Production.
JavaScript
2
star
56

elris-discord-bot

A Discord bot for organizing your community media files in one channel.
2
star
57

thirdweb-helper-discord-bot

A community Discord bot helper for thirdweb community. 💻🌏
TypeScript
2
star
58

rescue-wp

An open-source life saving tool for WordPress developers.
2
star
59

simple-profile-wp

A simple way to clean your user profile settings page.
2
star
60

cloudflare-firewall-rules

Collection of Cloudflare Firewall Rules
2
star
61

ebook-nft-sample

This is an experimental approach to creating ebook NFT.
JavaScript
1
star
62

awesome-nocode

A curated list of awesome no-code application
1
star
63

warengonzaga.github.io

Open Source Portfolio
1
star
64

bmc-music-bot

BMC Branded Music Bot
1
star
65

tw-gated-site

JavaScript
1
star
66

about.me

Resume
1
star
67

divi-aide

1
star
68

hashnode-blog-backup

Waren Gonzaga's Blogs Backup.
1
star
69

Lyrics-Library

This is underdevelopment soon to publish!
CSS
1
star
70

skills-secure-code-game

Secure Code Game Season 2
Python
1
star
71

three-card-monte-js

A Modern Animated JavaScript Game Version of Three Card Monte (Find the Lady)
HTML
1
star