Changeset 1336987
- Timestamp:
- 01/27/2016 09:55:45 AM (10 years ago)
- Location:
- genoo/trunk
- Files:
-
- 5 edited
-
Genoo.php (modified) (1 diff)
-
GenooInit.php (modified) (2 diffs)
-
libs/Genoo/Admin.php (modified) (1 diff)
-
libs/Genoo/RepositorySettings.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
genoo/trunk/Genoo.php
r1333632 r1336987 6 6 Author URI: http://www.genoo.com/ 7 7 Author Email: info@genoo.com 8 Version: 3.4. 68 Version: 3.4.7 9 9 License: GPLv2 10 10 Text Domain: genoo -
genoo/trunk/GenooInit.php
r1328926 r1336987 121 121 122 122 /** 123 * 3. Admin | Frontend 123 * 4. Init RSS 124 */ 125 126 if(GENOO_SETUP){ 127 Action::add('init', array($this, 'rss')); 128 } 129 130 /** 131 * 5. Admin | Frontend 124 132 */ 125 133 … … 144 152 Sidebars::checkWidgetsFileBased($this->repositarySettings); 145 153 } 154 155 156 /** 157 * RSS (json) feed with CTA's 158 */ 159 public function rss() 160 { 161 // Add feed renderer 162 add_feed('wpmktengine_cta', function(){ 163 // Send headers 164 header('Cache-Control: no-cache, must-revalidate'); 165 header('Expires: '.gmdate('D, d M Y H:i:s \G\M\T', time() + (60 * 60))); // 1 hour 166 header('Content-type: application/json'); 167 // Get data 168 $data = array(); 169 $ctas = new \WP_Query( 170 array( 171 'post_type' => 'cta', 172 'posts_per_page' => -1, 173 ) 174 ); 175 // Sort data 176 if(isset($ctas->posts) && !empty($ctas->posts) && is_array($ctas->posts)){ 177 foreach($ctas->posts as $cta){ 178 // Start assigning 179 $data[$cta->ID]['id'] = $cta->ID; 180 $data[$cta->ID]['title'] = $cta->post_title; 181 // Get post meta 182 $meta = get_post_meta($cta->ID); 183 // Remove unwanted post meta 184 if(isset($meta['_edit_last'])){ unset($meta['_edit_last']); } 185 if(isset($meta['_edit_lock'])){ unset($meta['_edit_lock']); } 186 // Filter 187 if(is_array($meta) && !empty($meta)){ 188 foreach($meta as $key => $met){ 189 if(is_array($met) && isset($met[0]) && !empty($met[0])){ 190 $data[$cta->ID][$key] = $met[0]; 191 if($key == 'formpop'){ 192 $data[$cta->ID][$key] = unserialize($met[0]); 193 } 194 } 195 } 196 } 197 // Unset meta 198 unset($meta); 199 } 200 } 201 // Return 202 echo \Genoo\Utils\Json::encode($data); 203 die; 204 }); 205 } 146 206 } 147 207 -
genoo/trunk/libs/Genoo/Admin.php
r1328926 r1336987 593 593 $page->addWidget('Sidebar Report', Tools::getSidebarReport()); 594 594 } 595 // Add custom widgets 596 apply_filters('wpmktengine_tools_widgets', $page); 595 597 echo $page; 596 598 } -
genoo/trunk/libs/Genoo/RepositorySettings.php
r1305041 r1336987 363 363 { 364 364 if(GENOO_SETUP){ 365 return array( 365 return apply_filters( 366 'wpmktengine_settings_sections', 366 367 array( 367 'id' => 'genooApiSettings', 368 'title' => __('API settings', 'genoo') 369 ), 370 array( 371 'id' => 'genooLeads', 372 'title' => __('Leads', 'genoo') 373 ), 374 array( 375 'id' => 'genooFormMessages', 376 'title' => __('Form messages', 'genoo') 377 ), 378 array( 379 'id' => 'genooThemeSettings', 380 'title' => __('Form themes', 'genoo') 381 ), 382 array( 383 'id' => 'genooCTA', 384 'title' => __('CTA', 'genoo') 385 ), 386 array( 387 'id' => 'genooMisc', 388 'title' => __('Miscellaneous', 'wpmktengine') 368 array( 369 'id' => 'genooApiSettings', 370 'title' => __('API settings', 'genoo') 371 ), 372 array( 373 'id' => 'genooLeads', 374 'title' => __('Leads', 'genoo') 375 ), 376 array( 377 'id' => 'genooFormMessages', 378 'title' => __('Form messages', 'genoo') 379 ), 380 array( 381 'id' => 'genooThemeSettings', 382 'title' => __('Form themes', 'genoo') 383 ), 384 array( 385 'id' => 'genooCTA', 386 'title' => __('CTA', 'genoo') 387 ), 388 array( 389 'id' => 'genooMisc', 390 'title' => __('Miscellaneous', 'wpmktengine') 391 ) 389 392 ) 390 393 ); 391 394 } else { 392 return array( 395 return apply_filters( 396 'wpmktengine_settings_sections', 393 397 array( 394 'id' => 'genooApiSettings', 395 'title' => __('API settings', 'genoo') 396 ), 398 array( 399 'id' => 'genooApiSettings', 400 'title' => __('API settings', 'genoo') 401 ), 402 ) 397 403 ); 398 404 } … … 533 539 public function getSettingsFields() 534 540 { 535 return array( 536 'genooApiSettings' => array( 537 array( 538 'name' => 'apiKey', 539 'label' => __('API key', 'genoo'), 540 'type' => 'text', 541 'default' => '', 542 'desc' => __('You can generate your API key in: Control panel > Settings > Api.', 'genoo') 541 return apply_filters( 542 'wpmktengine_settings_fields', 543 array( 544 'genooApiSettings' => array( 545 array( 546 'name' => 'apiKey', 547 'label' => __('API key', 'genoo'), 548 'type' => 'text', 549 'default' => '', 550 'desc' => __('You can generate your API key in: Control panel > Settings > Api.', 'genoo') 551 ), 552 array( 553 'name' => 'apiExternalTrackingCode', 554 'label' => __('External tracking code', 'genoo'), 555 'type' => 'textarea', 556 'desc' => __('You can generate your tracking code in: Control panel > Settings > External tracking.', 'genoo') 557 ), 558 $this->getSettingsFieldLeadTypes() 543 559 ), 544 array( 545 'name' => 'apiExternalTrackingCode', 546 'label' => __('External tracking code', 'genoo'), 547 'type' => 'textarea', 548 'desc' => __('You can generate your tracking code in: Control panel > Settings > External tracking.', 'genoo') 560 'genooLeads' => $this->getUserRolesDropdonws(), 561 'genooFormMessages' => array( 562 array( 563 'name' => 'sucessMessage', 564 'label' => __('Successful form submission message', 'genoo'), 565 'type' => 'textarea', 566 'desc' => __('This is default message displayed upon form success.', 'genoo'), 567 'default' => __('Thank your for your subscription.', 'genoo') 568 ), 569 array( 570 'name' => 'errorMessage', 571 'label' => __('Failed form submission message', 'genoo'), 572 'type' => 'textarea', 573 'desc' => __('This is default message displayed upon form error.', 'genoo'), 574 'default' => __('There was a problem processing your request.', 'genoo') 575 ), 549 576 ), 550 $this->getSettingsFieldLeadTypes() 551 ), 552 'genooLeads' => $this->getUserRolesDropdonws(), 553 'genooFormMessages' => array( 554 array( 555 'name' => 'sucessMessage', 556 'label' => __('Successful form submission message', 'genoo'), 557 'type' => 'textarea', 558 'desc' => __('This is default message displayed upon form success.', 'genoo'), 559 'default' => __('Thank your for your subscription.', 'genoo') 577 'genooThemeSettings' => array( 578 array( 579 'desc' => __('Set the theme to use for your forms. “Default” means that Genoo forms will conform to the default form look associated with your WordPress theme.', 'genoo'), 580 'type' => 'desc', 581 'name' => 'genooForm', 582 'label' => '', 583 ), 584 array( 585 'name' => 'genooFormTheme', 586 'label' => __('Form theme', 'genoo'), 587 'type' => 'select', 588 'attr' => array( 589 'onchange' => 'Genoo.switchToImage(this)' 590 ), 591 'options' => $this->getSettingsThemes() 592 ), 593 array( 594 'name' => 'genooFormPrev', 595 'type' => 'html', 596 'label' => __('Form preview', 'genoo'), 597 ), 560 598 ), 561 array( 562 'name' => 'errorMessage', 563 'label' => __('Failed form submission message', 'genoo'), 564 'type' => 'textarea', 565 'desc' => __('This is default message displayed upon form error.', 'genoo'), 566 'default' => __('There was a problem processing your request.', 'genoo') 599 'genooCTA' => array( 600 array( 601 'name' => 'genooCTAPostTypes', 602 'label' => __('Enable CTA for', 'genoo'), 603 'type' => 'multicheck', 604 'options' => $this->getPostTypes() 605 ), 567 606 ), 568 ), 569 'genooThemeSettings' => array( 570 array( 571 'desc' => __('Set the theme to use for your forms. “Default” means that Genoo forms will conform to the default form look associated with your WordPress theme.', 'genoo'), 572 'type' => 'desc', 573 'name' => 'genooForm', 574 'label' => '', 575 ), 576 array( 577 'name' => 'genooFormTheme', 578 'label' => __('Form theme', 'genoo'), 579 'type' => 'select', 580 'attr' => array( 581 'onchange' => 'Genoo.switchToImage(this)' 582 ), 583 'options' => $this->getSettingsThemes() 584 ), 585 array( 586 'name' => 'genooFormPrev', 587 'type' => 'html', 588 'label' => __('Form preview', 'genoo'), 589 ), 590 ), 591 'genooCTA' => array( 592 array( 593 'name' => 'genooCTAPostTypes', 594 'label' => __('Enable CTA for', 'genoo'), 595 'type' => 'multicheck', 596 'options' => $this->getPostTypes() 597 ), 598 ), 599 'genooMisc' => array( 600 array( 601 'name' => 'genooCheckSidebars', 602 'label' => __('Sidebar widgets protection', 'wpmktengine'), 603 'type' => 'checkbox', 604 'desc' => __('Disable sidebar widgets disappearance protection', 'wpmktengine'), 607 'genooMisc' => array( 608 array( 609 'name' => 'genooCheckSidebars', 610 'label' => __('Sidebar widgets protection', 'wpmktengine'), 611 'type' => 'checkbox', 612 'desc' => __('Disable sidebar widgets disappearance protection', 'wpmktengine'), 613 ) 605 614 ) 606 615 ) -
genoo/trunk/readme.txt
r1333632 r1336987 6 6 License: GPLv2 or later 7 7 License URI: http://www.gnu.org/licenses/gpl-2.0.html 8 Stable tag: 3.4. 68 Stable tag: 3.4.7 9 9 10 10 Combine the flexibility of WordPress with the power of Genoo and experience amazing results! … … 68 68 69 69 == Changelog == 70 71 = 3.4.7 = 72 * Added extensibility for settings pages 73 * Added extensibility for tools 74 * Added cta extension for page builder 70 75 71 76 = 3.4.6 =
Note: See TracChangeset
for help on using the changeset viewer.