Skip to content

Commit 35ee513

Browse files
authored
Merge pull request #1 from codeboxrcodehub/dev
merge to master
2 parents e7f9f69 + c8edf61 commit 35ee513

File tree

536 files changed

+175419
-49163
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

536 files changed

+175419
-49163
lines changed

LICENSE.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2019 PhpSpreadsheet Authors
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
CBX Career Dev Toolkit
2+
3+
## Description
4+
5+
This plugin provides command line interface for creating dummy job and resume.
6+
7+
## Installation
8+
9+
1. Download the latest zip from [here](https://github.com/codeboxrcodehub/cbxcareertoolkit/releases)
10+
2. WordPress has clear documentation about [how to install a plugin.](https://codex.wordpress.org/Managing_Plugins)
11+
3. After install activate the plugin "CBX Career Dev Toolkit Library" through the 'Plugins' menu in WordPress
12+
4. This plugin doesn't load any library by default, it doesn't create extra folder or menu.
13+
14+
# How to use:
15+
16+
## cbxjob
17+
18+
### All possible default params:
19+
20+
```
21+
wp cbxjob-generate --total=100 --status=publish --is-remote=0 --is-featured=1 --is-filled=0 --user-id=1 --salary-unit=monthly --currency=USD
22+
```
23+
24+
total = number of jobs to be created.
25+
26+
status options = [draft , pending , publish,unpublished,flag ]
27+
28+
is-remote = [0,1]
29+
30+
is-featured= [0,1]
31+
32+
is-filled= [0,1]
33+
34+
currency=[USD,BDT, etc]
35+
36+
salary-unit =[yearly,monthly,yearly,daily]
37+
38+
user-id = user ID
39+
40+
## cbxresume
41+
42+
### All possible default params:
43+
44+
```
45+
wp cbxjresume-generate --total=100 --user-id=1 --status=1 --privacy=public --is-primary=1
46+
```
47+
48+
total = number of resume to be created.
49+
50+
user-id= system user id
51+
52+
status = [0=draft, 1=publish, 2=unpublished, 3=pending, 4=flag]
53+
54+
privacy= [public,private]
55+
56+
is-primary= [0,1]
57+
58+
## Licence
59+
60+
[MIT](https://github.com/codeboxrcodehub/cbxcareertoolkit/blob/master/LICENSE.txt)

README.txt

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
=== CBX Career Toolkit Library ===
2+
Contributors: codeboxr, manchumahara
3+
Requires at least: 3.5
4+
Tested up to: 6.4.3
5+
Stable tag: 1.0.0
6+
License: MIT
7+
License URI: https://github.com/codeboxrcodehub/cbxcareertoolkit/blob/master/LICENSE.txt
8+
9+
Open source PhpSpreadSheet php library released as wordpress plugin to use easily
10+
11+
== Description ==
12+
13+
A pure [PHP library for reading and writing spreadsheet files](https://phpspreadsheet.readthedocs.io)
14+
15+
From Codeboxr we wrapped the library as wordpress plugin to easy distribute as wordpress plugin. WordPress now doesn't allow this type library as
16+
plugin but providing a large php package with plugin makes the plugin heavy and troublesome for updates. We hosted this in github so that user can download and later
17+
update easily.
18+
19+
Software requirements
20+
21+
The following software is required to develop using PhpSpreadsheet:
22+
23+
* PHP version 7.4 or newer
24+
* PHP extension php_zip enabled
25+
* PHP extension php_xml enabled
26+
* PHP extension php_gd2 enabled (if not compiled in)
27+
28+
29+
The plugin check php version, php_zip, php_xml and php_gd2 library compatible or installed or not, based on success it activated.
30+
31+
How to use:
32+
33+
`
34+
if ( defined('CBXPHPSPREADSHEET_PLUGIN_NAME') && file_exists( CBXPHPSPREADSHEET_ROOT_PATH . 'lib/vendor/autoload.php' ) ) {
35+
//Include PHPExcel
36+
require_once( CBXPHPSPREADSHEET_ROOT_PATH . 'lib/vendor/autoload.php' );
37+
38+
//now take instance
39+
$objPHPExcel = new \PhpOffice\PhpSpreadsheet\Spreadsheet();
40+
41+
//do whatever you need to do
42+
}
43+
`
44+
45+
== Installation ==
46+
47+
1. Download the latest zip from here (https://github.com/codeboxrcodehub/cbxcareertoolkit/releases)
48+
2. [WordPress has clear documentation about how to install a plugin].(https://codex.wordpress.org/Managing_Plugins)
49+
3. After install activate the plugin "CBX PhpSpreadSheet Library" through the 'Plugins' menu in WordPress
50+
4. This plugin doesn't load any library by default, it doesn't create extra folder or menu.
51+
52+
53+
== Changelog ==
54+
55+
= 1.0.5 =
56+
* Dependency vendor packages updated to latest
57+
* Github.com based updater
58+
59+
= 1.0.4 =
60+
* Updated the phpspreadsheet package to latest V1.29.0
61+
62+
= 1.0.3 =
63+
* Updated the phpspreadsheet package to latest V1.21.0
64+
65+
= 1.0.2 =
66+
* Updated the phpspreadsheet package to latest V1.21.0
67+
68+
= 1.0.1 =
69+
* Updated the phpspreadsheet package to latest
70+
71+
= 1.0.0 =
72+
* First public release

cbxcareertoolkit.php

Lines changed: 18 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
<?php
22

3-
43
/**
54
*
65
* @link https://codeboxr.com
76
* @since 1.0.0
87
* @package CBXcareertoolkit
98
*
109
* @wordpress-plugin
11-
* Plugin Name: CBX career Toolkit
10+
* Plugin Name: CBX Career Toolkit
1211
* Plugin URI: https://github.com/codeboxrcodehub/cbxcareertoolkit/
13-
* Description: Making Test Case For Development!
12+
* Description: Helper plugin for CBX Career plugins
1413
* Version: 1.0.0
14+
* Requires at least: 3.7
15+
* Requires PHP: 7.4
1516
* Author: Codeboxr
1617
* Author URI: https://codeboxr.com
1718
* License: GPL-2.0+
@@ -21,41 +22,29 @@
2122
*/
2223

2324
// If this file is called directly, abort.
24-
if (!defined('WPINC')) {
25+
if ( ! defined( 'WPINC' ) ) {
2526
die;
2627
}
2728

28-
defined('CBXCAREER_TOOLKIT_PLUGIN_NAME') or define('CBXCAREER_TOOLKIT_PLUGIN_NAME', 'cbxcareertoolkit');
29-
defined('CBXCAREER_TOOLKIT_PLUGIN_VERSION') or define('CBXCAREER_TOOLKIT_PLUGIN_VERSION', '1.0.0');
30-
defined('CBXCAREER_TOOLKIT_BASE_NAME') or define('CBXCAREER_TOOLKIT_BASE_NAME', plugin_basename(__FILE__));
31-
defined('CBXCAREER_TOOLKIT_ROOT_PATH') or define('CBXCAREER_TOOLKIT_ROOT_PATH', plugin_dir_path(__FILE__));
32-
defined('CBXCAREER_TOOLKIT_ROOT_URL') or define('CBXCAREER_TOOLKIT_ROOT_URL', plugin_dir_url(__FILE__));
29+
defined( 'CBXCAREER_TOOLKIT_PLUGIN_NAME' ) or define( 'CBXCAREER_TOOLKIT_PLUGIN_NAME', 'cbxcareertoolkit' );
30+
defined( 'CBXCAREER_TOOLKIT_PLUGIN_VERSION' ) or define( 'CBXCAREER_TOOLKIT_PLUGIN_VERSION', '1.0.0' );
31+
defined( 'CBXCAREER_TOOLKIT_BASE_NAME' ) or define( 'CBXCAREER_TOOLKIT_BASE_NAME', plugin_basename( __FILE__ ) );
32+
defined( 'CBXCAREER_TOOLKIT_ROOT_PATH' ) or define( 'CBXCAREER_TOOLKIT_ROOT_PATH', plugin_dir_path( __FILE__ ) );
33+
defined( 'CBXCAREER_TOOLKIT_ROOT_URL' ) or define( 'CBXCAREER_TOOLKIT_ROOT_URL', plugin_dir_url( __FILE__ ) );
3334

34-
defined('CBX_DEBUG') or define('CBX_DEBUG', false);
35-
defined('CBXCAREER_TOOLKIT_DEV_MODE') or define('CBXCAREER_TOOLKIT_DEV_MODE', CBX_DEBUG);
35+
defined( 'CBX_DEBUG' ) or define( 'CBX_DEBUG', false );
36+
defined( 'CBXCAREER_TOOLKIT_DEV_MODE' ) or define( 'CBXCAREER_TOOLKIT_DEV_MODE', CBX_DEBUG );
3637

3738

3839
require_once CBXCAREER_TOOLKIT_ROOT_PATH . "lib/autoload.php";
3940

4041

4142
/**
4243
* The code that runs during plugin activation.
43-
* This action is documented in includes/class-cbxcareer_toolkit-activator.php
4444
*/
45-
function activate_cbx_career_toolkit()
46-
{
47-
// if ( ! cbxcareer_toolkit_compatible_wp_version() ) {
48-
// deactivate_plugins( plugin_basename( __FILE__ ) );
49-
// wp_die( __( 'CBX Dev toolkit plugin requires WordPress 3.5 or higher!', 'cbxcareertoolkit' ) );
50-
// }
51-
//
52-
// if ( ! cbxcareer_toolkit_compatible_php_version() ) {
53-
// deactivate_plugins( plugin_basename( __FILE__ ) );
54-
// wp_die( __( 'CBX Dev toolkit plugin requires PHP 7.4 or higher!', 'cbxcareertoolkit' ) );
55-
// }
56-
45+
function activate_cbx_career_toolkit() {
5746
\Cbx\Careertoolkit\CBXCareertoolkit::activate();
58-
}
47+
}//end function activate_cbx_career_toolkit
5948

6049
/**
6150
* Begins execution of the plugin.
@@ -66,11 +55,10 @@ function activate_cbx_career_toolkit()
6655
*
6756
* @since 1.0.0
6857
*/
69-
function run_cbxcareer_toolkit()
70-
{ // phpcs:ignore WordPress.NamingConventions.ValidFunctionName
58+
function run_cbxcareer_toolkit() {
59+
// phpcs:ignore WordPress.NamingConventions.ValidFunctionName
7160
return \Cbx\Careertoolkit\CBXCareertoolkit::instance();
72-
}
73-
61+
}//end function run_cbxcareer_toolkit
7462

75-
add_action("plugin_loaded", "run_cbxcareer_toolkit");
7663

64+
add_action( "plugin_loaded", "run_cbxcareer_toolkit" );

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cbx/career-toolkit",
3-
"description": "cbx career toolkit for development test plugin",
3+
"description": "Helper plugin for CBX Career plugins",
44
"type": "library",
55
"license": "MIT",
66
"config": {

includes/CBXCareertoolkit.php

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22

33
namespace Cbx\Careertoolkit;
44

5-
class CBXCareertoolkit
6-
{
5+
class CBXCareertoolkit {
76

87
/**
98
* The single instance of the class.
@@ -38,11 +37,10 @@ class CBXCareertoolkit
3837
*/
3938
protected $hooks;
4039

41-
public function __construct()
42-
{
40+
public function __construct() {
4341
$this->plugin_name = CBXCAREER_TOOLKIT_PLUGIN_NAME;
44-
$this->version = CBXCAREER_TOOLKIT_PLUGIN_VERSION;
45-
$this->hooks = new Hooks();
42+
$this->version = CBXCAREER_TOOLKIT_PLUGIN_VERSION;
43+
$this->hooks = new Hooks();
4644
}
4745

4846
/**
@@ -54,21 +52,18 @@ public function __construct()
5452
* @since 1.0.0
5553
* @static
5654
*/
57-
public static function instance()
58-
{
59-
if (is_null(self::$instance)) {
55+
public static function instance() {
56+
if ( is_null( self::$instance ) ) {
6057
self::$instance = new self();
6158
}
6259

6360
return self::$instance;
6461
}
6562

66-
public static function activate()
67-
{
63+
public static function activate() {
6864
}//end method activate
6965

70-
public static function deactivate()
71-
{
66+
public static function deactivate() {
7267
}//end method activate
7368

74-
}
69+
}//end method CBXCareertoolkit

includes/Factories/Factory.php

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,9 @@
99
* Class Factory
1010
* @since 1.0.0
1111
*/
12-
abstract class Factory
13-
{
12+
abstract class Factory {
1413

15-
public function __construct()
16-
{
14+
public function __construct() {
1715
//$this->faker = FakerFactory::create();
1816
$this->init_commands();
1917
}
@@ -22,16 +20,15 @@ public function __construct()
2220
* Initialize commands
2321
* @since 1.0.0
2422
*/
25-
private function init_commands()
26-
{
23+
private function init_commands() {
2724

28-
if (class_exists("WP_CLI")) {
29-
add_action('cli_init', [$this, 'wp_cli_register_commands']);
25+
if ( class_exists( "WP_CLI" ) ) {
26+
add_action( 'cli_init', [ $this, 'wp_cli_register_commands' ] );
3027
}
3128
}//end method init_commands
3229

3330
abstract public function wp_cli_register_commands();
3431

35-
abstract public function run($args, $assoc_args);
32+
abstract public function run( $args, $assoc_args );
3633

3734
}//end class Factory

0 commit comments

Comments
 (0)