Version Description
- Feature: Elementor module for ads #60
Download this release
Release Info
Developer | wpquads |
Plugin | AdSense Plugin WP QUADS |
Version | 1.8.11 |
Comparing to | |
See all releases |
Code changes from version 1.8.10 to 1.8.11
- Gruntfile.js +125 -0
- includes/elementor/quads_elementor.php +68 -0
- includes/elementor/widget.php +34 -0
- {dist → includes/gutenberg/dist}/blocks.build.js +0 -0
- {dist → includes/gutenberg/dist}/blocks.editor.build.css +0 -0
- {dist → includes/gutenberg/dist}/blocks.style.build.css +0 -0
- includes/gutenberg/package.json +31 -0
- includes/gutenberg/src/block/block.js +41 -0
- {src → includes/gutenberg/src}/block/edit.js +0 -0
- {src → includes/gutenberg/src}/block/editor.scss +0 -0
- {src → includes/gutenberg/src}/block/style.scss +0 -0
- {src → includes/gutenberg/src}/blocks.js +0 -0
- {src → includes/gutenberg/src}/common.scss +0 -0
- {src → includes/gutenberg/src}/init.php +0 -34
- quick-adsense-reloaded.php +6 -8
- readme.txt +8 -6
- src/block/block.js +0 -81
Gruntfile.js
ADDED
@@ -0,0 +1,125 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* local path:
|
2 |
+
cd "P:\quick-adsense-reloaded\github\quick-adsense-reloaded"
|
3 |
+
server path:
|
4 |
+
http://wpquads.com/wp-content/uploads/edd/2016/09/wp-quads-pro.zip
|
5 |
+
*
|
6 |
+
*/
|
7 |
+
module.exports = function (grunt) {
|
8 |
+
|
9 |
+
// Project configuration.
|
10 |
+
grunt.initConfig({
|
11 |
+
pkg: grunt.file.readJSON('package.json'),
|
12 |
+
paths: {
|
13 |
+
// Base destination dir free version for wordpress.org
|
14 |
+
base: '../../wordpress-svn/tags/<%= pkg.version %>',
|
15 |
+
basetrunk: '../../wordpress-svn/trunk/',
|
16 |
+
basezip: '../../wordpress-svn/',
|
17 |
+
},
|
18 |
+
// Tasks here
|
19 |
+
// Bump version numbers
|
20 |
+
version: {
|
21 |
+
css: {
|
22 |
+
options: {
|
23 |
+
prefix: 'Version\\:\\s'
|
24 |
+
},
|
25 |
+
src: ['style.css']
|
26 |
+
},
|
27 |
+
php: {
|
28 |
+
options: {
|
29 |
+
prefix: '\@version\\s+'
|
30 |
+
},
|
31 |
+
src: ['functions.php', '<%= pkg.name %>.php']
|
32 |
+
}
|
33 |
+
},
|
34 |
+
// minify js
|
35 |
+
uglify: {
|
36 |
+
build: {
|
37 |
+
files: [
|
38 |
+
//{'assets/js/quads-admin.min.js': 'assets/js/quads-admin.js'}
|
39 |
+
{'<%= paths.base %>/assets/js/quads-admin.min.js': 'assets/js/quads-admin.js'}
|
40 |
+
]
|
41 |
+
}
|
42 |
+
},
|
43 |
+
// Copy to build folder
|
44 |
+
copy: {
|
45 |
+
build: {
|
46 |
+
files: [
|
47 |
+
{expand: true, src: ['**', '!node_modules/**', '!Gruntfile.js', '!package.json', '!nbproject/**', '!grunt/**', '!wp-quads-pro.php', '!**/includes/admin/settings/advanced-settings.php', '!grafik/**'],
|
48 |
+
dest: '<%= paths.base %>'},
|
49 |
+
{expand: true, src: ['**', '!node_modules/**', '!Gruntfile.js', '!package.json', '!nbproject/**', '!grunt/**', '!wp-quads-pro.php', '!**/includes/admin/settings/advanced-settings.php', '!grafik/**'],
|
50 |
+
dest: '<%= paths.basetrunk %>'}
|
51 |
+
]
|
52 |
+
},
|
53 |
+
},
|
54 |
+
'string-replace': {
|
55 |
+
version: {
|
56 |
+
files: {
|
57 |
+
'<%= paths.basetrunk %>quick-adsense-reloaded.php': 'quick-adsense-reloaded.php',
|
58 |
+
'<%= paths.base %>/quick-adsense-reloaded.php': 'quick-adsense-reloaded.php',
|
59 |
+
'<%= paths.base %>/readme.txt': 'readme.txt',
|
60 |
+
'<%= paths.basetrunk %>readme.txt': 'readme.txt',
|
61 |
+
|
62 |
+
},
|
63 |
+
options: {
|
64 |
+
replacements: [{
|
65 |
+
pattern: /1.8.11/g,
|
66 |
+
replacement: '<%= pkg.version %>'
|
67 |
+
}]
|
68 |
+
}
|
69 |
+
}
|
70 |
+
},
|
71 |
+
// Clean the build folder
|
72 |
+
clean: {
|
73 |
+
options: {
|
74 |
+
force: true
|
75 |
+
},
|
76 |
+
build: {
|
77 |
+
files: [
|
78 |
+
{src: ['<%= paths.base %>']},
|
79 |
+
{src: ['<%= paths.basetrunk %>']},
|
80 |
+
]
|
81 |
+
|
82 |
+
}
|
83 |
+
},
|
84 |
+
// Minify CSS files
|
85 |
+
cssmin: {
|
86 |
+
build: {
|
87 |
+
files: [
|
88 |
+
//{'assets/css/quads-admin.min.css': 'assets/css/quads-admin.css'}
|
89 |
+
{'<%= paths.base %>/assets/css/quads-admin.min.css': 'assets/css/quads-admin.css'}
|
90 |
+
]
|
91 |
+
}
|
92 |
+
},
|
93 |
+
// Compress the build folder into an upload-ready zip file
|
94 |
+
compress: {
|
95 |
+
build: {
|
96 |
+
options:
|
97 |
+
{
|
98 |
+
archive: '<%= paths.basezip %>/quick-adsense-reloaded.zip'
|
99 |
+
},
|
100 |
+
files:[
|
101 |
+
{
|
102 |
+
expand: true,
|
103 |
+
cwd: '<%= paths.base %>',
|
104 |
+
src: ['**/*']
|
105 |
+
}
|
106 |
+
]
|
107 |
+
}
|
108 |
+
}
|
109 |
+
|
110 |
+
|
111 |
+
});
|
112 |
+
|
113 |
+
// Load all grunt plugins here
|
114 |
+
// [...]
|
115 |
+
//require('load-grunt-config')(grunt);
|
116 |
+
require('load-grunt-tasks')(grunt);
|
117 |
+
|
118 |
+
// Display task timing
|
119 |
+
require('time-grunt')(grunt);
|
120 |
+
|
121 |
+
// Build task
|
122 |
+
//grunt.registerTask( 'build', [ 'compress:build' ]);
|
123 |
+
//grunt.registerTask('build', ['clean:build', 'uglify:build', 'cssmin:build', 'copy:build', 'string-replace:version', 'compress:build']);
|
124 |
+
grunt.registerTask('build', ['clean:build', 'copy:build', 'cssmin:build', 'string-replace:version', 'compress:build']);
|
125 |
+
};
|
includes/elementor/quads_elementor.php
ADDED
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace ElementorQuads\Widgets;
|
3 |
+
|
4 |
+
use Elementor\Widget_Base;
|
5 |
+
|
6 |
+
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
7 |
+
|
8 |
+
class Quads_Elementor extends Widget_Base {
|
9 |
+
|
10 |
+
public function get_name() {
|
11 |
+
return 'wp-quads';
|
12 |
+
}
|
13 |
+
|
14 |
+
public function get_title() {
|
15 |
+
return __( 'WP QUADS', 'wp-quads' );
|
16 |
+
}
|
17 |
+
|
18 |
+
public function get_icon() {
|
19 |
+
return 'dashicons dashicons-welcome-widgets-menus';
|
20 |
+
}
|
21 |
+
|
22 |
+
public function get_categories() {
|
23 |
+
return [ 'general' ];
|
24 |
+
}
|
25 |
+
|
26 |
+
public function get_script_depends() {
|
27 |
+
return [ 'elementor-wp-quads' ];
|
28 |
+
}
|
29 |
+
|
30 |
+
protected function _register_controls() {
|
31 |
+
$options =array();
|
32 |
+
foreach(quads_get_ads() as $key => $value){
|
33 |
+
if($key == 0)
|
34 |
+
$options['[quads id=RndAds]'] =$value;
|
35 |
+
else
|
36 |
+
$options['[quads id='.$key.']'] =$value;
|
37 |
+
}
|
38 |
+
|
39 |
+
$this->start_controls_section(
|
40 |
+
'content_section',
|
41 |
+
[
|
42 |
+
'label' => __( 'Content', 'wp-quads' ),
|
43 |
+
'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
|
44 |
+
]
|
45 |
+
);
|
46 |
+
|
47 |
+
$this->add_control(
|
48 |
+
'seleted_add',
|
49 |
+
[
|
50 |
+
'label' => __( 'Select add to Display', 'wp-quads' ),
|
51 |
+
'type' => \Elementor\Controls_Manager::SELECT,
|
52 |
+
'options' => $options,
|
53 |
+
]
|
54 |
+
);
|
55 |
+
$this->end_controls_section();
|
56 |
+
}
|
57 |
+
|
58 |
+
protected function render() {
|
59 |
+
$settings = $this->get_settings_for_display();
|
60 |
+
echo $settings['seleted_add'] ;
|
61 |
+
}
|
62 |
+
|
63 |
+
protected function _content_template() {
|
64 |
+
?>
|
65 |
+
{{ settings.seleted_add }}
|
66 |
+
<?php
|
67 |
+
}
|
68 |
+
}
|
includes/elementor/widget.php
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace ElementorQuads;
|
3 |
+
|
4 |
+
class Plugin {
|
5 |
+
|
6 |
+
private static $_instance = null;
|
7 |
+
|
8 |
+
public static function instance() {
|
9 |
+
if ( is_null( self::$_instance ) ) {
|
10 |
+
self::$_instance = new self();
|
11 |
+
}
|
12 |
+
return self::$_instance;
|
13 |
+
}
|
14 |
+
|
15 |
+
private function include_widgets_files() {
|
16 |
+
require_once( __DIR__ . '/quads_elementor.php' );
|
17 |
+
}
|
18 |
+
|
19 |
+
public function register_widgets() {
|
20 |
+
// Its is now safe to include Widgets files
|
21 |
+
$this->include_widgets_files();
|
22 |
+
|
23 |
+
// Register Widgets
|
24 |
+
\Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\Quads_Elementor() );
|
25 |
+
}
|
26 |
+
|
27 |
+
|
28 |
+
public function __construct() {
|
29 |
+
// Register widgets
|
30 |
+
add_action( 'elementor/widgets/widgets_registered', [ $this, 'register_widgets' ] );
|
31 |
+
}
|
32 |
+
}
|
33 |
+
|
34 |
+
Plugin::instance();
|
{dist → includes/gutenberg/dist}/blocks.build.js
RENAMED
File without changes
|
{dist → includes/gutenberg/dist}/blocks.editor.build.css
RENAMED
File without changes
|
{dist → includes/gutenberg/dist}/blocks.style.build.css
RENAMED
File without changes
|
includes/gutenberg/package.json
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "quick-adsense-reloaded",
|
3 |
+
"version": "1.8.9",
|
4 |
+
"scripts": {
|
5 |
+
"start": "cgb-scripts start",
|
6 |
+
"build": "cgb-scripts build",
|
7 |
+
"eject": "cgb-scripts eject"
|
8 |
+
},
|
9 |
+
"devDependencies": {
|
10 |
+
"extract-text-webpack-plugin": "^4.0.0-beta.0",
|
11 |
+
"grunt": "^1.0.4",
|
12 |
+
"grunt-contrib-clean": "~0.6.0",
|
13 |
+
"grunt-contrib-compress": "^1.6.0",
|
14 |
+
"grunt-contrib-copy": "~0.7.0",
|
15 |
+
"grunt-contrib-cssmin": "^3.0.0",
|
16 |
+
"grunt-contrib-jshint": "^2.1.0",
|
17 |
+
"grunt-contrib-uglify": "^4.0.1",
|
18 |
+
"grunt-phplint": "^0.1.0",
|
19 |
+
"grunt-string-replace": "~1.2.1",
|
20 |
+
"grunt-version": "^1.3.2",
|
21 |
+
"load-grunt-config": "^3.0.1",
|
22 |
+
"load-grunt-tasks": "^5.1.0",
|
23 |
+
"time-grunt": "~1.1.0",
|
24 |
+
"uglify-js": "git+https://github.com/mishoo/UglifyJS2.git#harmony",
|
25 |
+
"webpack": "^4.41.6"
|
26 |
+
},
|
27 |
+
"dependencies": {
|
28 |
+
"cgb-scripts": "^1.23.0",
|
29 |
+
"uglify-es": "git+https://github.com/mishoo/UglifyJS2.git#harmony"
|
30 |
+
}
|
31 |
+
}
|
includes/gutenberg/src/block/block.js
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
import edit from './edit';
|
3 |
+
// Import CSS.
|
4 |
+
import './editor.scss';
|
5 |
+
import './style.scss';
|
6 |
+
|
7 |
+
const { __ } = wp.i18n; // Import __() from wp.i18n
|
8 |
+
const { registerBlockType } = wp.blocks; // Import registerBlockType() from wp.blocks
|
9 |
+
|
10 |
+
registerBlockType('wp-quads/adds', {
|
11 |
+
// Block name. Block names must be string that contains a namespace prefix. Example: my-plugin/my-custom-block.
|
12 |
+
title: __('WP QUADS'), // Block title.
|
13 |
+
icon: 'welcome-widgets-menus', // Block icon from Dashicons → https://developer.wordpress.org/resource/dashicons/.
|
14 |
+
category: 'common', // Block category — Group blocks together based on common traits E.g. common, formatting, layout widgets, embed.
|
15 |
+
keywords: [
|
16 |
+
__('adds'),
|
17 |
+
__('add'),
|
18 |
+
__('quads'),
|
19 |
+
__('wp quads'),
|
20 |
+
],
|
21 |
+
attributes: { //Attributes
|
22 |
+
selectedAdd: {
|
23 |
+
type: 'string',
|
24 |
+
default: 'Random Ads',
|
25 |
+
},
|
26 |
+
},
|
27 |
+
edit,
|
28 |
+
|
29 |
+
save: (props) => {
|
30 |
+
const { attributes } = props;
|
31 |
+
const { selectedAdd } = attributes;
|
32 |
+
let toshortcode = selectedAdd;
|
33 |
+
if (selectedAdd == 'Random Ads')
|
34 |
+
toshortcode = '[quads id=RndAds]';
|
35 |
+
return (
|
36 |
+
<div >
|
37 |
+
{toshortcode}
|
38 |
+
</div>
|
39 |
+
);
|
40 |
+
},
|
41 |
+
});
|
{src → includes/gutenberg/src}/block/edit.js
RENAMED
File without changes
|
{src → includes/gutenberg/src}/block/editor.scss
RENAMED
File without changes
|
{src → includes/gutenberg/src}/block/style.scss
RENAMED
File without changes
|
{src → includes/gutenberg/src}/blocks.js
RENAMED
File without changes
|
{src → includes/gutenberg/src}/common.scss
RENAMED
File without changes
|
{src → includes/gutenberg/src}/init.php
RENAMED
@@ -1,32 +1,8 @@
|
|
1 |
<?php
|
2 |
-
/**
|
3 |
-
* Blocks Initializer
|
4 |
-
*
|
5 |
-
* Enqueue CSS/JS of all the blocks.
|
6 |
-
*
|
7 |
-
* @since 1.0.0
|
8 |
-
* @package CGB
|
9 |
-
*/
|
10 |
-
|
11 |
-
// Exit if accessed directly.
|
12 |
if ( ! defined( 'ABSPATH' ) ) {
|
13 |
exit;
|
14 |
}
|
15 |
|
16 |
-
/**
|
17 |
-
* Enqueue Gutenberg block assets for both frontend + backend.
|
18 |
-
*
|
19 |
-
* Assets enqueued:
|
20 |
-
* 1. blocks.style.build.css - Frontend + Backend.
|
21 |
-
* 2. blocks.build.js - Backend.
|
22 |
-
* 3. blocks.editor.build.css - Backend.
|
23 |
-
*
|
24 |
-
* @uses {wp-blocks} for block type registration & related functions.
|
25 |
-
* @uses {wp-element} for WP Element abstraction — structure of blocks.
|
26 |
-
* @uses {wp-i18n} to internationalize the block's text.
|
27 |
-
* @uses {wp-editor} for WP editor styles.
|
28 |
-
* @since 1.0.0
|
29 |
-
*/
|
30 |
function quads_block_assets() { // phpcs:ignore
|
31 |
// Register block styles for both frontend + backend.
|
32 |
wp_register_style(
|
@@ -65,16 +41,6 @@ function quads_block_assets() { // phpcs:ignore
|
|
65 |
)
|
66 |
);
|
67 |
|
68 |
-
/**
|
69 |
-
* Register Gutenberg block on server-side.
|
70 |
-
*
|
71 |
-
* Register the block on server-side to ensure that the block
|
72 |
-
* scripts and styles for both frontend and backend are
|
73 |
-
* enqueued when the editor loads.
|
74 |
-
*
|
75 |
-
* @link https://wordpress.org/gutenberg/handbook/blocks/writing-your-first-block-type#enqueuing-block-scripts
|
76 |
-
* @since 1.16.0
|
77 |
-
*/
|
78 |
register_block_type(
|
79 |
'quads/adds', array(
|
80 |
// Enqueue blocks.style.build.css on both frontend & backend.
|
1 |
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
exit;
|
4 |
}
|
5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
function quads_block_assets() { // phpcs:ignore
|
7 |
// Register block styles for both frontend + backend.
|
8 |
wp_register_style(
|
41 |
)
|
42 |
);
|
43 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
register_block_type(
|
45 |
'quads/adds', array(
|
46 |
// Enqueue blocks.style.build.css on both frontend & backend.
|
quick-adsense-reloaded.php
CHANGED
@@ -4,9 +4,9 @@
|
|
4 |
* Plugin Name: AdSense Integration WP QUADS
|
5 |
* Plugin URI: https://wordpress.org/plugins/quick-adsense-reloaded/
|
6 |
* Description: Insert Google AdSense and other ad formats fully automatic into your website
|
7 |
-
* Author:
|
8 |
* Author URI: https://wordpress.org/plugins/quick-adsense-reloaded/
|
9 |
-
* Version: 1.8.
|
10 |
* Text Domain: quick-adsense-reloaded
|
11 |
* Domain Path: languages
|
12 |
* Credits: WP QUADS - Quick AdSense Reloaded is a fork of Quick AdSense
|
@@ -38,7 +38,7 @@ if( !defined( 'ABSPATH' ) )
|
|
38 |
|
39 |
// Plugin version
|
40 |
if( !defined( 'QUADS_VERSION' ) ) {
|
41 |
-
define( 'QUADS_VERSION', '1.8.
|
42 |
}
|
43 |
|
44 |
// Plugin name
|
@@ -221,10 +221,8 @@ if( !class_exists( 'QuickAdsenseReloaded' ) ) :
|
|
221 |
require_once QUADS_PLUGIN_DIR . 'includes/vendor/google/adsense.php';
|
222 |
require_once QUADS_PLUGIN_DIR . 'includes/class-template.php';
|
223 |
require_once QUADS_PLUGIN_DIR . 'includes/admin/adsTxt.php';
|
224 |
-
|
225 |
-
|
226 |
-
*/
|
227 |
-
require_once QUADS_PLUGIN_DIR . 'src/init.php';
|
228 |
|
229 |
|
230 |
|
@@ -485,4 +483,4 @@ function quads_is_active_deprecated() {
|
|
485 |
}
|
486 |
|
487 |
return false;
|
488 |
-
}
|
4 |
* Plugin Name: AdSense Integration WP QUADS
|
5 |
* Plugin URI: https://wordpress.org/plugins/quick-adsense-reloaded/
|
6 |
* Description: Insert Google AdSense and other ad formats fully automatic into your website
|
7 |
+
* Author: WP Quads
|
8 |
* Author URI: https://wordpress.org/plugins/quick-adsense-reloaded/
|
9 |
+
* Version: 1.8.11
|
10 |
* Text Domain: quick-adsense-reloaded
|
11 |
* Domain Path: languages
|
12 |
* Credits: WP QUADS - Quick AdSense Reloaded is a fork of Quick AdSense
|
38 |
|
39 |
// Plugin version
|
40 |
if( !defined( 'QUADS_VERSION' ) ) {
|
41 |
+
define( 'QUADS_VERSION', '1.8.11' );
|
42 |
}
|
43 |
|
44 |
// Plugin name
|
221 |
require_once QUADS_PLUGIN_DIR . 'includes/vendor/google/adsense.php';
|
222 |
require_once QUADS_PLUGIN_DIR . 'includes/class-template.php';
|
223 |
require_once QUADS_PLUGIN_DIR . 'includes/admin/adsTxt.php';
|
224 |
+
require_once QUADS_PLUGIN_DIR . 'includes/elementor/widget.php';
|
225 |
+
require_once QUADS_PLUGIN_DIR . 'includes/gutenberg/src/init.php';
|
|
|
|
|
226 |
|
227 |
|
228 |
|
483 |
}
|
484 |
|
485 |
return false;
|
486 |
+
}
|
readme.txt
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
-
=== AdSense Plugin WP QUADS ===
|
2 |
|
3 |
-
Author URL: https://
|
4 |
-
Plugin URL: https://
|
5 |
-
Contributors:
|
6 |
Donate link: https://wpquads.com
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -10,9 +10,9 @@ Tags: adsense, ads, ad, google adsense, advertising, amp, ad injection, ad inser
|
|
10 |
Requires at least: 3.6+
|
11 |
Tested up to: 5.3.2
|
12 |
Requires PHP: 5.3
|
13 |
-
Stable tag: 1.8.
|
14 |
|
15 |
-
|
16 |
|
17 |
== Description ==
|
18 |
|
@@ -129,6 +129,8 @@ Alternative Installation:
|
|
129 |
|
130 |
|
131 |
== Changelog ==
|
|
|
|
|
132 |
|
133 |
= 1.8.10 =
|
134 |
* Feature: Gutenberg module for ads #60
|
1 |
+
=== Ads & AdSense Plugin WP QUADS ===
|
2 |
|
3 |
+
Author URL: https://wpquads.com
|
4 |
+
Plugin URL: https://wordpress.org/plugins/quick-adsense-reloaded/
|
5 |
+
Contributors: wpquads
|
6 |
Donate link: https://wpquads.com
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
Requires at least: 3.6+
|
11 |
Tested up to: 5.3.2
|
12 |
Requires PHP: 5.3
|
13 |
+
Stable tag: 1.8.11
|
14 |
|
15 |
+
Ads & AdSense Plugin is the quickest way to insert Google AdSense & other ads into your website. Google AdSense integration with Google AMP support.
|
16 |
|
17 |
== Description ==
|
18 |
|
129 |
|
130 |
|
131 |
== Changelog ==
|
132 |
+
= 1.8.11 =
|
133 |
+
* Feature: Elementor module for ads #60
|
134 |
|
135 |
= 1.8.10 =
|
136 |
* Feature: Gutenberg module for ads #60
|
src/block/block.js
DELETED
@@ -1,81 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* BLOCK: my-block
|
3 |
-
*
|
4 |
-
* Registering a basic block with Gutenberg.
|
5 |
-
* Simple block, renders and saves the same content without any interactivity.
|
6 |
-
*/
|
7 |
-
import edit from './edit';
|
8 |
-
// Import CSS.
|
9 |
-
import './editor.scss';
|
10 |
-
import './style.scss';
|
11 |
-
|
12 |
-
const { __ } = wp.i18n; // Import __() from wp.i18n
|
13 |
-
const { registerBlockType } = wp.blocks; // Import registerBlockType() from wp.blocks
|
14 |
-
/**
|
15 |
-
* Register: aa Gutenberg Block.
|
16 |
-
*
|
17 |
-
* Registers a new block provided a unique name and an object defining its
|
18 |
-
* behavior. Once registered, the block is made editor as an option to any
|
19 |
-
* editor interface where blocks are implemented.
|
20 |
-
*
|
21 |
-
* @link https://wordpress.org/gutenberg/handbook/block-api/
|
22 |
-
* @param {string} name Block name.
|
23 |
-
* @param {Object} settings Block settings.
|
24 |
-
* @return {?WPBlock} The block, if it has been successfully
|
25 |
-
* registered; otherwise `undefined`.
|
26 |
-
*/
|
27 |
-
registerBlockType('wp-quads/adds', {
|
28 |
-
// Block name. Block names must be string that contains a namespace prefix. Example: my-plugin/my-custom-block.
|
29 |
-
title: __('WP QUADS'), // Block title.
|
30 |
-
icon: 'welcome-widgets-menus', // Block icon from Dashicons → https://developer.wordpress.org/resource/dashicons/.
|
31 |
-
category: 'common', // Block category — Group blocks together based on common traits E.g. common, formatting, layout widgets, embed.
|
32 |
-
keywords: [
|
33 |
-
__('adds'),
|
34 |
-
__('add'),
|
35 |
-
__('quads'),
|
36 |
-
__('wp quads'),
|
37 |
-
],
|
38 |
-
attributes: { //Attributes
|
39 |
-
selectedAdd: {
|
40 |
-
type: 'string',
|
41 |
-
default: 'Random Ads',
|
42 |
-
},
|
43 |
-
},
|
44 |
-
|
45 |
-
/**
|
46 |
-
* The edit function describes the structure of your block in the context of the editor.
|
47 |
-
* This represents what the editor will render when the block is used.
|
48 |
-
*
|
49 |
-
* The "edit" property must be a valid function.
|
50 |
-
*
|
51 |
-
* @link https://wordpress.org/gutenberg/handbook/block-api/block-edit-save/
|
52 |
-
*
|
53 |
-
* @param {Object} props Props.
|
54 |
-
* @returns {Mixed} JSX Component.
|
55 |
-
*/
|
56 |
-
edit,
|
57 |
-
|
58 |
-
/**
|
59 |
-
* The save function defines the way in which the different attributes should be combined
|
60 |
-
* into the final markup, which is then serialized by Gutenberg into post_content.
|
61 |
-
*
|
62 |
-
* The "save" property must be specified and must be a valid function.
|
63 |
-
*
|
64 |
-
* @link https://wordpress.org/gutenberg/handbook/block-api/block-edit-save/
|
65 |
-
*
|
66 |
-
* @param {Object} props Props.
|
67 |
-
* @returns {Mixed} JSX Frontend HTML.
|
68 |
-
*/
|
69 |
-
save: (props) => {
|
70 |
-
const { attributes } = props;
|
71 |
-
const { selectedAdd } = attributes;
|
72 |
-
let toshortcode = selectedAdd;
|
73 |
-
if (selectedAdd == 'Random Ads')
|
74 |
-
toshortcode = '[quads id=RndAds]';
|
75 |
-
return (
|
76 |
-
<div >
|
77 |
-
{toshortcode}
|
78 |
-
</div>
|
79 |
-
);
|
80 |
-
},
|
81 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|