GithubHelp home page GithubHelp logo

rtcamp / rt-lib Goto Github PK

View Code? Open in Web Editor NEW
14.0 32.0 11.0 1.2 MB

rt-lib is (intended to be) collection of reusable PHP classes useful for WordPress plugin/theme projects

License: Other

PHP 61.77% Shell 2.64% HTML 2.47% JavaScript 32.46% CSS 0.66%

rt-lib's Issues

Remove/Replace __DIR__ magic constants

Ref : https://github.com/rtCamp/rt-lib/blob/develop/rt-user-groups/class-rt-user-group.php#L22

No need to use realpath(__DIR__.'/../').'/ because we can use relative path and __DIR__ introduced in php 5.4, WordPress support php 5.2.4 - So it is throwing error for user who are on php 5.3 or older version

__DIR__ is actually equivalent to realpath(dirname(__FILE__)) , To ensure the DIR constant is defined for PHP 4.0.6 and newer use following snippet
(@__DIR__ == '__DIR__') && define('__DIR__', realpath(dirname(__FILE__)));

Mailbox Changes

  • Change Label to Mailbox : Ref
  • Enqueue script/style on proper hooks : Ref
  • Add filter for tabs. Someone would want to add custom tabs : Ref
  • Add action for tab content in reference to above custom tabs : Ref
  • Move all such independent functions to single file. You may name it rt-mailbox-functions.php : Ref
  • Move out this class. It is no longer a helper class in rtMailbox context : Ref
  • Remove this debug line : Ref
  • Rename this folder to settings. Those classes are not templates : Ref

Don't use &$this

From PHP 5 onwards, all objects are passed by reference, so &$this is redundant. This is a common pattern with add_action/add_filter calls (since the callback is an array), but should just the bare $this instead. Read More

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.