Coder Social home page Coder Social logo

mainwp / code-snippets-functions Goto Github PK

View Code? Open in Web Editor NEW
78.0 21.0 21.0 4.61 MB

Repository for the MainWP Code Snippets Extension functions.

Home Page: https://mainwp.com/extension/code-snippets/

PHP 100.00%
mainwp mainwp-extension code-snippets wordpress

code-snippets-functions's Introduction

Code Snippets Functions

This repository contains "code snippets" for use with the MainWP Code Snippets Extension.

The Code Snippets Extension is a custom plugin built to allow the MainWP Dashboard to excecute code snippets on a MainWP Child site.

How it Works

MainWP Code Snippets Extension works by allowing you to run code snippets that would be in your themes functions.php or in the sites wp-config.php file. Code Snippets extension for MainWP is a simple way to add code snippets to your child sites from one centralized location. This tool is recommended for advanced users only. We only recommend utilizing it if you are experienced PHP coder.

Code Snippet Types

Have a Code Snippet execute a function on the Child site This type of snippets will add the snippet on your child site and it will be executed on site load. This type of snippets will be saved in your child site database and will be executed each time your child site is loaded by the PHP command eval().

You would use this option to make actual changes on your child sites. For example, if you wanted to customize the admin footer across different sites in your network you would use this option.

Have a Code Snippet return information from a Child site This type of snippets will just get the info from child sites and display it in the Output Display. This type of snippets will not saved on your child sites.

This option queries the child and returns the information to you. An example would be if you wanted to know the published post count of all of your sites.

Have a Code Snippet edit the wp-config.php file on a Child site This type of snippets will be added to your child site wp-config.php file. This type of snippets will be saved only in your child site wp-config.php file.

One of the most important files in your WordPress installation is the wp-config.php file. A Code Snippet in this section allows you to do things such as increase WordPress memory, block external requests, disable WP Cron and much more.

Related documents

Execute a Code Snippet

Save a Code Snippet

Remove a Code Snippet from a Broken Site

Remove a Code Snippet from Child Sites

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.